---
title: Command reference
description: Every scripto command — export, title, auth, whoami, use, logout, config, articles, outline, section, note, brief, and completion — with flags and examples.
---

Every authenticated command accepts the common flags `--json`, `--api-key <key>`, `--api-url <url>`, and `--profile <name>` (see [Configuration](/cli/configuration)). They're omitted from each entry below for brevity.

## Offline (no network)

| Command | What it does |
|---|---|
| `scripto export <file>` | Render a Markdown file to Medium-ready HTML (`-o <file>` to write, `--fragment` for the body only). |
| `scripto title <file>` | Print the derived title of a Markdown file. |
| `scripto completion --install` | Auto-detect your shell (bash/zsh/fish) and wire up completion. `--uninstall` to remove; `scripto completion bash` to print a script. |

## Auth & identity

| Command | What it does |
|---|---|
| `scripto auth login-request --email <email>` | Email a 6-digit login code (open signup). |
| `scripto auth login-complete --email <email> --code <code>` | Verify the code, mint a key, store it as the active profile. |
| `scripto whoami` | Show the current authenticated user. |
| `scripto use [name]` | List profiles, or switch the active one. |
| `scripto logout [name]` | Remove a profile (default: the active one). |
| `scripto config show` / `set` / `clear` | Inspect, set (`--api-key`), or clear stored config. |

## Articles

| Command | What it does |
|---|---|
| `scripto articles list` | List your articles, newest first. |
| `scripto articles get <id>` | Fetch one article (full content). |
| `scripto articles create --file <md>` | Create a draft from Markdown (split into sections; title derived). |
| `scripto articles update <id> --file <md>` | Replace the whole body from Markdown. |
| `scripto articles publish <id>` | Publish and print the public `/story/<slug>` URL. |
| `scripto articles import <path>` | Import from a Medium export (`--dry-run`, `--publish`, `--include-drafts`, `--include-responses`). |

```bash
scripto articles create --file draft.md
scripto articles publish 0a1b2c3d-...
```

## Outline & sections

| Command | What it does |
|---|---|
| `scripto outline <id>` | The cheap section map (anchors + titles, no bodies). |
| `scripto section add <id>` | Append/insert a section from `--file`/`--stdin` (`--after`/`--before <anchor>`). |
| `scripto section get <id> <anchor>` | Fetch one section's body (`-o <file>` to write). |
| `scripto section set <id> <anchor>` | Replace one section from `--file`/`--stdin`. |
| `scripto section rm <id> <anchor>` | Delete one section. |
| `scripto section mv <id> <anchor>` | Move a section (`--after`/`--before <anchor>`). |

```bash
scripto outline <id>
scripto section get <id> a1b2c3d4 -o sec.md
scripto section set <id> a1b2c3d4 --file sec.md
echo "## Findings\n\nText…" | scripto section add <id> --stdin --after a1b2c3d4
```

## Brief & notes

| Command | What it does |
|---|---|
| `scripto brief <id>` | Read the Brief (premise + notes); or set the premise with `--premise`/`--premise-file`/`--premise-stdin`/`--clear-premise`. |
| `scripto note list <id>` | List the Brief's notes, grouped by kind. |
| `scripto note add <id> --kind <kind> --title <t>` | Add a typed note (`--url`, `--body`/`--file`/`--stdin`). |
| `scripto note get <id> <anchor>` | Fetch one note (`-o <file>` to write). |
| `scripto note set <id> <anchor>` | Update fields (`--kind`/`--title`/`--url`/`--body`, `--clear-url`/`--clear-body`). |
| `scripto note rm <id> <anchor>` | Delete one note. |

`<kind>` is one of `source`, `decision`, `idea`, `question`.

```bash
scripto brief <id>
scripto note add <id> --kind source --title "Spec" --url "https://…"
```

<Note>

Anchors (for sections and notes) are any unique prefix of the id, as printed by `outline` / `note list`. Every mutation echoes the fresh outline/list so the next anchor is in view.

</Note>

## Next

- **[Working with sections](/guides/working-with-sections)** — the section loop in practice.
- **[Use Scripto with Claude](/guides/with-claude)** — the full agent loop.
- **[HTTP API reference](/api-reference/overview)** — the routes these commands call.
