> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lymo.jp/llms.txt
> Use this file to discover all available pages before exploring further.

# CLI

> Install and use the Lymo CLI for terminal-based workflows and agent integration

The Lymo CLI gives you terminal access to calls, transcripts, deal scores, and more. It also ships an MCP server so AI agents (Claude Desktop, Claude Code, Cursor, Codex, Gemini CLI, Windsurf, OpenCode) can call the same endpoints.

## Install

### Shell (macOS / Linux)

```bash theme={null}
curl -fsSL https://cdn.lymo.jp/install.sh | sh
```

Resolves the latest production release from `https://cdn.lymo.jp/manifest/latest.json`, downloads the matching tarball from the Lymo CDN, verifies its SHA-256 checksum, and installs `lymo` into `~/.local/bin`. Prints a `PATH` hint if needed.

Override the install directory — note the env var belongs on the `sh` side of the pipe, not the `curl` side:

```bash theme={null}
curl -fsSL https://cdn.lymo.jp/install.sh | LYMO_INSTALL_DIR=/usr/local/bin sh
```

Pin to a specific release:

```bash theme={null}
curl -fsSL https://cdn.lymo.jp/install.sh | LYMO_VERSION=cli-prod-v0.0.1 sh
```

### Verify

```bash theme={null}
lymo --version
```

## First run — `lymo setup`

`lymo setup` is the guided onboarding wizard. It signs you in, asks rep vs. manager, runs `lymo doctor`, and suggests a first command.

```bash theme={null}
lymo setup
```

Prefer to script the individual steps? `lymo login` and `lymo doctor` are the non-interactive equivalents:

```bash theme={null}
lymo login              # browser OAuth sign-in; saves the API key to ~/.config/lymo/
lymo whoami             # confirm authenticated user + active org
lymo doctor             # health checks: config dir, API key, API reach, MCP clients
```

Sign-in uses a localhost callback. Pass `--no-browser` to either command to print the URL instead of auto-opening.

The config file lives at `~/.config/lymo/config.json` with `0600` permissions. Override with `$LYMO_CONFIG_DIR` or `$XDG_CONFIG_HOME`.

## Core commands

### List calls and deals

```bash theme={null}
lymo calls                # recent calls (default 10, max 100)
lymo calls --limit 50
lymo deals                # recent deals
```

### Inspect a call

Commands that take a call accept a UUID or `latest` (the most recent call in your org).

```bash theme={null}
lymo summary latest
lymo transcript latest --from 05:00 --to 10:00
lymo checklist latest
lymo events latest --type objection
lymo search "pricing"                     # search across every call in the org
lymo search "pricing" --call latest       # restrict to one call
lymo search "pricing" --deal <deal-id>    # restrict to one deal's calls
```

### Export

Bundle multiple sections into a single file. Defaults: `--sections summary,checklist`, `--format md`.

```bash theme={null}
lymo export latest                                    # summary + checklist, markdown, to stdout
lymo export latest -s summary,transcript,checklist    # pick sections explicitly
lymo export latest -s summary,transcript -f json -o review.json
```

Available sections: `summary`, `transcript`, `checklist`, `events`. Formats: `md`, `json`.

## MCP server (agent integration)

Register the CLI as an MCP server so agent clients can access Lymo data:

```bash theme={null}
lymo mcp install --all        # every installed client
lymo mcp install -c cursor    # single client
lymo mcp status               # show what's installed
lymo mcp uninstall --all
```

Supported clients: `claude-desktop`, `claude-code`, `codex`, `cursor`, `gemini-cli`, `windsurf`, `opencode`.

Run the server manually over stdio (your client normally does this for you):

```bash theme={null}
lymo mcp serve
```

## Shell integration

`lymo setup` configures shell integration as part of onboarding. To manage it manually:

```bash theme={null}
lymo shell install      # detects $SHELL; or pass --shell zsh|bash|fish
lymo shell status       # show what's currently configured
lymo shell uninstall    # remove the managed block + completion file
```

Native completion paths:

| Shell | Completion file                                   | Activation                                                                 |
| ----- | ------------------------------------------------- | -------------------------------------------------------------------------- |
| zsh   | `~/.zsh/completions/_lymo`                        | `fpath` + `compinit` block in `~/.zshrc`                                   |
| fish  | `~/.config/fish/completions/lymo.fish`            | autoloaded by fish — no rc edits                                           |
| bash  | `~/.local/share/bash-completion/completions/lymo` | `[ -f X ] && source X` in `~/.bash_profile` (macOS) or `~/.bashrc` (Linux) |

`lymo shell install` also adds the install dir (`~/.local/bin` by default, override with `LYMO_INSTALL_DIR`) to `$PATH` if it isn't already there. Pass `--no-path` or `--no-completion` to opt out.

If you'd rather not have Lymo manage rc files, pipe the completion script directly (the `gh` / `kubectl` pattern):

```bash theme={null}
eval "$(lymo completion zsh)"     # or bash, or fish
```

After install, run `exec $SHELL` (or open a new terminal) to pick up the changes.

## Output formats

Every command supports three rendering modes for the same underlying envelope:

| Flag     | Format        | Use case                   |
| -------- | ------------- | -------------------------- |
| *(none)* | Colored ANSI  | Humans reading at a prompt |
| `--json` | JSON envelope | Scripts and pipelines      |
| `--md`   | Markdown      | AI agent context           |

## Profiles

Named profiles let you switch between organizations without re-authenticating each time. `--profile` is a global flag — attach it to any command.

```bash theme={null}
lymo login   --profile acme
lymo whoami  --profile acme
lymo calls   --profile acme
```

The active profile defaults to `default`.

## Troubleshooting

```bash theme={null}
lymo doctor
```

Reports on: config-directory writability, API key presence, live API connectivity (via `/v1/members/me`), and which MCP clients the server is wired into.

If `lymo doctor` fails on auth, re-run `lymo login`. If it fails on connectivity, check that `$LYMO_PLATFORM_BASE_URL` (if set) points at a reachable Lymo deployment.
