debug-snapshot-cli
v1.0.0
Published
Capture and log runtime system data for debugging
Readme
🐞 debug-snapshot-cli
A CLI tool to capture runtime system data (memory usage, environment variables, and custom notes) for debugging purposes.
📦 Installation
You can install globally (after publishing to npm):
npm install -g debug-snapshot-cli
🚀 Usage
Capture a snapshot with a note:
debug-snapshot "Login failed at /auth"
This will create (or append) a file named debug-snapshots.json in your current directory, storing the snapshot with timestamp, system memory usage, environment variables, and your note.
🗂 Snapshot Structure
{
"timestamp": "2025-04-17T08:00:00Z",
"note": "Login failed at /auth",
"systemInfo": {
"rss": 2101248,
"heapTotal": 1024000,
"heapUsed": 754321
},
"environmentVariables": {
"NODE_ENV": "development",
...
}
}
🔧 Folder Structure
debug-snapshot-cli/
├── src/
│ ├── index.js // Main CLI logic
│ ├── snapshot.js // Builds the snapshot
│ └── log.js // Saves snapshot to JSON
├── .gitignore
├── README.md
└── package.json
👨💻 Author
Omkar Patil
📄 License
MIT