Scripto docs
View as Markdown

Use Scripto with Claude

The full agent loop — install the CLI, self-provision over OTP, draft section by section, publish, and hand the URL to Medium — driven by Claude.

This guide runs the whole Scripto loop with Claude (or any agent that can run a terminal). It’s the motion Scripto is built around: hand the agent this docs URL, and it installs, provisions, drafts, and publishes.

The loop, end to end

Install the CLI

npm install -g @codika-io/scripto

Self-provision over OTP

scripto auth login-request --email you@example.com
# Claude asks you for the 6-digit code from your inbox
scripto auth login-complete --email you@example.com --code 123456
scripto whoami

No browser, no dashboard. An unknown email is registered on completion.

Set up the Brief (optional but recommended)

scripto articles create --file outline.md     # a skeleton with H2s becomes sections
scripto brief <id> --premise "What this piece is and its angle."
scripto note add <id> --kind decision --title "Lead with the install"

Draft section by section

scripto outline <id>                            # map the sections
scripto section set <id> <anchor> --file intro.md
scripto section add <id> --file findings.md --after <anchor>

Claude edits one section at a time, so even a long piece never blows its context.

Publish and import

scripto articles publish <id>                   # prints /story/<slug>

Paste the URL into Medium’s Import a story.

Why this works for an agent

  • Cheap context. The outline is tiny; the agent pulls only the section it’s editing.
  • Stable output. Every command supports --json with a { success, data | error } envelope, so Claude can branch on results and surface nextAction hints.
  • No formatting drift. The server renders Markdown once; publishing yields a page Medium imports faithfully.

A Scripto skills plugin (one skill per CLI capability — setup-scripto, draft-article, edit-section, publish-article, import-to-medium, brief) ships in its own repo so Claude Code can drive these steps by name. It mirrors the slideless plugin pattern; this page will link the install command once the plugin is published.

A typical session

> Install Scripto and draft a post about our launch.
  → npm install -g @codika-io/scripto
  → scripto auth login-request --email me@acme.com
  → (asks for the code) → scripto auth login-complete …
  → scripto articles create --file draft.md   (id 0a1b2c3d-…)
  → scripto outline 0a1b2c3d-…
  → scripto section set 0a1b2c3d-… a1b2c3d4 --file intro.md
  → scripto articles publish 0a1b2c3d-…
  → https://scripto.codika.io/story/our-launch
> Paste that into Medium's Import a story.

Next