Install and set up
Requirements
- Node.js 20 or newer
git- An AI backend: either the
claudeCLI on your PATH, orANTHROPIC_API_KEYset
Install
npm install -g @postlyra/cliSet up
postlyra init
postlyra logininit asks for the API URL, the folders mine --all scans (optional), an optional notes folder, the mining window in days, and how many ideas a run should ask for. Press enter to keep any current value.
login opens Postlyra in your browser by default (the gh auth login shape): approve the sign-in there, two-factor and passkeys included, and the CLI receives a token on a loopback callback. Pass --with-password on a machine with no browser to open, for the original email, password and two-factor prompts instead. Either way it stores a token and picks a brand: automatically when the account has one, by asking when it has several.
Both write to ~/.config/postlyra/config.json, with mode 600 because it holds your API token.
Check it
postlyra statusAPI: https://api.postlyra.com
Logged in as ada@example.com
Brand: My Brand (0f8fad5b-d9cb-469f-a165-70867728950e)
Folders: ~/Sites
Vault: ~/Sites/second-brain
Unmined items (mine --all): 8 of 22 in the last 7 day(s)This checks auth, brand, folders and the unmined count without mining anything or spending a token.
Your first run
Go to a repo you worked on this week, and look before you leap:
cd ~/Sites/myproject
postlyra mine --dry-runThat collects and filters, prints the work log the AI would see, and stops. No AI call, no push.
When it looks right:
postlyra mineBrands
One login token serves every brand on your account. login pins this machine to one.
postlyra brands # list them, * marks the selected one
postlyra brands use "<name>" # switch (the id also works)
postlyra mine --brand "<name>" # override for one runAn account with several brands and none selected refuses to mine rather than guessing.
What folders should I point it at
Only postlyra mine --all uses folders. A plain postlyra mine works on whatever folder you run it in.
folders entries are either a git repo itself, or a parent folder holding several repos one level down.
{ "folders": ["~/Sites"], "exclude": ["*/website"] }Pointing at ~/Sites picks up every repo directly inside it. Each is labelled Sites/myproject, and that label is the only thing about the repo that ever reaches Postlyra.
exclude patterns match against that label. * matches within one path segment, so */website excludes every project's website repo without touching anything else.
Upgrading
postlyra upgradeRuns a global npm install of the latest published version. Run postlyra --version afterwards to confirm.