TinyCase
Back →

For AI agents: see llms.txt for a full documentation index. Every page is also available as markdown — request the URL with a .md suffix or an Accept: text/markdown header.

Docs / Settings / API Tokens & the Docs CLI

API Tokens & the Docs CLI

Publish your markdown docs from a git repo using an API token.

API Tokens & the Docs CLI

Settings → API tokens (Pro only) issues tokens used to publish docs from
your own repo, the same way this very docs/ folder is meant to be
published.

Getting the CLI

The CLI is open source: GusTech/tinycase-cli.
Grab a prebuilt static binary from the
releases page, or build
it from source with Crystal >= 1.10.

Creating a token

Give it a name (e.g. "CLI" or "CI") and generate it. The plaintext token is
shown once, right after creation — it isn't stored anywhere retrievable,
so copy it immediately. Revoke a token any time; whatever is using it stops
working right away.

Send it as a bearer token:

Authorization: Bearer tc_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

What gets published

A push replaces your docs wholesale: a collections.yml describing your
collections, plus the markdown files and image assets that belong to them.
Anything not included in a push is deleted — the repo is the source of
truth, not an incremental diff.

  • collections.yml — a top-level list of collections, each needing a
    slug. title, icon, description, and internal: true (hidden from
    the public portal, e.g. for engineering notes) are optional.
  • Pages — a markdown file's directory must match a collection's slug;
    its filename becomes the page slug. Optional YAML frontmatter sets
    title, description, and order (sort position within the collection).
  • Assets — images go under assets/ and are referenced by pages with
    relative paths (../assets/x.png). PNG, JPG, GIF, WEBP, and SVG only, 5MB
    max per file; SVGs are scanned before accepting.

This repo's own docs/ folder follows that exact layout, so it can be
pushed as-is once the CLI points at it.

Ask a question