Skip to main content
Dari runs an agent project as a hosted API. Use the dari CLI to create a starter project, publish new versions, manage organization API keys and credentials, and send messages to deployed agents. For a guided first run, start with Quickstart.

Install

curl -fsSL https://raw.githubusercontent.com/mupt-ai/dari-cli/main/install.sh | bash
This installs the native macOS/Linux binary for your CPU. To choose a destination, set DARI_INSTALL_DIR, for example:
curl -fsSL https://raw.githubusercontent.com/mupt-ai/dari-cli/main/install.sh | DARI_INSTALL_DIR="$HOME/bin" bash
You can also download a native release archive from GitHub Releases. Most commands require dari auth login first. The CLI talks to https://api.dari.dev. In this reference, an agent is a project described by dari.yml. Deploying creates a new agent version. A session is one durable conversation with an agent, pinned to the agent version that was active when the session started. The sandbox is the isolated runtime where the agent runs tools and code. Skills are reusable instructions packaged with an agent. An organization owns agents, API keys, and stored credentials. For headless use, set DARI_API_KEY instead of using browser login. When this environment variable is present, supported commands use it as the bearer token and ignore cached login state. Commands that do not list an --api-key flag, such as dari agent list, still read DARI_API_KEY from the environment.
export DARI_API_KEY=dari_...
Create a key from a logged-in shell with dari api-keys create --name ci. API-key auth works for deploy, agent, and session commands; org management, API-key management, and stored credential management require an interactive login.

Init

dari init [directory]
dari credentials add DARI_API_KEY
dari init recursive-agent --recursive
Scaffolds a new Dari agent project in the target directory (defaults to .). --recursive creates an agent with the Dari CLI and a skills/dari playbook so it can deploy copies of itself and start child sessions. Recursive agents read DARI_API_KEY from a stored runtime credential; the key is not written to dari.yml.
FlagDescription
--nameProject name for dari.yml (defaults to the directory name)
--skillName of the example skill to create under skills/ (default: review, or recursive-delegation with --recursive)
--recursiveScaffold an agent that can use Dari from its sandbox to create child agents/sessions. Store the key with dari credentials add DARI_API_KEY.
--forceOverwrite existing files in the target directory

Auth

dari auth login      # browser login, caches org key locally
dari auth logout     # clear local login state
dari auth status     # show current login and org

Org

dari org list
dari org create <name>
dari org switch <organization>                        # slug or id
dari org members
dari org invite <email> [--role owner|admin|member]   # default: member

Deploy

dari deploy [repo_root]
Packages the checkout and publishes a new agent version.
FlagDescription
--api-keyBearer token for the API (falls back to $DARI_API_KEY or the cached CLI login)
--agent-idPublish to a specific agent instead of resolving by name (falls back to $DARI_AGENT_ID)
--dry-runBuild the local bundle and print the publish flow without uploading
--quietSuppress per-stage progress on stderr

API Keys

dari api-keys list
dari api-keys create --name <name> [--scope platform|routing]
dari api-keys revoke <key_id>

Credentials

Stored secrets that agent projects reference by name. You only need these for explicit bring-your-own-key fields (llm.api_key_secret, sandbox.provider_api_key_secret) or names listed under sandbox.secrets; omitted provider key fields use Dari-managed defaults.
dari credentials list
dari credentials add <name> [value]   # prompts if value omitted
dari credentials add <name> --value-stdin < secret.txt
dari credentials remove <name>

Agent

Agent commands require DARI_API_KEY or a prior dari auth login.
dari agent list                                      # list deployed agents
dari agent delete <agent_id> [--yes]                 # soft-delete
dari agent webhook get <agent_id>                    # show webhook config
dari agent webhook set <agent_id> <webhook_url>      # configure agent webhooks
# add --event <type> one or more times to opt into lifecycle events
dari agent webhook rotate-secret <agent_id>          # rotate webhook signing secret
dari agent webhook clear <agent_id>                  # remove webhook config
See Webhooks for payloads, signature verification, and result submission.

Session

Drive a conversation with a deployed agent. A session is one durable conversation pinned to the agent version that was active when the session was created.
dari session create --agent <agent_id>
dari session create --agent <agent_id> --secret-env INTERNAL_API_TOKEN
dari session create --agent <agent_id> --llm-api-key-env OPENROUTER_API_KEY
dari session create --agent <agent_id> --internet-access
dari session get <session_id>
dari session send <session_id> <text>          # or --stdin < message.txt
dari session send --agent <agent_id> <text>    # creates a new session first
dari session events <session_id> [--limit N]
Use dari session send --agent <agent_id> <text> when you want to start a new conversation and send the first message in one command. The response includes session.id, which you can reuse for later send, events, or get commands. Use --secret NAME=VALUE to pass a literal value, or --secret-env NAME to read the value from the current shell environment, for values that should be available to sandbox code for this session. The agent’s manifest must list the name under sandbox.secrets for the sandbox to receive it. These flags work on session create and on session send --agent when it creates the session. Use --llm-api-key to pass a literal provider key, or --llm-api-key-env to read the provider key from the current shell environment, for one session. That key is used only for model calls and is not exposed to sandbox code. Use --internet-access or --no-internet-access to override whether the execution sandbox can reach the public internet for one session. If neither flag is set, Dari uses sandbox.internet_access from the agent manifest, which defaults to false.