Home
CLI Documentation

3meel CLI

Manage your knowledge bases, documents, and queries from the terminal. The CLI hits the same backend as the dashboard—use it for scripting, CI/CD, and operators who want shell workflows.

MCP is for assistants inside editors (Claude, Cursor, etc.): they call MCP tools over HTTP. The CLI is for direct commands and machine-readable output. See MCP & API documentation for API keys, tool reference, and connection examples.

All commands support --json and --ndjson output for easy integration with other tools and AI agents.

Installation

Install the CLI globally from npm:

bash
npm install -g 3meel

Requires Node.js 18 or later. After installation, the 3meel command will be available in your terminal. If you develop from the monorepo, use pnpm -F 3meel build and run node dist/index.js.

bash
3meel --help

Authentication

Sign in with your 3meel.ai account to authenticate the CLI. Your session token is stored locally in the config file (Bearer token, same family as the Better Auth bearer plugin).

Signed in with Google?

The CLI currently uses email and password sign-in (3meel auth login). If you only use Sign in with Google, add a password once in the dashboard so the CLI can sign in the same account, or use the web app until we ship a browser-based CLI login (device flow).

Settings → Account (when logged in) is where you can set or change a password for your account.

3meel auth login

Sign in with email and password. Stores a Bearer token for future requests.

--email <email>Email address (or set THREE_MEEL_EMAIL)
--password <password>Password (or set THREE_MEEL_PASSWORD)
bash
# Interactive login
3meel auth login

# Non-interactive (CI/CD)
3meel auth login --email you@example.com --password "your-password"

# Or use environment variables
export THREE_MEEL_EMAIL="you@example.com"
export THREE_MEEL_PASSWORD="your-password"
3meel auth login
3meel auth whoami

Show the currently authenticated user and environment.

3meel auth logout

Clear the stored Bearer token for the current environment.

3meel auth env

Show the resolved API and MCP base URLs for the current environment.

Knowledge Bases

Create and manage knowledge bases. Each knowledge base holds a collection of documents that can be queried together.

3meel kb list

List all knowledge bases with their document counts and creation dates.

3meel kb create <name>

Create a new knowledge base.

<name>
required
Name for the knowledge base
3meel kb get <kbId>

Get details for a specific knowledge base.

<kbId>
required
Knowledge base UUID
3meel kb delete <kbId>

Delete a knowledge base and all its documents.

<kbId>
required
Knowledge base UUID

Documents

Upload PDFs and manage documents within a knowledge base. Documents are processed asynchronously after upload.

3meel docs upload <file> --kb <uuid>

Upload a PDF to a knowledge base. Returns a document ID you can use with the watch command.

<file>
required
Path to the PDF file
--kb <uuid>Knowledge base ID (required)
3meel docs list --kb <uuid>

List all documents in a knowledge base with their processing status.

--kb <uuid>Knowledge base ID (required)
3meel docs get <documentId>

Get details for a specific document.

<documentId>
required
Document UUID
3meel docs delete <documentId>

Delete a document.

<documentId>
required
Document UUID
3meel docs retry <documentId>

Re-queue a failed document for processing.

<documentId>
required
Document UUID (must be in failed status)

Query

Ask natural language questions against a knowledge base. Returns an answer with citations referencing specific pages and sections of your documents.

3meel query <question> --kb <uuid>

Query a knowledge base with a natural language question.

<question>
required
The question to ask
--kb <uuid>Knowledge base ID (required)
bash
3meel query "What are the key findings?" --kb kb_abc123

Watch

Poll a document's processing status until it completes or fails. Useful after uploading a PDF to wait for processing to finish.

3meel watch <documentId>

Watch document processing status until it reaches a terminal state (complete or failed).

<documentId>
required
Document UUID
-i, --interval <ms>Poll interval in milliseconds (default: 2000)

MCP helpers

These commands do not replace MCP—they help you print URLs, emit client JSON, and ping the MCP server. Running tools (query, list documents) inside Claude or Cursor still requires an MCP client configured with an API key. Full tool schemas, auth, and errors are on the MCP & API page; logged-in users can copy ready-made config from MCP configuration.

Requires an API key: --api-key or THREE_MEEL_API_KEY.

3meel mcp url --api-key <key>

Print the unified MCP endpoint URL for your API key.

--api-key <key>Account API key (rak_...) or THREE_MEEL_API_KEY
3meel mcp config <client>

Generate an MCP configuration snippet for a specific client.

<client>
required
Target client: claude, cursor, or generic
--api-key <key>Account API key (rak_...) or THREE_MEEL_API_KEY
3meel mcp test

Test connectivity to the MCP server by hitting the health endpoint.

Config

Manage the CLI configuration file and environments. The CLI supports multiple environments (local, staging, prod) with separate credentials.

3meel config show

Display the current configuration (tokens are redacted).

3meel config path

Print the path to the CLI config file.

3meel config set-default-env <name>

Set the default environment for all commands.

<name>
required
Environment name (e.g., prod, staging, local)

Global Flags

These flags can be used with any command:

FlagDescription
--env <name>Target environment: local, staging, prod, or a custom name from your config.
--jsonOutput structured JSON instead of human-readable text.
--ndjsonOutput newline-delimited JSON events (useful with the watch command).

Examples

Upload and query a document

Create a knowledge base, upload a PDF, wait for processing, then query it.

bash
# Log in
3meel auth login

# Create a knowledge base
3meel kb create "Research Papers"

# Upload a PDF (note the document ID in the output)
3meel docs upload paper.pdf --kb kb_abc123

# Wait for processing to finish
3meel watch doc_xyz789

# Query your knowledge base
3meel query "What methodology was used?" --kb kb_abc123
Scripting with JSON output

Use --json for machine-readable output that works with tools like jq.

bash
# List knowledge bases as JSON and extract IDs
3meel kb list --json | jq '.knowledgeBases[].id'

# Query and pipe the answer to another tool
3meel query "Summarize the findings" --kb kb_abc123 --json \
  | jq -r '.answer'
Generate Claude Connector URL

Generate a connector-ready MCP URL for Claude Desktop.

bash
# Set your API key
export THREE_MEEL_API_KEY="rak_your_key_here"

# Generate Claude Connector URL
3meel mcp url

# Test MCP server connectivity
3meel mcp test

For MCP tool documentation and API key details, see the API Documentation.