DeepCLI

Run, chat, and control LLM agents from one powerful command-line tool

Installation

One-line install

Run in a terminal — downloads and adds to PATH automatically:

Windows (PowerShell):

irm -useb https://deepcli.org/install.ps1 | iex

Alternative: iwr -useb https://deepcli.org/install.ps1 | iex

macOS & Linux:

curl -fsSL https://deepcli.org/install.sh | sh

With wget: wget -qO- https://deepcli.org/install.sh | sh

Then open a new terminal and run deepcli init.

Manual install

Download from GitHub Releases, then unzip and add the folder to your PATH.

Download from GitHub Releases
1
Download and unzip

Download the build for your platform: Windows (.zip), Linux (.tar.gz), or macOS Intel/Apple Silicon (.tar.gz). Unzip to a folder (e.g. C:\deepcli on Windows, ~/.local/bin on Linux/macOS).

2
Add to PATH

Windows: Add the folder to your user PATH via sysdm.cpl → Advanced → Environment Variables, or run: setx PATH "%PATH%;C:\deepcli" (replace C:\deepcli with your folder).

Linux/macOS: Add to ~/.bashrc or ~/.zshrc: export PATH="$HOME/.local/bin:$PATH"

3
Verify

Open a new terminal and run: deepcli --version

Setup

Run deepcli init once to configure DeepCLI. You'll be prompted for:

  • OpenRouter API key (required) — Get one at openrouter.ai/keys. Copy it and press Enter at the prompt to use clipboard if paste doesn't work.
  • Model — Pick from the list or type a custom model name.
  • Brave Search API key (optional) — For web search. Get one at api.search.brave.com. Press Enter to skip.
  • Custom API keys (optional) — Add name/value pairs for other integrations; the AI can use them via tools. You can skip or add later in deepcli.toml.
  • Agent name — Name your first agent (e.g., assistant).
deepcli init

Config is saved to ~/.deepcli/deepcli.toml. You can edit brave_search_api_key and [custom_api_keys] there anytime.

Web search and custom integrations

When configured, the AI can use:

  • Web search — If you set a Brave Search API key, the agent can call web_search to look up current info online.
  • Custom API keys — Keys added under [custom_api_keys] can be used via the api_request tool (Bearer auth). The agent can call list_api_keys to see which keys are available.

Core Commands

deepcli init Set up DeepCLI (OpenRouter key, model, optional Brave/custom API keys, first agent). Run this first.
deepcli chat [agent] [--project NAME] Interactive chat with an agent. Use --project to save chat history and context.
deepcli multichat [--count N] [--project NAME] Split-screen chat with multiple agents. Use --project <name> to load and save chat history. Tab to switch lanes, Enter to send.
deepcli ask <agent> "<message>" Send a single message and print the response.
deepcli model Interactively change the model for an agent.
deepcli expose --project NAME [--agent A] [--port P] Expose a project's AI as a local HTTP server with programmatic endpoints (e.g. POST /chat/ai).

Agent Commands

deepcli agent new Create a new agent interactively (prompts for name, model, workdir).
deepcli agent create <name> [--model M] [--workdir W] [--prompt P] Create a new agent with arguments.
deepcli agent set <name> [--model M] [--workdir W] [--prompt P] Update an existing agent.
deepcli agent remove <name> Remove an agent.
deepcli agent list List all agents.
deepcli agent show <name> Show agent details.

Projects

Projects allow you to maintain chat history and context across multiple sessions. When you create a project, all conversations are saved automatically, letting you reference previous discussions with AI.

deepcli project new Create a new project interactively (prompts for name, description, agent).
deepcli project create <name> Create a new project with a name.
deepcli project list List all projects.
deepcli project show <name> Show project details and chat history count.
deepcli project remove <name> Remove a project (also deletes chat history).

Using Projects

Start a project-based chat session:

deepcli chat --project my-project

This will:

  • Load previous chat history from the project
  • Save all new messages to the project's history
  • Allow the AI to reference earlier conversations in the same project

Regular chat (without --project) doesn't save history and starts fresh each time.

Multichat

Multichat opens a split-screen terminal where each agent has its own lane. Perfect for comparing outputs or brainstorming with multiple AI perspectives simultaneously.

Project mode

Use --project <name> (or -p <name>) to attach multichat to a project. You must provide the project name; --project alone is invalid.

  • Chat history for the project is loaded into all agent lanes at start.
  • Conversations are saved to the project for use in future sessions.

Keyboard Shortcuts

  • Tab — Switch to next agent lane
  • Shift+Tab — Switch to previous agent lane
  • Enter — Send message to the focused agent
  • ↑↓ — Scroll chat history
  • Esc — Quit

You can switch tabs while an agent is generating a response. Type and send messages in other lanes while one is loading.

Examples

deepcli multichat
deepcli multichat --count 3
deepcli multichat --project my-project
deepcli multichat -p my-project --count 2

Expose

Expose a project's AI agent as a local HTTP server so you can access it programmatically via REST endpoints. Useful for building apps, scripts, or integrations that chat with your AI.

Usage

deepcli expose --project <project-name> [--agent <agent>] [--port 8787] [--key <bearer-key>] [--config <path>]
  • --project (required) — Project to expose (must exist).
  • --agent — Agent to use; defaults to your first agent.
  • --port — Port to bind; defaults to 8787.
  • --key — Optional bearer key; when set, clients must send Authorization: Bearer <key>.
  • --config — Explicit config path; use if expose loads the wrong config (e.g. different user context).

401 "User not found" troubleshooting

If expose returns API error (401 Unauthorized): User not found while normal chat works, the config path may resolve differently when expose runs as a long-lived process. Try:

  • Set API key via env: DEEPCI_API_KEY or OPENROUTER_API_KEY — these override the config key and are checked on each request.
  • Point to your config: deepcli expose --project X --config C:\Users\YourName\.deepcli\deepcli.toml

Stop an expose server

deepcli stop expose --project <project-name>

Run expose 24/7 (Linux / VPS)

Closing your terminal stops the server. To keep it running forever, use these 3 steps (one-time setup).

1. Create the service file. Run:

mkdir -p ~/.config/systemd/user
nano ~/.config/systemd/user/deepcli-expose.service

Paste this (change my-project to your project name). Save: Ctrl+O, Enter, Ctrl+X.

[Unit]
Description=DeepCLI expose server
After=network.target

[Service]
Type=simple
ExecStart=/usr/local/bin/deepcli expose --project my-project --port 8787
Restart=always
RestartSec=5

[Install]
WantedBy=default.target

2. Turn it on and start it:

systemctl --user daemon-reload
systemctl --user enable deepcli-expose.service
systemctl --user start deepcli-expose.service

3. On a VPS, so it runs when you’re logged out:

loginctl enable-linger $USER

Done. Expose runs 24/7 and restarts after reboot.

Endpoints

  • GET / — Server info (project, agent, model).
  • POST /chat/ai — Send a message, get AI response. Body: {"message": "your message"}. Response: {"response": "AI reply"}.

Example

# Start server
deepcli expose --project my-project --port 8787

# In another terminal or from your app:
curl -X POST http://127.0.0.1:8787/chat/ai \
  -H "Content-Type: application/json" \
  -d '{"message": "Hello!"}'

The server binds to 0.0.0.0 so it's reachable from other machines on your network. Chat history is saved to the project.