---
title: Caveman Code CLI and Shared Local Daemon
description: Install @caveman-ai/code and drive workspaces, sessions, MCP servers, automations, and traces from the terminal on the exact same daemon Desktop uses.
canonical: https://docs.caveman.so/code/cli
product: Caveman Code
group: Caveman Code
---

# Caveman Code CLI and Shared Local Daemon

> Install @caveman-ai/code and drive workspaces, sessions, MCP servers, automations, and traces from the terminal on the exact same daemon Desktop uses.

`@caveman-ai/code` installs the `caveman-code` CLI. It connects to the same local runtime daemon bundled in the Desktop app, so workspaces, git worktrees, provider authentication, MCP servers, and session journals stay synchronized between your terminal and Desktop.

## Install

```bash
npm install -g @caveman-ai/code
caveman-code --version
```

## Commands

| Command | What it does |
| --- | --- |
| `caveman-code chat` | Start or attach to an interactive coding session in the current repository |
| `caveman-code server` | Start, inspect status, or stop the local Caveman Code daemon |
| `caveman-code project` | List or register project workspaces |
| `caveman-code auth` | Inspect connected model providers and Caveman Cloud sign-in |
| `caveman-code mcp` | Inspect configured MCP servers and live connection status |
| `caveman-code automation` | Run or inspect `.caveman/automations/<name>.yaml` workflows |
| `caveman-code trace` | Inspect structured session event logs and token usage |
| `caveman-code config` | Read or update local runtime configuration |

## Common workflow

```bash
# Register and open a session in your repo
caveman-code project
caveman-code chat

# Check which MCP servers are connected to the daemon
caveman-code mcp

# Inspect token usage and session events
caveman-code trace
```

## Connect Caveman Cloud

Sign in once from `caveman-code auth` or run `npx -y @caveman-ai/cloud setup` to install the Caveman Cloud skills (`caveman-cloud`, `caveman-deploy`, `caveman-sandbox`, `caveman-drive`) into `~/.agents/skills`, where Caveman Code loads them automatically.

## Verify and undo

```bash
caveman-code --version
npm uninstall -g @caveman-ai/code
```

Next: run long builds on persistent [Cloud Computers](/code/cloud-computers).
