# Lathe

> Initialize CLI-first applications and keep their OpenAPI contract, generated CLI, and Agent Skill synchronized. Use when creating an application with lathe init or changing a Lathe-generated application.

- Skill: `lathe-cli/lathe` (Agent Skill)
- Install (CLI): `npx skillmds@latest add lathe-cli/lathe`
- Raw SKILL.md: https://api.skillmd.com/api/skills/lathe-cli/lathe/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: lathe-cli (https://skillmd.com/u/lathe-cli)
- Updated: 2026-09-22
- Page: https://skillmd.com/skills/lathe-cli/lathe

---


# Lathe

## Initialize an application

Prefer explicit flags so agent runs never wait for prompts:

```sh
lathe init ./my-app \
  --language node \
  --app-name "My App" \
  --cli-name my-appctl \
  --go-module example.com/my-app \
  --license mit \
  --license-holder "My App contributors" \
  --json
```

Supported languages are `node`, `go`, `python`, and `rust`.

The default template is the selected language's latest `main`. Override it with `--template '<git-url>#<ref>'`; the optional ref may be a branch or tag.

After initialization, inspect the JSON result, enter the new repository, and read its `AGENTS.md`. The repository intentionally has no commit, staged files, or Git remote.

## Application development loop

For every API-facing behavior change:

1. Update the application implementation.
2. Update `openapi/openapi.yaml` in the same change.
3. Run the check command returned by `lathe init`.
4. Run `<cli-name> __lathe verify --json` before broader command acceptance.
5. When a commit is requested, include the regenerated `internal/generated/`, `skills/<cli-name>/`, and `cmd/<cli-name>/cli.yaml` outputs with the feature.

Do not hand-edit generated files. Use the generated CLI as the main acceptance surface. Before guessing commands or flags, run `<cli-name> search "<intent>" --json`, then `<cli-name> commands show <path...> --json`.

