Skip to main content

60db CLI

Agent-native command-line interface for the full 60db platform. Covers AI completions, TTS, STT, voice cloning, persistent memory with document upload (PDF, DOCX, XLSX, scanned images with OCR), Cerbos policy checks, billing, and workspace management — all with structured JSON output for scripts and AI agents. Source code: github.com/60db/cli · npm: 60db-cli · License: MIT

Features

  • Dual Mode: Interactive REPL + subcommand interface
  • Agent-Native: Structured JSON output with --json flag
  • AI Completions: Chat, meeting notes analysis, and text completion
  • TTS (Text-to-Speech): Generate speech from text with multiple voices
  • STT (Speech-to-Text): Transcribe audio files with multiple languages
  • Memory & RAG: Ingest memories, upload documents (91+ formats with OCR), hybrid semantic search, LLM-ready context assembly, per-month spend tracking
  • Authorization (Cerbos): Inspect effective permissions and probe (resource, action) checks before attempting gated operations
  • Authentication: Secure login and token management
  • Complete Coverage: Users, Credits, Billing, Workspaces, Categories, Memory, Authz
  • Configuration: Persistent config with 60db config

Installation

Global Installation

npm install -g 60db-cli

Local Installation

npm install 60db-cli

From Source

git clone https://github.com/60db/cli.git
cd cli
npm install
npm link        # exposes the `60db` binary globally

Quick Start

Interactive Mode (REPL)

60db
60db --version
Enter the interactive shell with tab completion and persistent session:
60db> users
60db> credits:add --user-id 123 --amount 50
60db> config --list
60db> exit

Command Mode

# List all users
60db users --list

# Add credits to user
60db credits:add --user-id 123 --amount 50 --currency USD

# Upload a document to memory with OCR
60db memory:upload --file ~/Documents/handbook.pdf --type knowledge

# Search with hybrid semantic + keyword recall
60db memory:search --query "refund policy" --limit 5

# Check if current user can ingest memories
60db authz:check --resource memory --action create

# Get JSON output for agent consumption
60db --json users --list

Environment Variables

# Set API URL
export SIXTYDB_API_URL=https://api.60db.ai

# Set API Key
export SIXTYDB_API_KEY=your_api_key_here
Legacy X60DB_* variable names are still honored for backward compatibility.

JSON Output (for AI Agents)

All commands support --json flag for structured output:
60db --json users --list
Response:
{
  "success": true,
  "users": [
    {
      "id": 123,
      "email": "[email protected]",
      "full_name": "John Doe",
      "system_role": "user",
      "is_active": true,
      "is_verify_email": true,
      "created_at": "2024-01-15T10:30:00Z"
    }
  ],
  "pagination": {
    "total_users": 1,
    "total_pages": 1,
    "current_page": 1,
    "limit": 10
  }
}

Error Handling

All commands return structured error responses:
{
  "success": false,
  "error": "User not found"
}

Requirements

  • Node.js >= 16.0.0
  • npm or yarn

Support

For issues or questions, please visit:

License

MIT