Metadata-Version: 2.5
Name: cade-cli
Version: 0.23.5
Summary: Cade - The CLI Agent from Arcade.dev (install: curl -fsSL https://arcadeagent.dev/install | sh)
Project-URL: Homepage, https://arcade.dev
Project-URL: Documentation, https://arcadeagent.dev/docs
Project-URL: Install, https://arcadeagent.dev/install
Project-URL: Repository, https://github.com/arcadeai-labs/cade
Project-URL: Issues, https://github.com/arcadeai-labs/cade/issues
Project-URL: Changelog, https://github.com/arcadeai-labs/cade/releases
Author-email: "Arcade AI Inc." <dev@arcade.dev>
License: MIT License
        
        Copyright (c) 2024 Arcade AI Inc.
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Keywords: agent,ai,arcade,cli,coding-assistant,llm,mcp
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development
Classifier: Topic :: Software Development :: Code Generators
Classifier: Typing :: Typed
Requires-Python: >=3.11
Requires-Dist: anthropic<1.0.0,>=0.34.0
Requires-Dist: arcade-core<5.0.0,>=4.7.0
Requires-Dist: arcade-mcp-server<2.0.0,>=1.22.0
Requires-Dist: arcade-tdk<4.0.0,>=3.8.0
Requires-Dist: arcadepy<2.0.0,>=1.10.0
Requires-Dist: authlib<2.0.0,>=1.6.0
Requires-Dist: cryptography>=43.0.0
Requires-Dist: filelock<4.0.0,>=3.0.0
Requires-Dist: html2text>=2024.2.26
Requires-Dist: httpx<1.0.0,>=0.27.0
Requires-Dist: keyring<26.0,>=24.0
Requires-Dist: openai<2.0.0,>=1.0.0
Requires-Dist: pathspec<1.0.0,>=0.12.0
Requires-Dist: prompt-toolkit<4.0.0,>=3.0.52
Requires-Dist: pydantic[email]<3.0.0,>=2.0.0
Requires-Dist: pyyaml<7.0,>=6.0
Requires-Dist: rich<14.0.0,>=13.0.0
Requires-Dist: toml<1.0.0,>=0.10.0
Requires-Dist: typer>0.10.0
Requires-Dist: ulid==1.1
Provides-Extra: build
Requires-Dist: pyinstaller<7.0.0,>=6.16.0; extra == 'build'
Provides-Extra: dev
Requires-Dist: mcp<2.0.0,>=1.20.0; extra == 'dev'
Requires-Dist: mypy<2.0.0,>=1.10.0; extra == 'dev'
Requires-Dist: pytest-asyncio<1.0.0,>=0.24.0; extra == 'dev'
Requires-Dist: pytest-cov<5.0.0,>=4.0.0; extra == 'dev'
Requires-Dist: pytest-mock<4.0.0,>=3.11.0; extra == 'dev'
Requires-Dist: pytest<9.0.0,>=8.0.0; extra == 'dev'
Requires-Dist: ruff<1.0.0,>=0.5.0; extra == 'dev'
Provides-Extra: docs
Requires-Dist: mkdocs-material<10.0.0,>=9.5.0; extra == 'docs'
Requires-Dist: mkdocs<2.0.0,>=1.6.0; extra == 'docs'
Provides-Extra: otel
Requires-Dist: opentelemetry-api<2.0.0,>=1.27.0; extra == 'otel'
Requires-Dist: opentelemetry-exporter-otlp-proto-grpc<2.0.0,>=1.27.0; extra == 'otel'
Requires-Dist: opentelemetry-exporter-otlp-proto-http<2.0.0,>=1.27.0; extra == 'otel'
Requires-Dist: opentelemetry-sdk<2.0.0,>=1.27.0; extra == 'otel'
Provides-Extra: training
Requires-Dist: accelerate>=0.27.0; extra == 'training'
Requires-Dist: safetensors>=0.4.2; extra == 'training'
Requires-Dist: torch>=2.1.0; extra == 'training'
Requires-Dist: transformers>=4.38.0; extra == 'training'
Provides-Extra: voice
Requires-Dist: mlx-audio<0.4.0,>=0.2.0; extra == 'voice'
Requires-Dist: mlx-whisper>=0.1.0; extra == 'voice'
Requires-Dist: numpy>=1.24.0; extra == 'voice'
Requires-Dist: sounddevice<1.0.0,>=0.5.5; extra == 'voice'
Requires-Dist: webrtcvad>=2.0.10; extra == 'voice'
Description-Content-Type: text/markdown

# Cade

**cade is the terminal for your [Agent Arcade](https://app.arcadeagent.dev)
agents, and the runtime Agent Arcade computers can run.**

In a terminal, cade chats with the agents you build in Agent Arcade — their
instructions, skills, model, apps, knowledge and ask-first rules — and works
on your files. In an editor (Cursor, Claude Code, VS Code), `cade mcp serve`
gives the same agent to the editor's assistant. On an Agent Arcade computer,
`cade runtime` runs the agent headless, one step at a time or many
conversations at once.

```bash
curl -fsSL https://arcadeagent.dev/install | sh
cade login
cade
```

That is the **recommended install**: a prebuilt binary from
[arcadeagent.dev](https://arcadeagent.dev/install), no Python toolchain. The
first `cade` signs you in if you haven't, has you pick a project and an agent
(one of yours or a Library template), and starts a chat. Re-run the curl to
upgrade.

New here? The [Quickstart](docs/quickstart.md) is the shortest path to a
working session; [Connect Cade to your AI app](docs/use-in-cursor.md) is the
same thing without a terminal. Everything else is in [docs/](docs/index.md).

---

## Highlights

- **Agent Arcade in the terminal.** `cade agents use arcade` chats with the
  console's own assistant: list, build, run and schedule your agents, connect
  knowledge and channels, and see what ran. It asks before it changes
  anything.
- **Your Agent Arcade agents.** Cade runs the agents you build in the console
  (or take from the Library): their instructions, files, skills, model and
  tools. The agent's workspace access decides which local tools
  (files, shell, git, search, tasks) it gets.
- **Ask first.** Before a changing action the agent's settings ask about —
  sending a message, changing an app, a local write or command — cade shows a
  card built from the call's own arguments: **Yes, go ahead** or **Don't do it**.
- **Apps, knowledge and delegation.** The agent's Arcade apps through its app
  gateway, its knowledge bases (`Knowledge_Search`), its skills, and
  `Agents_List` and `Agents_Delegate` to see your other agents and ask one.
- **Knowledge and schedules from the terminal.** `cade knowledge add` uploads
  folders through a safe path that shows its plan first; `/schedule` and
  `cade schedules` run an agent at set times on Agent Arcade.
- **Edit and publish.** `cade agents edit` gives you a local working copy of
  the agent's definition to try in chat; `cade agents publish` posts it as the
  next version.
- **In your editor.** `cade mcp serve` gives Cursor, Claude Code and VS Code
  `Cade_Ask`; the agent's ask-first cards appear as the editor's own prompts.
- **On Agent Arcade computers.** `cade runtime run` and `cade runtime serve`
  are a headless harness with a typed event stream
  ([runtime protocol](docs/runtime-protocol.md)), shipped as a `cade-runtime`
  build.
- **Models through Agent Arcade.** Every model call goes through Agent
  Arcade's model gateway; `/model` switches between the models your project
  may use.

---

## Install

### Recommended (macOS + Linux)

```bash
curl -fsSL https://arcadeagent.dev/install | sh
```

The script detects your OS/arch, downloads the matching prebuilt binary
(macOS arm64, Linux x64), verifies its checksum, drops `cade` in
`~/.local/bin`, and registers Cade with the editors it finds
(`cade mcp install-hosts`). Pin a version or install location:

```bash
CADE_VERSION=0.23.0 CADE_INSTALL_DIR=/usr/local/bin \
  sh -c "$(curl -fsSL https://arcadeagent.dev/install)"
```

### Alternatives

| Source | Command | When |
|---|---|---|
| uv | `uv tool install cade-cli` | Prefer a PyPI-managed tool venv |
| pip | `pip install cade-cli` | Windows, or no curl install |
| From source | `git clone … && uv sync` | Contributing / hacking on Cade |

(Windows: grab the `.zip` from the [releases](https://github.com/arcadeai-labs/cade/releases) page, or `pip install cade-cli`.)

**To run Cade you need** an Agent Arcade account. Sign in with `cade login`;
that sign-in covers models too. Scripts and CI set `ARCADE_API_KEY` to an
Arcade project key (`arc_…`) instead.

```bash
cade login              # sign in to Agent Arcade (browser)
cade agents             # your agents
cade agents use <name>  # pick the one chat runs
```

Full install and first-run docs: [`docs/install.md`](./docs/install.md) and
[`docs/quickstart.md`](./docs/quickstart.md).

### Upgrading from 0.22

0.23.0 replaces local agents, the daemon, the notes library and cron with
Agent Arcade. The first run offers to remove the old daemon service, rewrites
editor entries that pointed at it, offers to add your old notes folders to
your knowledge, and says once what moved. It deletes nothing you made. See
[Installation → Upgrading from 0.22](docs/install.md#upgrading-from-022).

---

## Quick start

```bash
cade login                                 # sign in to Agent Arcade
cade agents use <name>                     # pick an agent (or let `cade` ask)
cade                                       # interactive chat
cade -r                                    # resume the most recent thread
cade -m "What changed in HEAD?"            # single message, then exit
git diff | cade -m "Review this diff"      # prompt + stdin
cade --voice                               # speak / hear (macOS binary; or cade-cli[voice])
```

`cade --help` shows `chat`, `login`, `logout`, `whoami`, `agents`,
`knowledge`, `schedules`, `mcp`, `account` and `projects`.

### In-chat slash commands

| Command | Description |
|---|---|
| `/help` | List commands (and the agent's workflows) |
| `/agent [name]` | Switch agent (starts a new thread) |
| `/model [list\|name]` | Switch to another model your project may use |
| `/knowledge [query]` | The agent's knowledge bases, or search them |
| `/schedule "<when>" <goal>` | Run the agent at set times on Agent Arcade |
| `/edit`, `/publish` | Edit the agent in a working copy; publish it |
| `/compact` | Compact the context window now |
| `/thread`, `/history`, `/usage` | Thread info and context usage |
| `/tasks`, `/hooks`, `/notify` | Tasks, hooks and notifications |
| `/tools`, `/logs` | Tools available; recent log entries |
| `/cd`, `/pwd`, `/!` | Shell shortcuts |
| `/exit`, `Ctrl+C` | Exit |

---

## Tools

Tools come from the agent's definition:

- **`Local_*`** — built in: files (`ReadFile`, `WriteFile`, `Edit`,
  `ListFiles`), `Bash`, `Search`, `Git`, `Task`, `AskUserQuestion`,
  `WebFetch`, `WebSearch` and a few more. The agent's **workspace access**
  decides which: `none` gets no file or shell tools, `read` adds reading and
  searching, `read_write` adds editing, writing and `Bash`.
- **The agent's apps** — through its Arcade app gateway, signed in as you.
- **The agent's remote tool servers** — the MCP servers its definition lists;
  secret headers come from your OS keychain by name.
- **Platform tools** — `Knowledge_Search`, `Knowledge_ReadSource`,
  `Skill_Load`, `Agents_List` and `Agents_Delegate`.

```bash
cade agents tools list                   # the active agent's tools
cade agents tools info Local_ReadFile    # one tool's schema
```

Details: [`docs/mcp.md`](./docs/mcp.md).

---

## Agents, knowledge and schedules

```bash
cade agents                          # your project's agents
cade agents library                  # ready-to-go templates
cade agents use "Release Helper"     # pick one (or library:<id>)
cade agents show                     # model, apps, knowledge, skills, access
cade agents edit                     # a local working copy; chat runs it
cade agents publish                  # post it as the next version

cade knowledge                       # knowledge bases you can see
cade knowledge add ~/Notes           # upload a folder (shows the plan, asks)
cade knowledge sync                  # re-upload what changed

cade schedules create "every weekday at 8:30" "Summarise yesterday's PRs"
```

Details: [Agents](docs/agents.md), [Knowledge](docs/knowledge.md),
[Hooks, tasks & schedules](docs/automation.md).

---

## Editors: `cade mcp serve`

`cade mcp install-hosts` registers Cade with Claude Desktop, Cursor, Claude
Code, OpenCode, Windsurf and VS Code. Each host starts `cade mcp serve` itself
over stdio, so nothing has to be running beforehand. The host gets
`Cade_Ask`, which runs a turn with your active agent and returns the reply;
before a changing action the agent's rules ask about, the editor shows the
ask-first card. Resources: `threads://`, `thread://{id}` (subscribable) and
`knowledge://`.

```bash
cade mcp install-hosts                 # write each detected host's config
cade mcp config generic                # the entry to paste into another app
cade mcp tokens new cursor             # a token for the HTTP mode
cade mcp serve --http --port 7879      # one process several editors share
```

See [`docs/mcp-serve.md`](./docs/mcp-serve.md).

---

## On Agent Arcade computers: `cade runtime`

`cade runtime run` runs one step of an agent the way Agent Arcade's daemon
runs Claude Code: the agent package's instructions and skills, only the tool
servers the computer gives it, the model and key from its environment, and a
JSONL event stream with usage and cost on stdout. `cade runtime serve` holds
many conversations from many channels and people in one process. It reads no
ambient configuration. Each release ships a onedir `cade-runtime` build for
Linux (x64, arm64) and macOS (arm64). The contract is
[`docs/runtime-protocol.md`](./docs/runtime-protocol.md).

---

## Configuration

All state lives under `~/.cade/` (`CADE_HOME` moves it).

| Path | Purpose |
|---|---|
| `config/cade.toml` | Global settings (UI, voice, hooks, …) |
| `config/account.toml` | Sign-in, registry, organization and project (secrets stay in the keychain) |
| `config/knowledge.toml` | Folders `cade knowledge add` keeps in step |
| `state/active-agent` | The agent chat runs, by Agent Arcade id |
| `cache/agents/` | Agent drafts, cached by digest |
| `workspaces/<agent id>/` | Working copies from `cade agents edit` |
| `data/agents/<agent id>/` | Per-agent state: threads, tasks, tool results, saved grants |
| `logs/cade.log` | Rotating log file |

| Variable | Purpose |
|---|---|
| `ARCADE_API_KEY` | An Arcade project key (`arc_…`), instead of a stored one |
| `CADE_REGISTRY_URL` | Agent Arcade's console/registry (default `https://app.arcadeagent.dev`) |
| `CADE_MODEL_GATEWAY_URL` | The model gateway (default `https://llmgw.arcadeagent.dev`) |
| `CADE_HOME` | Move the whole `~/.cade` tree |
| `CADE_PROJECT_ROOT` | Confine `Local_*` file tools to this root |

Full layout, keychain entries and env vars: [`docs/configuration.md`](./docs/configuration.md).

---

## Contributing

```bash
git clone https://github.com/arcadeai-labs/cade.git
cd cade
uv sync --extra dev
uv run pytest
uv run ruff check src/ tests/
```

Style: Python 3.11+ with modern type hints (`dict`, `list`, `| None`); ruff for lint + format; pytest with `asyncio_mode = "auto"`. Public functions and classes get docstrings.

Build/release docs live in [`docs/development.md`](./docs/development.md). PRs
welcome — open an issue first for anything substantial.

---

## Resources

- [app.arcadeagent.dev](https://app.arcadeagent.dev) — Agent Arcade
- [`docs/`](./docs/) — quickstart, install, agents, knowledge, schedules, editors, runtime protocol, configuration and development. Browse as a site with `make docs` (MkDocs Material)
- [Changelog](CHANGELOG.md) · [Issues](https://github.com/arcadeai-labs/cade/issues) · [Releases](https://github.com/arcadeai-labs/cade/releases)

## License

MIT
