What’s new in 2.3.0
- Agent modes (roles).
!mode chat|plan|build|review|auto— Moon works as four specialized agents on the existing Fusion orchestrator: CHAT (natural conversation — no files, no commands, no plans), PLAN (structured plans; never silently implements), BUILD (writes code, runs commands, tests, verifies), REVIEW (independent read-only QA — ranked findings with concrete fixes; never modifies files on its own).auto(default) routes casual messages to CHAT and work to BUILD; the role persists until you change it and history is kept across switches. - Enforced, not requested. Chat/plan/review turns cannot execute action tags — the gate lives in the response processor, and read-only roles never receive writing tools, fusion, or the agentic loop. Simple conversations can no longer trigger coding workflows.
- Fusion gains a reviewer. The planner/executor chain now ends with an independent REVIEW verdict on the finished work — on FAIL, Moon falls back to the single model instead of reporting unverified success. Optional read-only
role="review"subtasks can be planned inline. - Per-role configuration. Pin a model, temperature and reasoning effort per role:
!mode model plan <key|full-id>,!mode temperature review 0.1,!mode reasoning build medium— honored everywhere, including inside fusion; auto-picked fusion models stay free. See Agent modes. - The npm launcher always checks. The
mooncodelauncher queries GitHub at every launch — a release published minutes ago is picked up on that run. No 24h gate; offline it falls back to the newest cached release. (Classic source installs keep the once-per-day in-REPL check.)
Earlier in 2.2.3
- @-mentions. Prefix any project path with
@:Check @index.html for bugsreads the file for that turn;@AGENT.MD create a tictactoe gameattaches project instructions;@src/attaches a capped tree listing plus the small text files inside. - Attachments ride the turn, never the system prompt. Their text is followed as project material — it cannot replace Moon’s rules or bypass the guards (command blocklist, path validation, security modes, autorun posture, the working-folder boundary, secrets). Jailbreaking via attachment is not possible.
- The hardening train. Fusion guardrails (sanitized, capped, untrusted-wrapped context), durable
.moon/memory.md,!cost limitsoft spend cap, destructive-op preview before deletes, interactive-command auto-kill, post-write content verification, generated!help, rolling history digest, and a fix loop that escalates to a stronger FREE model after three failed attempts.
Earlier in 2.2.2
- Launcher-proof.
moon updateand!syncnow refuse cleanly in launcher installs instead of writing into the versioned runtime cache. moon --version. Print the installed version and exit.moon doctornow shows install flavor (launcher vs classic) and code/state paths.- Privacy & hygiene. Change-log files are chmod 600; raw-reply logs follow
MOON_HOME; interrupted-fetch debris is swept automatically; launcher and updater share one 24h cache schema.
Earlier in 2.2.1
- The CLI shows which Moon it is. Banner and
moon doctorreadMoon · AI Terminal IDE · v2.2.1. npm install -g mooncodeis live. The launcher as a one-command global install; always fetches the latest release at run time.
Earlier in 2.2.0
launch.py— Moon from GitHub, no source required. A ~9 KB launcher fetches the latest release at invocation and runs it. Your folder keeps only what belongs to you (key, sessions, logs) — the app source caches separately under.runtime/, two releases at a time, verified on every fetch.MOON_HOMEstate root. Re-roots every person-owned path (api key, session DB, change log, workspace, update-check cache). Unset = today’s behavior, byte for byte.- Offline-safe. No network → the launcher starts the newest cached release instead of dying.
MOON_TAG=v2.2.0pins;MOON_NO_UPDATE_CHECK=1runs cache-only.
Earlier in 2.1.0
- Auto-update check. One cached GitHub check per day at
moonlaunch; if a newer release exists you’re asked[Y/n]before anything downloads. Yourapi_key.env, session DB and change log survive the update.MOON_NO_UPDATE_CHECK=1disables it;moon updateforces a check. - Versions page. Downloads and release notes now live in one place instead of being hardcoded everywhere.
Earlier in 2.0.0
- Observe → continue loop. After Moon runs a command, the output is fed straight back to the model and it finishes the work — no more typing
continue. Up to 4 rounds per prompt. - Verified on disk. The file receipt re-opens every saved file and reports the actual line count, with
✓ verified on diskwhen all files check out. - Plan-only replies are retried. A reply that only explains a plan triggers one automatic re-ask; it can no longer silently end the turn.
- Commands run in your folder.
run_cmdexecutes in the active working folder (!folder), not the workspace root. - No more junk folders.
!foldercan no longer create directories from typos or command-like names — it focuses existing folders only. - Quieter protocol. Internal
PLAN:/ACTION:scaffolding is hidden from displayed output.
Agent modes (roles)
Moon can work as four specialized agents, layered on the existing Fusion orchestrator — roles are not a competing system; they specialize the agents Fusion already coordinates. Pick one and it persists until you change it.
!fusion on)!mode(or/mode) shows the role card, active role, and per-role model/temperature/reasoning. Switching is instant and history is kept — follow-ups stay in context.- Simple conversations never trigger the multi-agent workflow: CHAT/PLAN/REVIEW turns are single-model, emit no action tags (the tag gate is enforced in code, not just asked for in the prompt), and get no writing tools.
- Fusion runs only for BUILD turns. PLAN backs the planner, BUILD the executor, and after a fusion run an independent REVIEW verdict gates the result — on FAIL, Moon falls back to the single model instead of reporting unverified success.
- Per role, pin a model (
!mode model plan <key|full-id>), a temperature (!mode temperature review 0.1), and a reasoning effort (!mode reasoning build medium— OpenRouter only, where supported). Each takesoffto clear. Explicit pins are honored everywhere, including inside fusion; auto-picked fusion models stay free.
Attachments (@-mentions)
Prefix any project path with @ and Moon reads it as part of the turn — no chat about “the file you mean is probably…”. A token that matches nothing real stays plain text; one that escapes the working folder is refused with a note.
> Check @index.html for bugs
> @AGENT.MD create a tictactoe game
> Explain @core/ and @README.md
@fileattaches the file’s contents — sanitized, ~8,000 chars (larger files ride as head + tail with an omission marker), always within the working folder.@folderattaches a dirs-first tree listing (capped ~200 entries) plus the small text files inside, inlined — max 8 files / 16,000 chars per folder, ~24,000 chars per turn overall. Binary and oversized files are listed, never inlined.- Multiple @-tokens combine; duplicates collapse; email addresses don’t attach.
What attachments can and cannot do
Attachments are project material for this one turn — not a new system prompt. Instructions inside them (conventions, build steps, project requirements) are followed. But no attachment can change Moon’s rules:
- the command blocklist, path validation, security modes and autorun posture all still apply;
- nothing reaches outside the working folder;
- secrets, credentials and
.envcontents are off limits; - destructive actions you didn’t ask for are off the table;
- instructions in your own message always win over anything inside an attachment.
With !fusion on, attachments ride as data only (fusion treats every context as untrusted). Use !fusion off when you want an instruction-grade @AGENT.MD. Attachments are per-turn — MOON.md (your standing rules) and .moon/memory.md (the project’s durable notes) load every turn instead.
Install & platforms
Moon is Python stdlib only — nothing to compile, no pip packages. Two install paths: the launcher (recommended — runs Moon straight from GitHub releases) or a classic source checkout with ./install.sh.
termux-setup-storage so projects land in shared storage (/sdcard/moon-prj), not Termux’s private folder.python3 on PATH. The installer detects Linux and skips the Termux-only steps.python3 (Xcode Command Line Tools or brew install python). Please report issues..bat/PowerShell installer. Recommended: WSL (e.g. Ubuntu) as the Windows Terminal profile, then the normal Linux steps. Git Bash also works for basic use.termux-setup-storage step does not exist there — storage permissions differ per app. Expect rough edges.Launcher install (recommended, Termux & Linux)
With node+npm on the device, the launcher mooncode is one command — needs Python 3.8+ underneath (Moon itself is pure Python stdlib):
pkg install -y python nodejs # Termux; skip what you already have
npm install -g mooncode
mooncode # fetches the latest release itself, then starts
Without npm, grab the same launcher manually — one permanent folder for your stuff (key, sessions, logs), the app fetched from GitHub on every release:
# 1. one permanent folder — this is YOURS (key, sessions, logs)
mkdir -p ~/moon && cd ~/moon
# 2. grab the ~9 KB launcher (once)
curl -L -O https://raw.githubusercontent.com/n7xRqLm4Wk9/moon-test/v2.2.0/launch.py
# 3. point the alias at it
echo "alias moon='python3 $HOME/moon/launch.py'" >> ~/.bashrc
source ~/.bashrc
# 4. go — it fetches the latest release itself
moon
Already have a classic install? Point MOON_HOME at it (export MOON_HOME=$HOME/moon in your shell config before the alias) and your saved key, sessions and logs are reused untouched — the source just stops mattering. Want the app gone from that folder entirely? After one successful launch from the new setup, delete the old source; the runtime cache is self-managed (2 newest releases kept).
Classic install (Termux & Linux)
# 1. get the source (see versions.html for v2.2.0 / v2.1.0 / v2.0.0)
unzip moon-test-2.2.0.zip && cd moon-test-2.2.0
# 2. install
./install.sh
The installer will: install Python if missing → on Termux, offer shared-storage access → ask for your OpenRouter API key (skip with moon setup later; free models work without payment — get a key at openrouter.ai/keys) → add moon and runm aliases to your shell config.
# 3. restart your shell (or: source ~/.bashrc), then
moon
# anything off?
moon doctor
Moved the folder or re-installing? Just re-run ./install.sh from the new location — it re-points the aliases.
Security modes
Moon never does more than your mode allows. Switch with !security <mode> and restart Moon to apply. The default is medium.
LOW
Broad access
Workspace, home directory, /sdcard and /storage. Commands run as you with no per-step gate. For trusted repos only.
MEDIUM · DEFAULT
Sandboxed
Reads and writes confined to your project folder — /sdcard/moon-prj on Android (or Moon’s own folder as a fallback elsewhere). No outside paths.
HIGH
Sandboxed + approval
Same sandbox as medium, and every shell command requires your explicit yes before it runs.
Command reference
Plain English first — commands are optional power-ups, each one ! away:
Change log & undo
Every write, patch, delete, command and setting lands in a timestamped log — each file named for the exact Paris time it was created. Nothing disappears silently.
log:[26/11/26]:[19:50:55 Europe/Paris]
- type: write
- summary: wrote src/validation.py
- workspace: /sdcard/moon-prj/my-app
- 42 lines
---
- type: command
- summary: python -m pytest -q
- output: 8 passed
!changes 25 reviews the last 25 entries · !undo reverts the most recent AI changes · both are local, no account needed.
Troubleshooting
moon doctorfirst. Checks your API key, OpenRouter connectivity, and that all core files exist — then tells you what to fix.- “API key required” — get a free key at openrouter.ai/keys, then
moon setup. - Projects land inside Moon’s folder — you skipped storage access. Re-run
./install.shortermux-setup-storageon Termux. !security“didn’t change anything” — modes apply after a restart. Exit and launchmoonagain.- A build takes forever and gets killed — Gradle/Maven projects get much longer timeouts automatically; if yours still hits the cap, run it via a focused
!folderso Moon sees less noise.
Download
Pick the release you want — all live on the versions page, with ZIPs, clone commands and release notes:
Verify what you downloaded: cd moon-test && grep APP_VERSION config/settings.py. Classic installs also check GitHub once per day at launch; launcher installs always run the latest release.