CLICommands
live-json
snug live-json <COMMAND>Live JSON real-time database operations.
Subcommands
| Command | What it does |
|---|---|
subscribe | Subscribe to a JSON document path for real-time updates |
watch | Open a live-json WebSocket, subscribe to a path, and stream changes |
unsubscribe | Unsubscribe from a Live JSON subscription |
subscriptions | List all active Live JSON subscriptions |
stats | Get Live JSON statistics |
create | Create a new document with auto-generated ID |
put | Create or update a document with specific ID |
get | Get a document by ID (metadata, content, or full) |
full | Get the full document (metadata + content) |
content | Get document content only |
patch | Patch document content using JSONPath |
replace | Replace entire document content |
metadata | Update document metadata |
delete | Delete a document |
list | List all documents |
lock | Acquire a lock on a document |
unlock | Release a lock on a document |
Run snug live-json <command> --help for that command's own options.
The global options apply everywhere.
Examples
snug live-json subscribe -d user-settings -p '$.theme'
snug live-json subscribe -d user-settings -p '$.theme' -c ws_conn_123
snug live-json unsubscribe -s sub_123abc
snug live-json subscriptions --document user-settings --verbose
snug live-json stats
snug live-json create -c '{"key": "value"}' --name 'My Doc'
snug live-json put -d user-settings -c '{"theme": "dark"}'
snug live-json get -d user-settings
snug live-json get -d user-settings --view full
snug live-json full -d user-settings
snug live-json content -d user-settings
snug live-json patch -d user-settings -p '$.notifications' -v 'true'
snug live-json replace -d user-settings -c '{"new": "content"}'
snug live-json metadata -d user-settings --name 'Updated Name'
snug live-json delete -d user-settings
snug live-json list --limit 50 --search 'user'
snug live-json lock -d user-settings --duration 120
snug live-json unlock -d user-settingsNext
- live-json guide - what the service does and when to reach for it.
- CLI reference - global options, output modes, and exit codes.