@crafter/cli
v0.5.2
Published
Ship projects to the Crafter Station community directory.
Downloads
0
Readme
@crafter/cli
Create reviewable Crafter Station Ship drafts from a local project, then publish only after explicit confirmation.
Install
npm install --global @crafter/cliThe CLI requires Node.js 18 or newer. Bun is not required.
Usage
crafter login
crafter whoami
crafter handle <handle>
crafter onboard --file <json-file> --confirm
crafter ship
crafter publish <draft-id> --revision <updated-at> --confirm
crafter edit <ship-slug> --file <json-file> --revision <updated-at> --confirm
crafter update <ship-slug> --file <json-file> --confirmcrafter handle checks whether a Crafter handle is still available. crafter onboard --file creates or updates your Crafter profile from a JSON file with at least handle and displayName (run it without arguments to use the browser form instead):
{
"handle": "ada",
"displayName": "Ada Lovelace",
"bio": "Building compilers for fun.",
"githubUrl": "https://github.com/ada",
"originLocation": { "city": "London", "country": "United Kingdom", "countryCode": "GB" },
"basedLocation": { "city": "London", "country": "United Kingdom", "countryCode": "GB" }
}AI coding agents can follow crafter.run/join/agent.md to walk a user through joining.
Run crafter login yourself in a local interactive terminal and keep it open until the browser confirms login. The CLI rejects non-interactive agent command runners because ending that process also ends the localhost OAuth callback server.
If login fails with invalid_client or "The requested OAuth 2.0 Client does not exist", update with npm install --global @crafter/cli@latest and try again. The public CLI always uses Crafter's production OAuth application; environment variables cannot redirect authentication.
Ship update files contain a public changelog entry:
{
"title": "Version 1.1",
"description": "Added team workspaces and improved onboarding."
}Use crafter edit to change a published Ship's metadata. Get the current updatedAt revision from crafter ships, then provide any fields to change in the JSON file:
{
"tagline": "A sharper description of the project",
"links": [{ "type": "website", "url": "https://example.com" }]
}crafter update remains the command for publishing changelog entries.
The CLI inspects only README.md, package.json, crafter.ship.json, and the Git origin by default. OAuth credentials are stored in the operating-system credential store.
See the public Ships directory at crafter.run/ships.
