The Lune command line app
The Lune command line app installs the Lune MCP server in supported local agents. It also handles sign-in and teams from a terminal, can create access keys, and reports on its own setup.
The command line app is optional. Research belongs in your AI agent, where Lune's MCP tools run; the command line app's own lookups are for quick checks.
Install it
npm install -g @retrograde-labs/lune-cliIt needs Node.js 22.12 or later. If you don't have Node, install it from nodejs.org or your package manager.
Sign in
lune loginThis opens a browser tab where you sign in with your Lune account. The command
line app keeps the sign-in. You sign in again only after lune logout, for a
new --profile, or after 90 days without use. To sign in with an access key
instead, run lune login --api-key and paste the key when asked, or pipe it in
(lune login --api-key < key.txt). The key never goes on the command line, where
other users of the computer and your shell history could read it.
lune whoamiShows the team your sign-in bills (your personal team after a browser sign-in),
its plan, today's requests against the daily allowance, your credit balance,
and how you signed in. It needs the account:read scope, which a browser
sign-in and a key made with the default scopes both carry.
Connect Lune to a local AI agent
The command line app writes the MCP config for these agents in one step:
lune install --client claude-code
lune install --client cursor
lune install --client vscode
lune install --client codex
lune install --client opencodeSign in with lune login first. Run lune install with no flag to pick from a
list. It asks whether to create a new access key or use one you already have. A
new key goes to the team your sign-in bills and carries the four default
scopes. The key then goes into the agent's configuration file. If you signed in
with an access key, the install reuses that key, so a key created in a shared
team connects the agent to that team.
Some apps connect through their own interface instead, like Claude Desktop, Perplexity, and Manus. For those, the command prints a link to the matching recipe on the dashboard:
lune install --client claude-desktopTo remove Lune from an agent later:
lune uninstall --client cursorFor apps set up inside the app itself, lune uninstall points you to the
Credentials page to revoke the key or the connected app.
Use Lune in the connected agent
After installation, open the local agent and ask it to search papers, read full text, trace citations, compare methods, verify claims, or find research guidance. The agent picks the Lune tools on its own.
For a quick check without an agent:
lune papers search "diffusion model guidance"
lune guidance search "how to design an ablation"Each lookup counts against your daily allowance, like the matching tool call.
Manage your account
lune teams list # the team your sign-in bills
lune teams current # the team this profile signed in to
lune keys create --name laptop # create an access key (shown once)lune keys create takes --scopes and --expires to choose the key's scopes
and expiry date. The key goes to the team your sign-in bills. It needs a
browser sign-in: a session signed in with an access key can't create keys. To list or revoke keys, use the
Credentials page.
Multiple identities
If you use Lune for both personal and team work, the --profile flag keeps
them apart.
lune --profile work login --api-key # paste a key made in the team
lune --profile work install --client cursorWithout --profile, the command line app uses default. Each profile has its
own sign-in, and a sign-in acts for one team: a browser sign-in for your
personal team, an access key for the team it was created in. To work in a
shared team from the command line, create a key in that team on the
Credentials page and
sign a profile in with it.
Diagnostics
lune doctorPrints the version and profile, whether a sign-in is saved and which kind, the
profile's team, whether Lune's service answers, and each agent it detects,
with the config file lune install would write for it. It doesn't check that
the saved sign-in still works, and it doesn't test the MCP connection. To test
the connection, use the check in
Troubleshooting.
