Installation
The RedPennon CLI scans your codebase for flag references and reports them. It is the engine behind code references and the GitHub Action.
Install
npm install -g @redpennon/cli
This installs two equivalent binaries: rp (short) and redpennon.
rp --version
rp help
Authentication
Commands that talk to the API need an organisation API token (rpa_…), created under Settings → API tokens in the app. See Authentication → Organisation API tokens.
Provide it in priority order:
--api-token rpa_…flag.RP_API_TOKENenvironment variable.- An auth config file resolved from the CLI config directory.
export RP_API_TOKEN=rpa_xxxxxxxxxxxxxxxxxxxxxxxx
To store the token for local use instead, run rp auth login. It reads the token from a hidden prompt (or piped stdin) and writes auth.json to the CLI config directory with mode 0600:
rp auth login # hidden prompt
echo "$REDPENNON_API_TOKEN" | rp auth login # piped stdin
rp auth logout # remove the stored token
rp auth login --api-token rpa_… also works, but the token lands in your shell history. If auth.json is ever readable by group or other users (non-Windows), commands print a warning with the chmod 600 fix. rp status shows only the rpa_ prefix of the token.
rp usages is side-effect-free and can run with --no-api and no token at all; only commands that read or post project data need credentials.
Project and API base URL
| Option | Env | Purpose |
|---|---|---|
--project <key> | RP_PROJECT_KEY | Selects the project to report against. |
--api-url <url> | RP_API_URL | Overrides the API base URL (self-hosted / development). Must be https://; plain http:// is allowed only for localhost, 127.0.0.1 and [::1]. |
API requests time out after 30 seconds and are retried (up to 3 attempts, with backoff) on network errors and 5xx responses. 4xx responses fail immediately.
Common commands
| Command | Description |
|---|---|
rp usages | Scan the working tree and print flag-key references. Never posts. See Usages. |
rp publish | Scan and post the snapshot to the API from any CI. See Publish. |
rp auth login / rp auth logout | Store or remove the API token in the CLI config directory. |
rp keys | Fetch the project's variable keys (backs --only-unused). |
rp repo init | Scaffold a .redpennon/config.yml. |
rp status | Show resolved auth, project, and API URL. |
rp autocomplete | Set up shell completion. |