Commands
Version 0.2.0. Requires Node.js >=20.0.0. Zero runtime dependencies.
Commands
| Command | What it does |
|---|---|
postlyra login | Authenticate, store an API token, and pick a brand. |
postlyra init | Interactive setup: API URL, folders, vault, mining window, max ideas. |
postlyra brands | List the account's brands. * marks the selected one. |
postlyra brands use <brand-id> | Pick the brand this machine mines into. |
postlyra mine | Mine recent commits and vault notes into content ideas. |
postlyra status | Check auth, brand, folders, vault, and the unmined-item count. |
postlyra upgrade | Upgrade the CLI to the latest published version. |
postlyra --version | Print the installed CLI version. |
mine options
| Flag | Meaning |
|---|---|
--brand | Mine into this brand for one run, overriding the configured brand. |
--days | Override the configured mining window, in days. |
--dry-run | Collect and filter only. Prints the work log, skips the AI call and the push. |
--json | Machine-readable output instead of the friendly terminal summary. |
--max | Override the configured maximum ideas for this run. |
--no-vault | Skip the vault entirely and mine commits only. |
--vault | Mine this vault path for this run, ignoring the configured one. |
postlyra login
Prompts for email and password (hidden), then a two-factor code if 2FA is on. Stores the token and picks a brand.
If the account has several brands it prints a numbered list and asks which one this machine mines into. Answering nothing leaves no brand selected, and mine will refuse until you run postlyra brands use <id>.
A failure to list brands does not fail the login. The token is already saved.
postlyra init
Interactive setup. Every prompt shows the current value in brackets, and blank keeps it. Type - at the vault prompt to clear a configured vault.
It writes the config and prints it back with the token masked. No API calls.
Errors it will refuse on: an empty API URL, no folders and no vault, a non-positive day count, a max-ideas below 1.
postlyra brands
postlyra brands # list, * marks selected
postlyra brands --json # {"brands": [...], "selected": "..."}
postlyra brands use <id> # switch, accepts the id or the namepostlyra mine
The main event. In order:
- Resolve the brand:
--brand, then the configured brand, then the account's only brand. - Collect commits from every configured repo in the window, plus vault notes.
- Fetch
GET /ideas/mining-contextand drop everything whose ref is already known. - Stop here if
--dry-run. - Send the filtered work log to your AI backend.
- Push the result in chunks of 25.
Output per section looks like myrepo: 14 commit(s), 6 already mined, 8 new.
If nothing is left after filtering it prints nothing new to mine and exits 0 without calling the AI.
Useful invocations
postlyra mine # the normal run
postlyra mine --dry-run # see what would be mined, spend nothing
postlyra mine --dry-run --json # the same, machine-readable
postlyra mine --days 14 # widen the window for one run
postlyra mine --no-vault # commits only
postlyra mine --max 3 # fewer, better ideas
postlyra mine --brand <id> # a different brand, this run onlypostlyra status
Reports auth, brand, folders, vault and the unmined-item count. It never throws for missing config, it reports the problem and exits 0, so it is safe in a shell prompt or a health check.
Add --json for a machine-readable version.
postlyra upgrade
Runs npm install -g @postlyra/cli@latest. It deliberately does not print the new version afterwards, because the old code is still loaded in memory. Run postlyra --version to confirm.
Exit codes
| Code | Meaning |
|---|---|
0 | Success, including "nothing new to mine" |
1 | Any error, or an unknown command |
130 | Ctrl-C during a password prompt |