@sapphy/ghost-cli
v0.1.0
Published
Command-line interface for Ghost error replay system
Maintainers
Readme
@sapphy/ghost-cli
Command-line interface for the Ghost error replay system.
Installation
# Install globally
npm install -g @sapphy/ghost-cli
# Or use with npx
npx @sapphy/ghost-cli --helpUsage
# Show all commands
ghostcli --help
# List stored replays
ghostcli list
# Replay a specific error by ID
ghostcli replay <id>
# Inspect detailed information about a replay
ghostcli inspect <id>
# Clear all stored replays
ghostcli clear
# Show storage information and statistics
ghostcli info
# Get JSON output (useful for scripting)
ghostcli list --json
ghostcli info --jsonCommands
ghostcli list
Display all stored error replays in a table format.
Options:
--json- Output in JSON format
ghostcli replay <id>
Re-execute a captured error replay by its ID.
Arguments:
id- The unique identifier of the replay record
Options:
--json- Output result in JSON format
ghostcli inspect <id>
Show detailed information about a specific replay record.
Arguments:
id- The unique identifier of the replay record
Options:
--json- Output in JSON format
ghostcli clear
Remove all stored replay records.
Options:
--confirm- Skip confirmation prompt
ghostcli info
Display information about the current storage backend and statistics.
Options:
--json- Output in JSON format
Storage
By default, Ghost CLI uses file-based storage in a .ghost/ directory in your current working directory. You can customize the storage location by setting the GHOST_STORAGE_DIR environment variable:
export GHOST_STORAGE_DIR=/path/to/custom/storage
ghostcli listExamples
# List all replays with pretty output
ghostcli list
# Get replay data as JSON for processing
ghostcli list --json | jq '.[] | select(.fn == "processUserData")'
# Replay a specific error
ghostcli replay abc123-def456-789
# Inspect detailed information
ghostcli inspect abc123-def456-789
# Clear all replays without confirmation
ghostcli clear --confirm
# Show storage stats
ghostcli infoLicense
MIT
