> ## Documentation Index
> Fetch the complete documentation index at: https://60db.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# 60db CLI

> Agent-native command-line interface for 60db.ai API - AI completions, TTS, STT, user management, credits, billing, and workspaces with structured JSON output.

# 60db CLI

Agent-native command-line interface for 60db.ai API - AI completions, TTS, STT, user management, credits, billing, and workspaces with structured JSON output.

## 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
* **Authentication**: Secure login and token management
* **Complete Coverage**: Users, Credits, Billing, Workspaces, Categories
* **Configuration**: Persistent config with `60db config`

## Installation

### Global Installation

```bash theme={null}
npm install -g 60db-cli
```

### Local Installation

```bash theme={null}
npm install 60db-cli
```

## Quick Start

### Interactive Mode (REPL)

```bash theme={null}
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

```bash theme={null}
# List all users
60db users --list

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

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

## Environment Variables

```bash theme={null}
# Set API URL
export X60DB_API_URL=https://api.60db.ai

# Set API Key
export X60DB_API_KEY=your_api_key_here
```

## JSON Output (for AI Agents)

All commands support `--json` flag for structured output:

```bash theme={null}
60db --json users --list
```

Response:

```json theme={null}
{
  "success": true,
  "users": [
    {
      "id": 123,
      "email": "user@example.com",
      "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:

```json theme={null}
{
  "success": false,
  "error": "User not found"
}
```

## Requirements

* Node.js >= 16.0.0
* npm or yarn

## Support

For issues or questions, please visit:

* GitHub: [https://github.com/60db-ai/60db-cli](https://github.com/60db-ai/60db-cli)
* Issues: [https://github.com/60db-ai/60db-cli/issues](https://github.com/60db-ai/60db-cli/issues)

## License

MIT
