strylb
v0.2.2
Published
Publish stories to strylb from the command line, or from an AI writing harness.
Maintainers
Readme
strylb
Publish stories to strylb without a browser.
Written for two people at once: a writer who would rather stay in a terminal, and the AI assistant they are drafting with. A chapter that exists as a markdown file should be publishable from the folder it lives in, without anyone copying an id between windows.
npx strylb --helpNo dependencies, one file, Node 20 or later. It speaks HTTP to a strylb server's
/api and knows nothing about the story format — markdown goes up, the server
converts it to the editor's own representation, so what you post is what the
reader renders.
Getting started
npx strylb login # approve in the browser, once
cd my-book
npx strylb init # writes .strylb/manifest.json
npx strylb push # every chapter, as drafts
npx strylb status
npx strylb publish <id>init also writes a short block into the project's AGENTS.md, so an assistant
working in the folder can find the workflow without being told it.
For agents
strylb guidefirst. It describes what a story on this platform should look like — the markdown that survives conversion, what the title, excerpt and category fields are for, and the difference between prose and a document. A fiction platform is not the default thing a markdown file is for, so the brief ships in the tool rather than living in someone's head.strylb whoamireports the scopes the current key carries and names the ones it lacks. Check it before planning work: scopes are fixed when a key is minted and cannot be widened, so a missing one is a new key, not a retry.--jsonon any command: the payload on stdout with no decoration, errors on stderr as{ "error": { "code", "message" } }. Exit0ok,1failed,2misused.- Drafts by default.
pushcreates private stories unless--publishis given. deleteneeds--yes, andpushrefuses rather than overwriting a story that changed on the server since it was last pulled.- Publishing is capped per account — a limited number of distinct stories made
public per rolling 24 hours. Drafts never count, so
pushis always safe; onlypublishspends budget.strylb whoamishows what is left. Past the ceiling you get{ "error": { "code": "publish_quota" } }and aRetry-Afterheader: back off and leave the work as drafts rather than retrying. strylb agent-instructionsprints the whole workflow as markdown.
Run strylb --help for the full surface.
Credentials
Keys are minted per-tool and revocable, and carry scopes — stories:read,
stories:write, collections:read, collections:write — so a tool that only
reads your back catalogue cannot rewrite it.
strylb login stores one in ~/.strylb/config.json, mode 0600.
STRYLB_API_KEY and STRYLB_URL override it, so a CI job or a sandboxed agent
never has to write a key to disk.
