Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.docex.dev/llms.txt

Use this file to discover all available pages before exploring further.

Setup

The docex setup command is the primary onboarding path. It authenticates via GitHub, provisions a prepaid wallet, and returns a scoped API key. Human approval is only required for the wallet top-up.

Command

docex setup --use-case "vision analysis for security scanning" --framework auto --top-up 5 --json

Flags

FlagRequiredDescription
--use-caseYesDescription of your workflow. Used for workspace labeling.
--frameworkNoauto, next, or node. Defaults to auto.
--top-upNoUSD wallet recharge amount. Defaults to 5.
--base-urlNoAPI base URL. Defaults to http://localhost:4000.
--jsonNoOutput machine-readable JSON instead of human text.

Flow

1

Agent runs setup

The agent executes docex setup --json and receives a pending setup session with an approval URL.
2

Human approves

The human opens the approval URL, signs in with GitHub, and approves the wallet top-up.
3

Agent receives credentials

The agent polls the setup session. Once approved, it receives DOCEX_API_KEY and DOCEX_BASE_URL.
4

Agent wires the app

The agent exports the credentials to environment variables and scaffolds the integration.

Output example

{
  "status": "approved",
  "apiKey": "dx_live_xxxxxxxxxxxx",
  "baseUrl": "https://api.docex.dev",
  "walletBalanceUsd": 5.00
}
The API key is shown once during setup. Store it immediately in environment variables or a secrets manager.

Local development

Without Stripe secrets, checkout is mocked and the setup session is approved immediately. This is useful for testing and offline development.
export DOCEX_BASE_URL="http://localhost:4000"
npx docex setup --use-case "local testing" --top-up 5 --json