The Lune command line app

The Lune command line app installs the Lune MCP server in supported local agents and checks the resulting connection. It can also manage sign-in, teams, credentials, and billing from a terminal.

The CLI is optional. It is a setup and diagnostic companion, not the primary research interface. Run literature searches and other research tasks through Lune's MCP tools inside your AI agent.

Install it

npm install -g @retrograde-labs/lune-cli

If you don't have Node, install it first via nodejs.org or your package manager.

Sign in

lune login

This opens a browser tab where you sign in with your Lune account. The command line app remembers you so you don't have to do it again.

lune whoami

Shows which account you're signed in as, your current plan, your remaining requests for today, and your credit balance.

Connect Lune to a local AI agent

The command line app can wire up most local AI agents for you in one step.

lune install --client claude-code
lune install --client cursor
lune install --client vscode
lune install --client codex

You can run more than one. For these apps the command updates the right configuration file and creates an API key behind the scenes.

Some apps connect through their own interface instead. For those, like Claude Desktop, the command opens the matching guide on the dashboard:

lune install --client claude-desktop

To remove a connection later:

lune uninstall --client cursor       # remove a single app
lune uninstall --all                 # remove every connection

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 chooses the installed Lune MCP tools as part of its normal work. You do not need to write a REST client or move the task into a separate terminal workflow.

Manage your account

lune teams list                  # all teams you belong to
lune teams use <slug>            # set the active team for this profile
lune teams current               # show the active team
 
lune keys list                   # API keys for the active team
lune keys create --name laptop   # create a new key (shown once)
lune keys revoke <id>

The active team is used when the CLI creates a new MCP connection. Switch teams before running lune install if the local agent should use another team's allowance.

Multiple identities

If you use Lune for both personal and team work, the --profile flag keeps them separate.

lune --profile work login
lune --profile work teams use acme
lune --profile work install --client codex

default is used when you don't pass --profile. Each profile has its own sign-in and its own active team.

Diagnostics

lune doctor

Reports anything obviously off: wrong account, expired key, a configuration file the install command can't reach. If something feels wrong, run this first.