> For the full index of Sherpa pages for agents, see https://www.withsherpa.ai/llms.txt

URL: https://www.withsherpa.ai/docs/cli
Title: The Sherpa CLI | Sherpa Docs
Description: Work on a local copy of your website with a coding agent and Sherpa's visual editor.

[Docs](https://www.withsherpa.ai/docs) For agents and developers

# The Sherpa CLI

Work on a local copy of your website with a coding agent and Sherpa's visual editor.

Chat is enough for most people. The CLI is for the ones who want the website's code on their own machine, with a coding agent beside it and Sherpa's visual editor on top of the local site. It does the same jobs as the MCP, from a terminal.

## Good to know

### Who it is for

The CLI is for people who work on the website's code on their own machine, with a coding agent such as Claude Code, Cursor or Codex. Everyone else can stay in chat with the MCP.

### Set it up

The setup prompt for your coding agent is in Sherpa under **Connections**. Paste it into your agent and it installs the CLI and signs you in.

## Commands

| Command | What it does |
| --- | --- |
| `sherpa instructions` | Prints current guidance for agents. Run it before editing |
| `sherpa dev` | Runs the website locally with Sherpa's visual editor on top |
| `sherpa preview` | Builds a shareable preview link |
| `sherpa review` | Sends the change for review so a person can publish |
| `sherpa cms` | Manages CMS content |
| `sherpa forms` | Manages forms |
| `sherpa analytics` | Describes and queries analytics |
| `sherpa funnels` | Creates and manages funnels |
| `sherpa experiments` | Creates, validates and lists experiments, and reads results |

Run any command with `--help` for its options.

## Good to know

### The visual editor

`sherpa dev` opens your site with a tools overlay. You can point at parts of the page, leave feedback for your agent and switch between experiment versions. Wait for the line that says Sherpa is ready and open the URL it prints.

### Same rules

The CLI and the MCP do the same jobs. Work happens in a change and a person publishes.

## Common questions

### Do I need the CLI to use Sherpa?

No. The CLI is for people who work on the website's code on their own machine with a coding agent. Everyone else can stay in chat.

### How do I install it?

Copy the setup prompt from Connections in Sherpa and paste it into your coding agent. It installs the CLI and signs you in.

### Which coding agents work with it?

Coding agents such as Claude Code, Cursor and Codex.

## Example prompts

Each one works as written in Claude or ChatGPT once Sherpa is connected. Swap in your own pages and dates.

> Run sherpa instructions and follow them before you edit anything.

Your coding agent reads the current rules for this website first.

> Start the site locally with sherpa dev and tell me the address.

Opens the local site with the visual editor on top.

> Build a preview of my local changes with sherpa preview and give me the link.

Turns local work into a link you can share.

## Next

[**How a Sherpa website is put together** Find your way around the code behind a Sherpa website.](https://www.withsherpa.ai/docs/repo-layout) [**Write skills and knowledge files** Give every agent that works on your website the same instructions by writing them down once.](https://www.withsherpa.ai/docs/skills-and-knowledge)
