pawnkit-cli

module
v1.6.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 30, 2026 License: MIT

README

pawnkit-cli

pawn gives a Pawn project one command for the checks you run every day. It loads the project once, then hands formatting, linting, and optional build or test work to the appropriate PawnKit tool.

The individual tools still work on their own. The CLI coordinates them; it does not hide or reimplement them.

Install

go install github.com/pawnkit/pawnkit-cli/cmd/pawn@latest

Current commands

pawn check [--project DIR] [--only TASKS] [--skip TASKS] [--output FORMAT]
pawn fmt [--project DIR] [--check]
pawn lint [--project DIR]
pawn test [--project DIR]
pawn doctor [--project DIR] [--output FORMAT]
pawn project [--project DIR] [--output FORMAT]
pawn audit [--project DIR] [--output FORMAT]
pawn init [--project DIR] [--entry FILE] [--target openmp|samp] [--include DIR]
pawn restore [--project DIR] --backend EXECUTABLE
pawn build [--project DIR] (--compiler PATH | --backend EXECUTABLE)
pawn run [--project DIR] --backend EXECUTABLE
pawn version

Check the installed tools against a pinned tested release set:

pawn toolchain --release-set toolchain.json

PAWN_RELEASE_SET can provide the same file to pawn toolchain and pawn doctor. Overrides remain usable, but PawnKit reports them as untested.

Start a project with pawn init. It finds a single .pwn entry file and writes pawn.json without replacing existing project configuration:

pawn init --target openmp --include include

Pass --entry when the project contains more than one possible entry file. Use --include more than once for multiple include directories.

Run pawn check from a project directory to validate pawn.json and pawn.lock, check formatting, and run pawnlint:

pawn check
pawn check --only project,lint
pawn check --output sarif > pawn.sarif

The focused commands use the installed standalone tools:

pawn fmt --check
pawn fmt
pawn lint
pawn test

Put pawnfmt, pawnlint, and pawntest on PATH. Each command runs from the project directory, so local tool configuration still applies.

Use --build-tool or --test-tool to add an external backend. The executable must support PawnKit capability negotiation. pawn check never downloads or updates tools.

pawn build --compiler /path/to/pawncc uses the resolved project directly. restore, run, and optional builds can use an RFC 0012 backend executable. Requests contain the selected profile, paths, defines, and compiler rather than asking the backend to rediscover the project.

pawn doctor looks for common project problems such as missing entry files, unpinned dependencies, path-case collisions, and credentials in configuration files. It reports possible fixes but does not change the project.

pawn project prints the resolved profile, build, runtime, and entry point. Use JSON output when an editor or script needs that selection.

pawn audit checks the local lockfile and platform artifacts. It can also write a CycloneDX or SPDX SBOM:

pawn audit --sbom cyclonedx --sbom-output bom.json

Audit runs offline. It can confirm integrity problems in local metadata, but it cannot tell you whether a dependency has a known vulnerability.

Human output is the default. Check also supports JSON and SARIF; doctor and audit support JSON. JSON reports use schemaVersion: 1.

Development

task check

This is a community project, and focused fixes are welcome. See CONTRIBUTING.md before opening a pull request.

Licence

MIT

Directories

Path Synopsis
cmd
pawn command
pkg
adapter
Package adapter runs negotiated external PawnKit tools.
Package adapter runs negotiated external PawnKit tools.
audit
Package audit inspects resolved project supply-chain metadata.
Package audit inspects resolved project supply-chain metadata.
backendrunner
Package backendrunner invokes build backends through RFC 0012.
Package backendrunner invokes build backends through RFC 0012.
capability
Package capability negotiates optional PawnKit tool adapters.
Package capability negotiates optional PawnKit tool adapters.
cli
Package cli implements the pawn command.
Package cli implements the pawn command.
directbackend
Package directbackend builds a resolved request with pawncc.
Package directbackend builds a resolved request with pawncc.
doctor
Package doctor aggregates safe project health checks.
Package doctor aggregates safe project health checks.
sbom
Package sbom creates deterministic dependency inventories.
Package sbom creates deterministic dependency inventories.
toolchain
Package toolchain checks installed tools against a tested release set.
Package toolchain checks installed tools against a tested release set.
workflow
Package workflow runs deterministic command task graphs.
Package workflow runs deterministic command task graphs.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL