# Seiton CLI

Query analytics and manage websites, tokens, and expenses from the terminal. Useful for AI agents and LLMs.

The CLI is a wrapper around the Seiton API. From a backend, call the API directly.

## Install

```bash
npx @seiton/cli login
# or
npm install -g @seiton/cli
```

That installs a binary named `seiton`.

## Authenticate

```bash
seiton login
```

Opens **Settings → API / MCP**, then paste the `sei_` token. It is saved at `~/.config/seiton/config.json`.

```bash
echo $SEITON_TOKEN | seiton login
seiton login --token sei_xxx
```

## Commands

Omit `--project` and the CLI asks, or uses the only website in scope.

- `seiton projects list`
- `seiton health`
- `seiton briefing`
- `seiton analytics [--period 7d]`
- `seiton revenue`
- `seiton churn`
- `seiton seo`
- `seiton integrations list`
- `seiton integrations sync --provider stripe`
- `seiton tokens list`

## Log out

```bash
seiton logout
```

Removes the saved token from `~/.config/seiton/config.json`.

## Global flags

- `--json` — compact JSON, for agents. Example: `seiton --json projects list`
- `--verbose` — request URL and status on stderr
- `--project <id>` — website id

## Environment

- `SEITON_TOKEN` — override the saved token
- `SEITON_API_BASE` — default `https://www.seiton.online/api/v1` (use `http://localhost:3000/api/v1` in development)

Related: [API](https://www.seiton.online/api) · [MCP](https://www.seiton.online/mcp)
