@cachly-dev/cli
v0.1.2
Published
Cachly CLI — manage your AI Brain instances, cache data, and lessons from the terminal.
Maintainers
Readme
@cachly-dev/cli
Official cachly.dev CLI – manage cache instances, brain lessons, and live data from your terminal.
🧠 Looking for the AI Brain MCP server (Claude Code, Cursor, Copilot, Windsurf)?
→@cachly-dev/mcp-server· One-command setup:npx @cachly-dev/init
Installation
npm install -g @cachly-dev/cliSetup
# 1. Get your API token from https://cachly.dev/instances → Settings → API Token
# 2. Login:
cachly auth login --token <your-jwt>
# Or via environment variable (CI/CD):
export CACHLY_JWT=<your-jwt>Commands
Auth
cachly auth login --token <jwt> # Save token to ~/.cachly/config.json
cachly auth status # Show current auth + token info
cachly auth logout # Remove saved token
cachly auth token # Print JWT (for scripts)Instances
cachly instances list # List all instances
cachly instances get <id> # Get instance details
cachly instances create --name my-cache --tier free # Create new instance
cachly instances create --name prod-cache --tier pro
cachly instances delete <id> --yes # Delete (--yes to confirm)
cachly instances url <id> # Print Redis URLTiers: free · dev · pro · speed · business
Cache Operations
cachly cache get <instance-id> <key> # Get value
cachly cache set <instance-id> <key> <value> # Set value
cachly cache set <instance-id> <key> <value> --ttl 3600 # With TTL
cachly cache del <instance-id> <key> # Delete key
cachly cache keys <instance-id> # List all keys
cachly cache keys <instance-id> --pattern "user:*" # Glob pattern
cachly cache ttl <instance-id> <key> # Check TTL
cachly cache stats <instance-id> # Memory, hit rate, ops/sec
cachly cache flush <instance-id> --yes # Delete ALL keys (⚠️)Examples
# Onboarding a new user's cache instance
cachly instances create --name "llm-cache-prod" --tier pro
# Live testing a key
cachly cache set abc123 "greeting" "Hello, cachly!" --ttl 300
cachly cache get abc123 "greeting"
# → Hello, cachly!
# Monitor performance
cachly cache stats abc123
# → Memory: 12.4 MB | Hit Rate: 94.2% | Ops/sec: 342
# CI/CD script
REDIS_URL=$(cachly instances url $INSTANCE_ID)
echo "Connecting to $REDIS_URL"CI/CD Integration
# GitHub Actions example
- name: Create cachly instance
env:
CACHLY_JWT: ${{ secrets.CACHLY_JWT }}
run: |
npx @cachly-dev/cli instances create --name "pr-${{ github.event.number }}" --tier devConfiguration
Config is stored in ~/.cachly/config.json:
{
"jwt": "eyJhbGc...",
"apiUrl": "https://api.cachly.dev"
}Override via environment:
export CACHLY_API_URL=https://api.cachly.dev
export CACHLY_JWT=eyJhbGc...👥 Team Brain — Shared AI Memory for Your Whole Team
One shared instance. Every developer gets smarter every day.
# .env — same instance for the whole team
export CACHLY_INSTANCE_ID=your-shared-team-instance
# Alice fixes a bug, stores the lesson:
cachly brain learn \
--topic "deploy:k8s-timeout" \
--outcome success \
--what-worked "Increase readinessProbe.failureThreshold to 10" \
--author alice
# Bob starts a session the next day:
cachly brain session-start
# → "💡 alice solved deploy:k8s-timeout 1d ago: Increase readinessProbe..."Set up a team org at cachly.dev/teams — Team €99/mo · 10 seats · Business €299/mo · 50 seats.
Development
cd sdk/cli
npm install
npm run build
node dist/index.js instances list # test locally
# Link globally for testing:
npm link
cachly instances list