teakit
teakit is a Bun-first command-line tool for creating new Teakit tslib
projects from a built-in template and checking an existing project against the
Teakit baseline. It is designed to be driven by humans and AI agents alike: every
command prints a single structured JSON result by default.
Installation
teakit is published on the public npm registry. After installing, invoke the
teakit binary directly, via your runner (bunx teakit …, npx teakit …), or from a
package script.
Quick start
A freshly created project passes teakit doctor with no findings.
Commands
teakit create <name>
Creates a new Teakit tslib project from the built-in template (rendered locally,
no network fetch). The project defaults to Bun and ships with empty runtime
dependencies.
<name> is normalized into a package slug (^[a-z0-9][a-z0-9-]*$); an @scope/
prefix or a leading teakit- is stripped. All package metadata (name, skill folder,
PascalCase symbol, repository, owner, description) is derived from it.
On success it prints the created target, the list of files, and nextActions
(cd …, bun install, bun run check, bun run test). It never overwrites a
non-empty target.
teakit doctor
Checks the current working directory against the Teakit tslib baseline and prints
structured findings. It never modifies files and has no fix mode — an AI agent (or
you) applies the fixes from the findings.
Findings carry a stable kebab-case code and a severity:
- error — breaks build/test or violates a core constraint:
package.json, ESMtype, empty runtime deps, Bun scripts,README.md,src/index.ts,tests/. - warn — missing convention scaffolding (
AGENTS.md,docs/**/index.md,skills/llms.md, a package skill); the project still builds.
status is error if any error finding exists, else warn if any warning, else ok.
teakit --describe
Prints a machine-readable description of the CLI — commands, required arguments, exit
codes, and the full list of doctor finding codes. Running teakit with no arguments
prints the same thing. Use it to discover the real command surface instead of guessing.
teakit --version / --help
Plain-text version number and usage. (These two are the only non-JSON output.)
Output
create and doctor produce a single JSON object — the command's structured result —
with a schemaVersion field. Diagnostics and usage errors are JSON on stderr;
results are on stdout.
create and doctor also accept --format <json|text>:
- Default follows the TTY: a terminal gets human-readable
text; a pipe or redirect getsjson. So scripts and agents capturingstdoutget JSON automatically. - Pass
--format json(ortext) to force it.--describeand usage errors are always JSON;--version/--helpare always plain text.
Exit codes
For AI agents
See LLMs for the compact contract — the command surface, the JSON output
protocol, and exit codes for driving teakit programmatically.