CLI
Manage Store data sets, inspect data, and run operations from the command line.
Installation
The CLI is included with the TypeScript SDK:
npm install -g @cuitty/store
After installation, the store command is available globally.
Core commands
Store operations
# Create a new store
cui store create my-app --adapter sqlite --path ./data/my-app.db
# List all configured stores
cui store list
# Show store info (adapter, record count, sync status)
cui store info my-app
Records
# Put a record (value as JSON)
cui store records put my-app user:1 '{"name":"Alice","role":"admin"}'
# Get a record
cui store records get my-app user:1
# List records with prefix
cui store records list my-app --prefix "user:" --limit 20
# Delete a record
cui store records delete my-app user:1
Events
# Append an event
cui store events append my-app audit '{"action":"login","userId":"1"}'
# List recent events
cui store events list my-app --stream audit --limit 10
# Tail events in real-time
cui store events tail my-app --stream audit
Key-Value
# Set a value
cui store kv set my-app feature:dark-mode enabled
# Get a value
cui store kv get my-app feature:dark-mode
# Delete a key
cui store kv delete my-app feature:dark-mode
Sync commands
# Show sync status
cui store sync status my-app
# Force a sync cycle
cui store sync push my-app
# Show pending queue
cui store sync queue my-app
Configuration file
The CLI reads from store.config.ts in the current directory or from ~/.config/store/config.ts globally. You can also pass --config path/to/config.ts explicitly.
# Initialize a config file in the current directory
cui store init
# Validate the config file
cui store config validate
Shell completions
Generate completion scripts for your shell:
# Bash
cui store completions bash >> ~/.bashrc
# Zsh
cui store completions zsh >> ~/.zshrc
# Fish
cui store completions fish > ~/.config/fish/completions/store.fish
Output formats
Most commands support --format for structured output:
cui store records list my-app --format json # JSON array
cui store records list my-app --format csv # CSV output
cui store records list my-app --format table # default: formatted table