teakit — LLM usage contract

teakit is a command-line tool for creating and checking Teakit tslib projects. This page is the compact contract for driving it from an AI agent.

Commands

NeedCommand
Create a new tslib projectteakit create <name>
Check the current directory for tslib complianceteakit doctor
Discover commands, exit codes, and finding codesteakit --describe

Only use this surface — do not invent commands or flags. teakit --describe (or no arguments) returns the authoritative command, flag, and finding-code list at runtime.

Output protocol

  • Each command prints a single JSON object on stdout; diagnostics and usage errors are JSON on stderr. Parse stdout as one JSON value.
  • Results carry a schemaVersion (starts at 1); findings and files are in a stable order.
  • Exit codes: 0 ok/warn · 1 error findings or unsafe to complete · 2 usage error.
  • create and doctor accept --format <json|text>; the default follows the TTY (text in a terminal, JSON when piped). Pass --format json to force JSON. --describe and usage errors are always JSON.

create

teakit create <name> [--cwd <dir>] [--owner <scope>] [--description <text>] [--dry-run]

Renders a new Bun-first tslib project (empty runtime dependencies) from <name>, which is normalized to a package slug. Fails safely on a non-empty target and never overwrites. The result lists the created files and nextActions.

doctor

teakit doctor [--format <json|text>]

Reports findings against the tslib baseline. It never modifies files and has no fix mode — apply the fixes yourself from each finding's code, path, and nextAction, then re-run until status is ok. Each finding carries a stable kebab-case code and a severity: error for build/test essentials, warn for convention scaffolding.