# CLI

> StoryShelf CLI overview — client and server commands.

Source: https://storyshelf.js.org/guides/cli/

> **Package reference:** For technical details see [@storyshelf/cli](https://storyshelf.js.org/packages/cli/).

The StoryShelf CLI (`storyshelf`) exposes a `storyshelf` binary for CI pipelines. Run it with your package manager’s runner:

```sh
npx storyshelf --help
```

> **Note:**
>
> The CLI is **client-only** — it talks to a running server over `/api/v1` and carries no Playwright. To scaffold a server, use `storyshelf server init` (see [Server CLI](https://storyshelf.js.org/guides/cli/server/)).

This section is now split for readability:

- [Client — init, create, upload, build, doctor, whoami, retry, purge](https://storyshelf.js.org/guides/cli/client/)
- [Server — server init, server serve](https://storyshelf.js.org/guides/cli/server/)
- [Configuration — .storybook/storyshelf.json, flags, env, monorepo](https://storyshelf.js.org/guides/config/)

Every command’s full flags and examples live on its page; the package reference stays at [@storyshelf/cli](https://storyshelf.js.org/packages/cli/).

## Quick links

| Area   | Page                                                                                                             |
| ------ | ---------------------------------------------------------------------------------------------------------------- |
| Client | [init / create / upload / build / doctor / whoami / retry / purge](https://storyshelf.js.org/guides/cli/client/) |
| Server | [server init / server serve](https://storyshelf.js.org/guides/cli/server/)                                       |
| MCP    | `mcp init` / `mcp serve`: scaffold and run the [MCP server](https://storyshelf.js.org/ai/mcp/) for AI agents     |
| Config | [config file, env, monorepo](https://storyshelf.js.org/guides/config/)                                           |
