Moon CLI is Moon AI’s command-line coding agent. Start it in a project folder and it reads your files, proposes and applies changes, runs commands, and asks for your approval before it acts. It uses the models and the usage limit of your Moon AI account.
Current version: 0.6.1. What changed in each version is in the release notes.
What Moon CLI doesLink to the What Moon CLI does section
- It works in your project. The agent starts from the folder where you launch it, inside the Git repository that contains it, and never loads configuration located above the repository root.
- It goes through your account. Same models as on chat.realmoon.ai, same usage limit, shown as a percentage. No prices are displayed.
- It asks before acting. By default, every file change, every command and every web access waits for your approval. Two other modes reduce these prompts when you decide to.
- It masks your secrets on your machine. Moon Blur replaces keys, tokens and passwords with placeholders before anything is sent to the model, then puts the real values back in the answers.
- It protects your session. The sign-in token is stored in the system keychain and is never passed to the agent. Moon CLI only talks to Moon AI: no other model provider, and no session sharing with a third-party service.
- It is careful with cloned repositories. A repository’s agent configuration (plugins, MCP servers, skills) is only loaded once you approve it.
- It updates itself. Every update is signed and verified before it is activated.
What you needLink to the What you need section
| Item | Details |
|---|---|
| A Moon AI account | The one you use on chat.realmoon.ai. |
| A plan that includes Moon CLI | Moon CLI is included from the Étoile plan up, on the workspace Moon CLI uses. Lune and the Free plan do not include it. See the plans. |
| A supported system | Windows 10 and 11, macOS (Apple Silicon and Intel), Linux (x64 and ARM, glibc or musl) and WSL. Details in Installation. |
Nothing else to install: Moon CLI is a standalone binary.
Get startedLink to the Get started section
Install Moon CLI:
irm https://realmoon.ai/install.ps1 | iexcurl -fsSL https://realmoon.ai/install.sh | shOpen a new terminal, go to your project, then sign in:
cd my-project
moon loginmoon login opens the “Connect Moon CLI.” page in your browser. Click “Authorize”: the agent starts right away in the current folder. After that, moon is all you need.
Moon CLI and the web chatLink to the Moon CLI and the web chat section
| Topic | Web chat | Moon CLI |
|---|---|---|
| Account and models | Your account and its catalog | The same account and its models, listed by moon models |
| Usage limit | The one of the open workspace | The one of the Moon CLI session’s workspace |
| Workspace | Chosen in the app | Specific to the Moon CLI session, with no effect on the web |
| Moon Blur | Applied by Moon AI | Applied on your machine, with an adjustable mode |
In this section
Getting started
- InstallationInstall Moon CLI on Windows, macOS, Linux or WSL, pick a version or another folder, find where its files live and verify the published checksums.
- Sign-inLink Moon CLI to your Moon AI account through the browser or with a code, see where the token is stored, how long the session lasts and how to revoke it.
Using it
- Using the agentStart the agent in a project, decide whether to trust a repository’s configuration, pick a permission mode and run a task without the interface using moon run.
- Workspaces and modelsThe workspace Moon CLI uses, the plans that include it, choosing a model or Auto, cost levels, and keeping track of your usage limit from the terminal.
- Remote controlDrive Moon CLI from Code with moon rc or /rc: start a session, follow background commands, go back to a message, review code and open a pull request.
- ConnectorsYour Moon AI connectors (Gmail, Notion, GitHub, Slack…) in Moon CLI and Code with nothing to set up: reads go through freely and every write is asked.
- MCP serversGive the agent new tools with MCP servers: a verified catalog, custom servers, signing in even without a browser, and confirmation before each tool runs.
Protection
- Moon BlurReversible masking of your secrets, done on your machine before each request to the model: modes, per-project settings, allowed values, audit and limits.
- Moon GuardThe guard that blocks destructive commands and keeps your secrets from leaving your machine. Off by default since version 0.2.2, it turns on with one command.
Reference
- CommandsEvery subcommand of the moon binary with its options and an example, the agent interface commands you type with /, and the keyboard shortcuts.
- ConfigurationSettings files for Moon CLI and its agent, where they live on each system, the available keys, environment variables and the order in which they apply.
- UpdatesAutomatic, signed Moon CLI updates, updating right away or to a specific version, going back to the previous version and removing Moon CLI entirely.
- TroubleshootingFix Moon CLI problems: moon command not found, blocked installer, rejected checksum, sign-in, updates, clean reinstall and the messages you may see.