> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cruq.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# CLI

> The cruqai command-line interface.

Install with `pip install cruqai`. Authenticate with `cruqai login` or the
`CRUQAI_API_KEY` / `CRUQAI_BASE_URL` environment variables.

## Agents & runs

| Command                         | Description                                     |
| ------------------------------- | ----------------------------------------------- |
| `cruqai run <agent> "<text>"`   | Run an agent and stream its tool-call trace.    |
| `cruqai runs`                   | List recent runs.                               |
| `cruqai trace <run-id>`         | Show a run's persisted trace.                   |
| `cruqai push <file.py>`         | Compile an authoring file and publish an agent. |
| `cruqai dev <file.py> "<text>"` | Run an agent locally, in-process.               |
| `cruqai serve <file.py>`        | Expose `@tool` functions over MCP.              |

## Knowledge

| Command                                            | Description                      |
| -------------------------------------------------- | -------------------------------- |
| `cruqai knowledge list`                            | List knowledge bases.            |
| `cruqai knowledge create <name>`                   | Create a knowledge base.         |
| `cruqai knowledge add-doc <kb> --title T --file F` | Ingest a document.               |
| `cruqai knowledge search "<query>"`                | Semantic search over chunks.     |
| `cruqai knowledge delete <name>`                   | Delete a base and its documents. |

## Memory

| Command                          | Description           |
| -------------------------------- | --------------------- |
| `cruqai memory add "<fact>"`     | Store a memory.       |
| `cruqai memory search "<query>"` | Recall memories.      |
| `cruqai memory list`             | List stored memories. |

## Guardrails & prompts

| Command                                      | Description                |
| -------------------------------------------- | -------------------------- |
| `cruqai guardrails apply <name> --kind ...`  | Create/update a guardrail. |
| `cruqai guardrails list`                     | List guardrails.           |
| `cruqai prompts apply <name> --template ...` | Create/update a prompt.    |
| `cruqai prompts list`                        | List prompts.              |
