Quickstart
Install the binary, write one prompt, generate tested TypeScript, and see the attribution, all in five commands.
This page takes you from nothing to generated, tested, attributed code. It should take a
few minutes; the only prerequisite is one CLI on your PATH.
You need the Claude Code CLI (claude) on your PATH. Your
coding agent is configurable (codex or a custom command work too) but claude
anchors the attribution, IR, and machine-layer derivations regardless of which agent
writes the code, so napl gen checks for it before doing anything. No API key either
way; it reuses your Claude Code login. Running it for real
explains the adapter model in full.
Install
npm i -g napl-langOne native napl binary. Other channels (curl, cargo) are in the CLI reference.
Create a project
napl initWrites .napl/, lock.json (pins the model and the claude-cli backend), an example
prompt, and the guard rails that keep generated code honest: a pre-commit hook and
deny rules that stop AI agents from hand-editing generated files.
Write a prompt
Markdown prose plus YAML frontmatter. The prose is the contract; the tests: are data,
and they gate the build. This example is editable: delete the tests: key and watch the
validator object before you ever run the CLI. The right-hand tab is the code it generated.
Generate
napl gen typescriptA coding agent writes a real project under .napl/src/typescript/, runs its tests until
green, maps each sentence to the lines implementing it, and locks the files read-only. If
it can't prove the mapping in three attempts, the gen fails loudly rather than shipping
unattributed code.
Check the connection
napl status
napl blame .napl/src/typescript/greeting.tsstatus reports clean. blame shows, per line, the gen and prompt edit that caused it.
In VS Code, hover a sentence in greeting.napl to see the generated lines that implement
it, or Cmd+click to jump straight into them.
Next: Writing prompts that hold: how to write a prompt the toolchain can hold you to, and which sentences carry real weight.