Metadata-Version: 2.4
Name: cade-cli
Version: 0.3.4
Summary: Cade - The CLI Agent from Arcade.dev
Project-URL: Homepage, https://arcade.dev
Project-URL: Documentation, https://docs.arcade.dev
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
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.1.0
Requires-Dist: arcade-tdk>=2.0.0
Requires-Dist: arcadepy>=1.3.1
Requires-Dist: authlib<2.0.0,>=1.6.0
Requires-Dist: httpx<1.0.0,>=0.27.0
Requires-Dist: openai<2.0.0,>=1.0.0
Requires-Dist: prompt-toolkit>=3.0.52
Requires-Dist: pydantic[email]<3.0.0,>=2.0.0
Requires-Dist: pyperclip<2.0.0,>=1.8.0
Requires-Dist: pyyaml<7.0.0,>=6.0
Requires-Dist: rich<14.0.0,>=13.0.0
Requires-Dist: tiktoken>=0.11.0
Requires-Dist: toml<1.0.0,>=0.10.0
Requires-Dist: typer>0.10.0
Requires-Dist: ulid==1.1
Provides-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: 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'
Description-Content-Type: text/markdown

# Cade

An AI-powered CLI agent for coding and everyday tasks. Powered by [Arcade.dev](https://arcade.dev).

## Installation

### Prerequisites

- Python 3.11+
- Arcade account ([arcade.dev](https://arcade.dev))
- AI provider API key: `OPENAI_API_KEY` or `ANTHROPIC_API_KEY`

### Homebrew (macOS/Linux)

```bash
brew tap ArcadeAI/tap
brew install cade
```

### Install with uv

```bash
curl -LsSf https://astral.sh/uv/install.sh | sh
uv pip install cade-cli
```

### Install with pip

```bash
pip install cade-cli
```

### From Source

```bash
git clone https://github.com/arcadeai-labs/cade.git
cd cade
uv venv --python 3.11
source .venv/bin/activate
uv sync
```

### Authenticate

```bash
cade login
```

## Usage

### Start a Chat

```bash
cade
```

### Resume a Thread

```bash
cade -r                        # Resume most recent
cade resume "my-project"       # Resume by name
```

### Single Message Mode

```bash
cade -m "What files are in this directory?"
cat error.log | cade -m "What went wrong?"
```

### Options

| Option | Description |
|--------|-------------|
| `-r`, `--resume` | Resume the most recent thread |
| `-m`, `--message` | Single message mode (non-interactive) |
| `-v`, `--verbose` | Enable debug logging |
| `--version` | Show version |

### In-Chat Commands

| Command | Description |
|---------|-------------|
| `/help` | Show available commands |
| `/logs` | View recent log entries |
| `/clear` | Clear the screen |
| `/copy` | Copy last response to clipboard |
| `Ctrl+C` | Exit |

## Thread Management

```bash
cade thread list                          # List all threads
cade thread list --branch main            # Filter by branch
cade thread get <thread-id>               # Get thread details
cade thread get <thread-id> --messages    # Show messages
cade thread delete <thread-id>            # Delete thread
```

## Tool Management

Tools come from three sources: local, Arcade Cloud, and MCP servers.

```bash
cade tool list                    # List all tools
cade tool list --source local     # Filter by source
cade tool search "file"           # Search tools
cade tool info Local_ReadFile     # Tool details
```

### Built-in Tools

| Tool | Description |
|------|-------------|
| `Local_ReadFile` | Read file contents |
| `Local_WriteFile` | Write or append to files |
| `Local_ListFiles` | List directory contents |
| `Local_SearchText` | Search for text patterns |
| `Local_ExecuteShell` | Run shell commands |
| `Local_CreateDirectory` | Create directories |
| `Local_DeleteFile` | Delete files |
| `Local_GetGitStatus` | Get git status |

## MCP Servers

Connect to [MCP](https://modelcontextprotocol.io/) servers for extended capabilities.

```bash
cade mcp list                                                    # List servers
cade mcp add my-server http://localhost:8080                     # Add server
cade mcp add my-server http://localhost:8080 --auth bearer -t <token>  # With auth
cade mcp test my-server                                          # Test connection
cade mcp enable my-server                                        # Enable
cade mcp disable my-server                                       # Disable
cade mcp rm my-server                                            # Remove
```

## Configuration

Config is stored in `~/.cadecoder/`:

| File | Description |
|------|-------------|
| `cadecoder.toml` | Settings |
| `cadecoder_history.db` | Thread history |
| `cadecoder.log` | Logs |
| `mcp_servers.yaml` | MCP server configs |

### Environment Variables

| Variable | Description |
|----------|-------------|
| `OPENAI_API_KEY` | OpenAI API key |
| `ANTHROPIC_API_KEY` | Anthropic API key |
| `ARCADE_API_KEY` | Arcade API key (alternative to OAuth) |
| `ARCADE_BASE_URL` | Custom Arcade API endpoint |
| `CADECODER_HOME` | Override config directory |

### Example Config

```toml
# ~/.cadecoder/cadecoder.toml

default_model = "gpt-4.1"
debug_mode = false
use_responses_api = true

[responses_config]
enabled = true
streaming_enabled = true

[model_settings]
provider = "openai"
model = "gpt-4.1"

[tool_settings]
disabled_tools = []
```

## Contributing

### Development Setup

```bash
git clone https://github.com/arcadeai-labs/cade.git
cd cade
uv venv --python 3.11
source .venv/bin/activate
uv pip install -e '.[dev]'
```

### Run Tests

```bash
pytest
ruff check src/
ruff format src/
```

### Code Style

- Python 3.11+ with modern type hints (`dict`, `list`, `| None`)
- Ruff for linting and formatting
- Pytest for testing
- Docstrings for public functions and classes

### Submitting Changes

1. Fork the repository
2. Create a feature branch
3. Make changes with tests
4. Run `ruff check . && pytest`
5. Open a Pull Request

## Resources

- [arcade.dev](https://arcade.dev)
- [Documentation](https://docs.arcade.dev)
- [Issues](https://github.com/arcadeai-labs/cade/issues)
- [Releases](https://github.com/arcadeai-labs/cade/releases)

## License

MIT
