AppXen CLI
Manage your knowledge base, run orchestrator workflows, and monitor usage — all from the terminal.
Install
One command to install:
curl -sSL https://appxen.ai/install.sh | sh Or install directly with pip:
pip install appxen Requires Python 3.10+. The installer prefers pipx for isolated installs.
Log In
Grab an API key from the AppXen Console under API Keys, then:
appxen login You'll be prompted for your key (input is hidden). The CLI validates the format and tests connectivity before saving.
Your key is stored in ~/.config/appxen/config.toml with 0600 permissions.
Ingest Documents
Upload a file or an entire directory:
# Single file
appxen ingest ./report.pdf
# Entire directory (recursive)
appxen ingest ./docs/
# Only markdown files
appxen ingest ./docs/ --glob "*.md" The CLI uploads each file, then polls until ingestion completes. Progress bars show both stages:
Found 14 file(s) to ingest.
Uploading architecture.pdf ━━━━━━━━━━━━━━━━━━━━━━━━━ 14/14
Waiting for 14 file(s) to process...
Processing architecture.pdf ━━━━━━━━━━━━━━━━━━━━━━━━ 14/14
OK 14 file(s) ingested successfully. Supported formats
Documents
.pdf, .docx, .html, .md, .txt, .csv, .json, .xml, .yaml
Code
.py, .js, .ts, .go, .rs, .java, .c, .cpp, .rb, .php, .sql, .sh
Images (OCR)
.png, .jpg, .tiff, .bmp
Search
appxen search "how does authentication work" ╭──────────── #1 auth-design.md (score: 0.847) ────────────╮
│ Authentication uses passkeys (WebAuthn) as the primary │
│ method with magic link email as a fallback... │
╰──────────────────────── chunk: a1b2c3d4 ─────────────────╯
╭──────────── #2 api-keys.md (score: 0.723) ───────────────╮
│ API keys are created in the console under MCP │
│ Gateway → Keys. Each key grants access to... │
╰──────────────────────── chunk: f6g7h8i9 ─────────────────╯
Use --top-k 20 for more results or --json for machine-readable output.
All Commands
| Command | Description |
|---|---|
appxen login | Save your API key |
appxen status | Check connectivity and gateway info |
appxen ingest <path> | Upload files or directories to the knowledge base |
appxen search <query> | Semantic search over your documents |
appxen sources | List all indexed sources |
appxen sources delete <id> | Delete a source and its chunks |
appxen stats | Show knowledge base statistics |
| Workflow Commands | |
appxen workflow list | List all workflows |
appxen workflow create <file> | Compile and save a markdown workflow |
appxen workflow compile <file> | Preview a compiled workflow without saving |
appxen workflow get <id> | Get workflow details |
appxen workflow delete <id> | Delete a workflow |
appxen workflow run <id> | Start a workflow execution with live polling |
appxen workflow status <exec_id> | Get execution status and step results |
appxen workflow output <exec_id> | Get full output of a completed execution |
appxen workflow stop <exec_id> | Stop a running execution |
Every command supports --json for scripting and --help for usage info.
Run a Workflow
Create a workflow from a markdown file, run it with inputs, and save the output:
# Compile and save a workflow
appxen workflow create ./blog-post.md --name "Blog Post Pipeline"
# Run with inputs and poll for completion
appxen workflow run wf_abc123 \
--input topic="AI in healthcare" \
--save result.md
# Check status of a running execution
appxen workflow status exec_xyz789
# Get a specific step's output
appxen workflow output exec_xyz789 --step research
Use --no-poll to start a workflow without waiting, or --save to write the output to a file on completion.
Configuration
Config file
Stored at ~/.config/appxen/config.toml:
[default]
api_key = "axgw_live_k1_..."
endpoint = "https://api.appxen.ai"
[staging]
api_key = "axgw_test_k1_..."
endpoint = "https://staging-api.appxen.ai" Switch profiles with appxen --profile staging sources
Environment variables
Override the config file for one-off commands or CI/CD:
| Variable | Description |
|---|---|
APPXEN_API_KEY | API key (highest priority) |
APPXEN_ENDPOINT | Gateway endpoint |
APPXEN_PROFILE | Default profile name |
Scripting & CI/CD
Use --json with jq for automation:
# Sync docs on every deploy
export APPXEN_API_KEY=${'{'}{'{'}secrets.APPXEN_API_KEY{'}'}
appxen ingest ./docs/ --glob "*.md"
# Get source IDs for all ready sources
appxen sources --json | jq '.sources[] | select(.status == "ready") | .source_id'
# Delete all failed sources
appxen sources --status failed --json \
| jq -r '.sources[].source_id' \
| xargs -I{'{}'} appxen sources delete {'{}'} --yes