Quickstart
From nothing but an email — install the CLI, self-provision over OTP, draft from Markdown, publish, and get a public URL to import into Medium.
By the end of this page you’ll have a published story at a public /story/<slug> URL — authored with the scripto CLI, ready to import into Medium — starting from nothing but an email.
Prerequisites
- Node.js 20+ (
node --versionto check) - An email you can read
- A Markdown draft (or use the snippet below)
No Scripto account yet? That’s fine — Step 2 creates one.
Step 1 — Install the CLI
npm install -g @codika-io/scripto
scripto --version If global installs are blocked, npx @codika-io/scripto <cmd> works for any command.
Step 2 — Request a login code
scripto auth login-request --email you@example.com This emails a 6-digit code and exits. Open signup: if you@example.com has no account yet, one is created when you complete the next step.
Step 3 — Complete login
Read the code from your inbox, then:
scripto auth login-complete --email you@example.com --code 123456 ✓ Signed in
Email: you@example.com
Profile: you (now active)
API key: scripto_••••••••
Try it: scripto whoami Your scripto_ key is now stored in ~/.config/scripto/config.json (mode 0600) and set as the active profile.
I already have a key from the web Settings page
Skip the OTP flow and store the key directly:
npm install -g @codika-io/scripto
scripto config set --api-key scripto_your_key_here This saves a profile and makes it active. Continue from Step 4.
Step 4 — Create a draft
Save a minimal draft.md:
# My first Scripto story
A short opening paragraph that becomes the article's first section.
## A second section
Everything from this H2 to the next one is its own section. Create the article — the server splits the Markdown into sections, renders each, and derives the title from the first heading:
scripto articles create --file draft.md ✓ Draft created
id: 0a1b2c3d-...
title: My first Scripto story
Publish it: scripto articles publish 0a1b2c3d-... Step 5 — Read the outline
The cheap map an agent reads before editing — anchors and titles, never bodies:
scripto outline 0a1b2c3d-... Edit one section by its anchor (any unique prefix of a section id):
scripto section get 0a1b2c3d-... a1b2c3d4 -o sec.md
# edit sec.md …
scripto section set 0a1b2c3d-... a1b2c3d4 --file sec.md Editing one section at a time is the agent path: a long article never has to be pushed or pulled whole. See Working with sections.
Step 6 — Publish
scripto articles publish 0a1b2c3d-... ✓ Published
URL: https://scripto.codika.io/story/my-first-scripto-story
Paste that URL into Medium's "Import a story" to import it. Publishing is idempotent — re-running keeps the same slug and the original publish date.
Step 7 — Import into Medium
In Medium, open your avatar → Stories → Import a story, paste the /story/<slug> URL, and import. Medium fetches the server-rendered page and rebuilds the story — headings, code blocks, lists, dividers, and figures intact.
Images must be hosted public URLs, not inline data: images — Medium’s bot fetches the story server-side and can’t read inline image data. The editor and POST /api/upload host images for you on Vercel Blob.
What just happened
| Step | Behind the scenes |
|---|---|
| Login | An unknown email was registered on the spot; a long-lived scripto_ key was minted and saved locally |
| Created a draft | The server split your Markdown into ordered sections, rendered each to semantic HTML, and derived the title |
| Published | A slug was assigned once; the public /story/<slug> page now renders from the database |
| Imported | Medium fetched the SSR page and rebuilt the story faithfully |
Next steps
- CLI command reference — every command, every flag.
- The ordered-sections model — why agent editing stays cheap.
- Use Scripto with Claude — have Claude run the whole loop.
- Import from Medium — bring your Medium history into Scripto.