Chat
Interactive REPL, one-shot messages, streaming responses, and full conversation history.
The official CLI for Divinci AI. Authenticate once, then manage your entire workspace — chat sessions, knowledge bases, releases, and more — directly from your terminal or CI pipeline.
Chat
Interactive REPL, one-shot messages, streaming responses, and full conversation history.
Knowledge Base
Search your RAG index, list indexed files, and check processing status.
Workspaces
List, inspect, and switch between workspaces. Set a per-project default.
Releases
View and manage your AI releases. Filter by status, inspect configuration.
Raw API Access
Make authenticated API requests without writing code — great for exploration and one-offs.
Scripting & CI/CD
Every command supports --json output. Pipe to jq, use in shell scripts, automate in pipelines.
npm install -g @divinci-ai/clipnpm add -g @divinci-ai/cliyarn global add @divinci-ai/clinpx @divinci-ai/cli <command>Authenticate
divinci auth loginYou’ll be prompted to paste your API key, which is then validated and stored securely in ~/.config/divinci/credentials.json.
Select a workspace
divinci workspace listdivinci workspace use ws_abc123Setting a default workspace means you won’t need to pass --workspace to every subsequent command.
Start chatting
divinci chatThis opens an interactive REPL session. Use /help to list session commands, /new to start a fresh conversation, and /exit to quit.
Send a one-shot message
divinci chat send <transcriptId> "What is the return policy?" --streamUse --stream to print tokens as they arrive instead of waiting for the full response.
The CLI stores credentials in ~/.config/divinci/credentials.json with 0600 permissions (readable only by your user account). Named profiles let you work across multiple environments.
# Interactive login — prompts for API key and validates itdivinci auth login
# Login to a named profile (stored alongside the default)divinci auth login --profile staging
# Check who you're authenticated asdivinci auth statusdivinci auth whoami # alias for status
# Remove stored credentialsdivinci auth logoutdivinci auth logout -y # skip confirmation promptConfiguration sources are resolved in this priority order — higher always wins:
| Priority | Source | How to set |
|---|---|---|
| 1 (highest) | CLI flags | --api-key, --workspace, --profile |
| 2 | Environment variables | DIVINCI_API_KEY, DIVINCI_WORKSPACE_ID |
| 3 | Project config file | .divinci/config.json in the current directory |
| 4 (lowest) | User credentials | ~/.config/divinci/credentials.json |
| Variable | Description |
|---|---|
DIVINCI_API_KEY | API key — required when not using auth login |
DIVINCI_WORKSPACE_ID | Default workspace for all commands |
DIVINCI_API_URL | Override API base URL (default: https://api.divinci.app) |
DIVINCI_PROFILE | Named profile to load (default: default) |
Commit a .divinci/config.json to your project to share workspace settings with your whole team:
{ "workspaceId": "ws_abc123", "apiUrl": "https://api.divinci.app"}Each developer’s personal credentials from ~/.config/divinci/credentials.json are used for the API key — the project config only sets non-secret values.
auth — Manage credentialsdivinci auth login # Prompt for API key and save itdivinci auth login --profile staging # Save to a named profiledivinci auth status # Show current auth infodivinci auth whoami # Alias for auth statusdivinci auth logout # Remove default credentialsdivinci auth logout -y # Remove without confirmationchat — Conversations# Interactive REPL (supports /help, /new, /exit)divinci chat
# Send a message to an existing conversationdivinci chat send <transcriptId> "Your message here"divinci chat send <transcriptId> "Summarize this" --stream # stream tokens
# List conversationsdivinci chat listdivinci chat list --limit 20 --offset 40
# View message history for a conversationdivinci chat history <transcriptId>divinci chat history <transcriptId> --limit 50| Flag | Description |
|---|---|
--stream | Stream response tokens as they arrive |
--limit <n> | Max results to return |
--offset <n> | Skip the first N results (for pagination) |
rag — Knowledge Base# Semantic search across your indexed contentdivinci rag search "pricing information"divinci rag search "refund policy" --limit 5 --min-score 0.7
# List all indexed filesdivinci rag filesdivinci rag files --page 2 --limit 25 --status ready
# Check the processing status of a specific filedivinci rag status <fileId>
# Source URL backlinks — the page a file links to on chat context bubblesdivinci rag set-source-url --file-id <fileId> --url https://example.com/pagedivinci rag set-source-url --file-id <fileId> --clear
# Scrape one page, or crawl a whole site, into one or more vector indexes.# --vector accepts a comma-separated list to target multiple indexes# (e.g. a Vectorize + Qdrant + PageIndex trio) in a single pass.divinci rag crawl https://example.com/docs --vector <vectorId>divinci rag crawl https://example.com --vector idA,idB,idC --multi --sitemap --limit 500
# Re-scrape stale pages after the source content changed (ignores the cache):divinci rag crawl https://example.com --vector <vectorId> --multi --force-refresh| Flag | Description |
|---|---|
--multi | Follow links from the URL (site crawl) instead of one page |
--sitemap | Discover pages via the site’s sitemap (--multi) |
--limit <n> | Max pages in --multi mode |
--force-refresh | Re-fetch every page from its URL, ignoring the cached copy. Use when the source content (or the scraper) changed and you need fresh content. |
--ignore-saved | Incremental crawl — skips pages already saved for this host (only fetches new paths). Does not refresh stale pages; use --force-refresh for that. |
--wait | Poll until indexed, then run a retrieval-health self-check on the result |
| Flag | Description |
|---|---|
--limit <n> | Max results |
--min-score <f> | Minimum relevance score (0–1), e.g. 0.7 |
--page <n> | Page number for file listing |
--status <s> | Filter files by status: ready, processing, error |
release — Releases# List and inspectdivinci release listdivinci release list --status active --limit 10divinci release get <releaseId>
# Create — blank, or fork an existing releasedivinci release create --name "My Release"divinci release create --name "Arena variant" --from <releaseId> --assistant-id <toolId>
# Create pre-configured with tools discovered from an MCP serverdivinci release create-from-mcp --url https://mcp.example.com --name "MCP Release"
# Update (GET-then-merge; safe for single-field changes)divinci release update <releaseId> --name "Renamed"divinci release update <releaseId> --require-signed-anonymous-chatdivinci release update <releaseId> --fallback-assistants '[{"id":"...","finetune":false}]'
# Lifecycledivinci release publish <releaseId>divinci release delete <releaseId>
# Clone across workspacesdivinci release clone <releaseId> --to-workspace <id> --name "Copy"| Flag | Description |
|---|---|
--status <s> | (list) Filter by status: active, draft, archived |
--limit <n> | (list) Max results |
--name <name> | (create, required) Release name |
--from <releaseId> | (create) Fork an existing release — copies RAG, moderation, prefixes, assistant config |
--assistant-id <toolId> | (create --from) Override the forked release’s AI Model selection |
--url <url> | (create-from-mcp, required) MCP server URL to discover tools from |
--fallback-assistants <json> | (update) Ordered fallback model chain |
--require-signed-anonymous-chat / --no-… | (update) Toggle the anonymous-chat HMAC requirement |
--rerank-max-chunks <n> | (update) Cap RAG chunks after merge-rerank |
--ai-gateway / --no-ai-gateway | (update) Toggle Cloudflare AI Gateway routing |
--response-cache / --response-cache-ttl <s> | (update) Public response cache controls |
--to-workspace <id> | (clone, required) Destination workspace |
--rag-id-map <json> / --rag-id-map-file <path> | (clone) Remap RAG vector ids in the copy |
update also exposes context-cache (--context-cache-mode, --context-cache-ttl-minutes,
--adaptive-ttl, --no-cache-system-prompt), RAG-trigger (--rag-trigger,
--rag-trigger-min-chars), and product sub-reply flags — run
divinci release update --help for the full set.
terms — Terms of ServiceView/accept a release’s ToS, and author the workspace’s versioned ToS documents.
# Consumer side: check the gate, then acceptdivinci terms show <releaseId>divinci terms accept <releaseId>
# Authoring side: draft → publish (publishing bumps the version;# EVERY user must re-accept before chatting again)divinci terms listdivinci terms create --title "Terms" --file ./terms.mddivinci terms get <tosId>divinci terms update <tosId> --file ./terms-v2.mddivinci terms publish <tosId>workspace — WorkspacesAvailable via both workspace and the shorter ws alias.
# List available workspacesdivinci workspace listdivinci ws list --limit 50
# Inspect a specific workspacedivinci workspace get <workspaceId>
# Set the default workspace for all subsequent commandsdivinci workspace use <workspaceId>api — Raw API RequestsMake authenticated HTTP requests to any Divinci API endpoint. Useful for exploring endpoints or accessing features not covered by a dedicated command.
# GET requestdivinci api GET /v1/workspace
# POST with a JSON bodydivinci api POST /v1/chat/message --body '{"content": "Hello"}'
# Pass query parametersdivinci api GET /v1/files --param limit=10 --param status=ready
# Pass custom headersdivinci api GET /v1/workspace --header "X-Custom-Header: value"config — Workspace configurationRead or update the current workspace’s title and description without leaving the terminal.
divinci config getdivinci config set-title "Acme Support Bot"divinci config set-description "Customer-facing support assistant for orders, returns, and product questions."group — User group managementManage user groups within a workspace and invite or remove members. Useful for sharing access with a team.
divinci group listdivinci group get <groupId>divinci group create --name "Engineering"divinci group update <groupId> --name "Platform Engineering"divinci group delete <groupId>
# Invite a user to a groupdivinci group invite <groupId> --email user@example.com
# Remove a user from a groupdivinci group remove-user <groupId> --user <userId>permissions — Permission managementInspect and edit who can do what within a workspace. Permissions can be granted to users, groups, all-logged-in-users, or anonymous visitors.
# List effective permissions on a resourcedivinci permissions list --resource <resourceId>
# Show your own effective permissionsdivinci permissions mine
# Grant or revoke a permissiondivinci permissions grant --resource <resourceId> --principal <userOrGroupId> --role editordivinci permissions revoke --resource <resourceId> --principal <userOrGroupId>byok — Bring-your-own-key credentialsManage provider credentials per workspace (OpenAI, Anthropic, Neo4j, etc.). Secrets are write-only — listed entries show metadata, never the secret value.
divinci byok listdivinci byok get <credentialId>divinci byok create --provider openai --key sk-...divinci byok rotate <credentialId> --key sk-...divinci byok delete <credentialId>api-key — Workspace API keysLong-lived workspace tokens for daemons and CI. Creation and rotation print the secret exactly once — store it immediately.
divinci api-key listdivinci api-key create --name "GitHub Actions"divinci api-key rotate <keyId>divinci api-key delete <keyId>
# Configure per-key request limitsdivinci api-key request-limit <keyId> --max-rpm 60 --max-rpd 10000admin — Platform-admin operationsRequires the platform-admin role server-side. Most workspace users will see authorization errors here — that’s expected.
# Review pending rate-limit upgrade requestsdivinci admin rate-limit-requests listdivinci admin rate-limit-requests list --status pending
# Approve or deny a specific requestdivinci admin rate-limit-requests decide <requestId> --status approveddivinci admin rate-limit-requests decide <requestId> --status denied --reason "abuse risk"training-data — Generate training data from RAGGenerate, list, monitor, and export synthetic training examples derived from your indexed RAG content. Useful as input for qa and fine-tune workflows.
divinci training-data generate --rag <ragVectorId>divinci training-data listdivinci training-data status <jobId>divinci training-data export <jobId> --format jsonl --out ./out.jsonldivinci training-data export-to-rag <jobId> --rag <ragVectorId>divinci training-data delete <jobId>qa — Quality assurance test suitesBuild, run, and inspect QA test suites against any release. Subdivides into suites (definitions), runs (executions), and tests (cases).
# Suite managementdivinci qa suites listdivinci qa suites get <suiteId>divinci qa suites set-scorers <suiteId> --scorers exactMatch,llmJudge
# Run a suite (single or multi-release)divinci qa run <suiteId> --release <releaseId>divinci qa multi-release-run <suiteId> --releases rel_a,rel_bdivinci qa estimate-run <suiteId> # dry-run cost estimatedivinci qa arena-run <suiteId> --preset <presetId> # head-to-head arena style
# Browse run resultsdivinci qa runs list --suite <suiteId>divinci qa runs get <runId>divinci qa runs cancel <runId>
# Test casesdivinci qa tests generate-tests <suiteId> --count 20divinci qa augment-training-set <suiteId>divinci qa calibrate <suiteId>
# Train + snapshot helpersdivinci qa train-from-run <runId> --out <trainingDataId>divinci qa snapshot-rag-group --rag <ragVectorId>divinci qa backfill-release-snapshots <releaseId>
# Import / export, ratings, winner picksdivinci qa copy-suite-from <sourceSuiteId> --to <targetWorkspaceId>divinci qa export <suiteId> --out ./suite.jsondivinci qa import ./suite.jsondivinci qa regenerate <runId>divinci qa winner-pick <runId> --winner <variant>divinci qa list-ratings <runId>divinci qa list-winner-picks <runId>divinci qa export-edited-responses <runId> --out ./edits.jsonlfine-tune — Fine-tuning lifecycleCreate, start, and monitor fine-tune jobs. Pair with training-data and qa export-to-qa for an end-to-end training pipeline.
divinci fine-tune listdivinci fine-tune get <jobId>divinci fine-tune create --base-model <model> --training-data <dataId>divinci fine-tune start <jobId>divinci fine-tune status <jobId>divinci fine-tune cancel <jobId>divinci fine-tune delete <jobId>
# Cross-feed: fine-tune outputs ↔ QA pipelinedivinci fine-tune export-to-qa <jobId> --suite <suiteId>divinci fine-tune copy-from <sourceJobId>audio — Audio transcript managementUpload and manage audio assets, then turn transcripts into RAG content.
divinci audio listdivinci audio get <audioId>
# Get a signed upload URL for direct PUTdivinci audio upload-url --content-type audio/mpeg
divinci audio delete <audioId>
# Generate a RAG document from an audio transcriptdivinci audio generate-rag <audioId> --rag <ragVectorId>style-pattern — Per-workspace style rulesMirror of the Divinci Agent’s stylePattern* tools. Manage approved, proposed, and edit-captured style rules that shape model output. Includes a training-run subsurface for promoting captured edits into a fine-tune dataset.
# Rulesdivinci style-pattern listdivinci style-pattern list-proposeddivinci style-pattern list-editsdivinci style-pattern test-rewrite --text "..." --rule <ruleId>divinci style-pattern approve <proposedId>divinci style-pattern reject <proposedId>divinci style-pattern toggle <ruleId>divinci style-pattern audit
# Training runs (capture → export → transition)divinci style-pattern training-run-createdivinci style-pattern training-run-listdivinci style-pattern training-run-export <runId> --out ./run.jsonldivinci style-pattern training-run-transition <runId> --to readyarena-preset — Arena preset managementConfigure the side-by-side variants used by qa arena-run and the arena UI.
divinci arena-preset listdivinci arena-preset export <presetId> --out ./preset.jsondivinci arena-preset clone <sourcePresetId> --to <newName>divinci arena-preset update-variant <presetId> --variant A --model gpt-4onotifications — Notifications & deliveryWorkspace notifications plus delivery channels (email/webhook) and tag-routing triggers. See Observability for the full pipeline.
divinci notifications list --unreaddivinci notifications countsdivinci notifications mark-read <notificationId>
# Delivery channels — where notifications get sentdivinci notifications channels create --name "Ops" --webhook-url https://ops.example.com/hook --webhook-secret <32+ chars>divinci notifications channels create --name "On-call" --email oncall@example.comdivinci notifications channels verify <channelId> # email channelsdivinci notifications channels test <channelId>divinci notifications channels logs <channelId> # webhook delivery logs
# Delivery triggers — tag → channel routingdivinci notifications triggers create --title "Escalations" --any-tags urgent --channels <channelId>flagger — Custom notification flaggersLLM-driven custom notifications: a flagger evaluates chat traffic with your prompt and raises a tagged notification when it flags.
divinci flagger create \ --title "Refund detector" \ --assistant gemini-3-5-flash \ --prefix 'Does this ask for a refund? Reply {"flagged": boolean}' \ --output-keys flagged --tags refund,urgent --flag-input
divinci flagger test <flaggerId> "I want my money back!" # dry-run (billed)divinci flagger listdivinci flagger delete <flaggerId>feedback — Message feedback# List feedback (paginated, filtered)divinci feedback listdivinci feedback list --release <id> --sentiment negative --has-text
# Aggregate stats (sentiment / source / per-release breakdown)divinci feedback stats
# Inspect a single recorddivinci feedback get <feedbackId>| Flag | Description |
|---|---|
--release <id> | Filter to one release |
--sentiment <s> | Filter by sentiment |
--source <s> | Filter by feedback source |
--has-text | Only feedback with a text comment |
--created-after <ms> / --created-before <ms> | Time-range filter (epoch ms) |
--page <n> / --limit <n> | Pagination |
analytics — Product analyticsMetrics, trends, per-product performance, A/B experiments, and the conversion funnel for your AI releases.
divinci analytics metrics --time-range 7ddivinci analytics trends --granularity dailydivinci analytics performance --sort-by ctr --limit 25divinci analytics experiments --status runningdivinci analytics funnelmetrics — Pipeline telemetry & alertsPer-node latency/error/throughput metrics, CSV export, and custom alert configurations routed to in-app, email, or webhook channels.
divinci metrics pipeline <pipelineId> --time-range 24hdivinci metrics export <pipelineId> --format csv
divinci metrics alerts list <pipelineId>divinci metrics alerts set <pipelineId> --node-type embedding --metric errorRate \ --warning 0.05 --critical 0.2 --webhook https://ops.example.com/alertdivinci metrics alerts ack <pipelineId> <alertId>
divinci metrics usage <orgName> # API-key usage statsdivinci metrics billing-report # BYOK vs wallet comparisontrust — TrustBench (v1 skeletons)divinci trust benchmarks # List available benchmark definitionsdivinci trust run <benchmarkId> # Execute a benchmark run (skeleton)divinci trust list # List your recent runsdivinci trust verify <runId> # Verify a signed run logThese flags work with every command:
| Option | Description |
|---|---|
--api-key <key> | Override the API key for this single invocation |
--workspace <id> | Override the workspace ID |
--profile <name> | Use a named profile (default: default) |
--api-url <url> | Override the API base URL |
--json | Output raw JSON — great for scripting |
--no-color | Disable ANSI color codes |
--quiet | Suppress informational output |
--verbose | Print debug information |
Every command supports --json for machine-readable output, making the CLI composable with standard Unix tools.
# Extract workspace IDsdivinci workspace list --json | jq '.[].id'
# Get the top RAG search resultdivinci rag search "shipping policy" --workspace "$WORKSPACE_ID" --json | jq '.[0].content'
# Check a file's indexing status in a scriptSTATUS=$(divinci rag status "$FILE_ID" --workspace "$WORKSPACE_ID" --json | jq -r '.status')if [ "$STATUS" = "ready" ]; then echo "File is indexed and ready"fi--workspace in automationdivinci workspace use <id> writes the default workspace to a shared,
mutable config file (~/.config/divinci/credentials.json). Any other
process on the same machine — a teammate’s shell, a second CI job, an AI
agent session — can change it between your commands, silently pointing the
rest of your script at the wrong workspace.
# ❌ Fragile in automation — the default can change under you mid-scriptdivinci workspace use ws_abc123divinci rag files --json
# ✅ Deterministic — every invocation names its workspacedivinci rag files --workspace ws_abc123 --jsonReserve workspace use for interactive shells. In scripts, CI, and agent
sessions, pass --workspace <id> (or set DIVINCI_WORKSPACE_ID in an
isolated environment) on every command.
Use environment variables — never divinci auth login — in automated environments:
export DIVINCI_API_KEY="dv_key_..."export DIVINCI_WORKSPACE_ID="ws_abc123"
# Now all commands authenticate automaticallydivinci rag search "deployment checklist" --jsondivinci release list --status active --jsonKeep separate profiles for different environments:
# One-time setupdivinci auth login --profile devdivinci auth login --profile production
# Use a specific profile per commanddivinci workspace list --profile productiondivinci rag search "docs" --profile dev
# Or switch the active profile for a sessionexport DIVINCI_PROFILE=productiondivinci release listError: No API key found
Run divinci auth login to store credentials, or set the DIVINCI_API_KEY environment variable.
Error: No workspace set
Run divinci workspace list to find your workspace ID, then divinci workspace use <id> to set a default — or pass --workspace <id> to individual commands.
Error: Unauthorized (401)
Your API key may be invalid or revoked. Run divinci auth status to check, then divinci auth login to re-authenticate with a fresh key from the dashboard.
Error: Workspace not found (404)
The workspace ID stored as your default may no longer exist. Run divinci workspace list to see current workspaces and update with divinci workspace use <id>.
divinci: command not found
The global install directory isn’t in your $PATH. Run npm bin -g (or pnpm root -g) to find where global binaries are installed, then add that directory to your shell’s $PATH.