@banatie/cli
v0.2.0
Published
Banatie CLI — headless organization auth and project commands
Maintainers
Readme
@banatie/cli
Headless CLI for Banatie organization authentication and project management. Log in to your organization, create and manage projects, and connect a local repository to a project, all from the terminal, designed to be driven by humans or coding agents.
Requires Node >= 18 (uses the built-in global fetch).
Usage
No install needed: run it with npx:
npx @banatie/cli <command>Backend selector
Commands talk to https://api.banatie.app by default. Point at another backend with BANATIE_API_BASE_URL:
BANATIE_API_BASE_URL=http://localhost:3000 npx @banatie/cli org acme auth statusCommands
banatie signup <email> [--org-name <name>]
banatie org <org-slug> login <bnt_boot-token>
banatie org <org-slug> auth status
banatie org <org-slug> auth logout
banatie org <org-slug> auth revoke
banatie org <org-slug> auth rotate
banatie org <org-slug> project new <project-slug>
banatie org <org-slug> project list
banatie org <org-slug> project connect <project-slug> --project-root <path>
banatie org <org-slug> project issue-api-key <project-slug> [--write-env <path>]
banatie org <org-slug> project delete <project-slug> [<one-time-token>]
banatie issue-api-key [--write-env <path>]- signup: request a login email for your address.
--org-name <name>seeds the organization name and slug; without it both derive from the email local-part. The server reply is neutral by design; the one-time login command arrives by email. - login: exchange the one-time
bnt_boot_token for a permanent organization token and store it locally. The permanent token is never printed. - auth status / logout / revoke / rotate: inspect local login, remove it locally, revoke it server-side, or rotate the current organization token. Tokens are shown as previews only.
- project new / list: create a project (returns a key preview and a connect command, never a raw key) and list the organization's projects (safe metadata only).
- project connect: confirm the project exists via the saved org token and write a link file (
.banatie/project.json) under--project-root. No API key is minted or stored. - project issue-api-key / issue-api-key: mint a new raw project API key. Default: prints
BANATIE_API_KEY=bnt_...to stdout.--write-env <path>: idempotently upsertsBANATIE_API_KEYinto that file. The shorthandbanatie issue-api-keyauto-detects the project by walking up from the current directory. Each call mints a new server-side key. - project delete: a guarded, two-step destructive flow: without a token it emails a one-time confirmation command (nothing is deleted); with the token it requires an interactive confirmation before deleting. Non-interactive deletion is refused.
Signup can also happen outside the CLI: entering your email on the Banatie web app or POSTing it to the public bootstrap endpoint triggers the same login email.
Configuration & security
- Login profiles are stored in
~/.banatie/config.json(override the directory withBANATIE_HOME), scoped by backend URL + organization slug. - Permanent organization tokens are stored in
~/.banatie/config.jsonand never printed: commands show previews only. - Raw project API keys are never stored in
.banatie/project.json:project connectwrites only a link (org/project slug + id); useissue-api-keywhen you need an actual key. project connectprints a recommendation to add.banatie/to your.gitignore. The CLI does not edit.gitignoreitself.
License
MIT
