Skip to content

About

Terminal coding agent powered by Qumge models. 使用 Qumge 模型的终端编程 Agent。

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

QMG Code

English | 简体中文

A coding agent for your terminal, powered by Qumge models. One account, one key, pay as you go — no per-seat subscription.

curl -fsSL https://qumge.com/install.sh | sh
qmg login
cd your-repo
qmg

qmg is the primary command. qumge remains a compatibility alias for existing scripts.

Requirements

  • Node.js 22.19 or newer
  • A Qumge account

Install

curl -fsSL https://qumge.com/install.sh | sh

The installer checks Node, then installs into ~/.local/bin (no sudo, no change to a system Node's global prefix). If ~/.local/bin is not on your PATH, it prints the one line to add.

The package is served from qumge.com, not from npm. The same command upgrades:

curl -fsSL https://qumge.com/install.sh | sh

Sign in

qmg login

It prints a link and a code. Open the link, approve the device, and the key is saved to ~/.qmg/credentials.json (readable only by you).

qmg logout     # forget the saved account

Use

Run qmg inside a repository to start the agent. Everything after qmg is passed through to the agent, so the usual flags work:

qmg -p "fix the failing test"         # one-off, print the answer, exit
qmg --model deepseek/deepseek-chat    # pick a model for this run
qmg help                            # the full flag list

Commands

Command What it does
qmg Start the agent with your default model
qmg login Sign in through the device flow
qmg logout Delete the saved account
qmg balance Wallet balance, withdrawable amount, earnings this month
qmg models Coding models and their prices
/prices The same list with live prices, inside a session (switch models with /model)
/balance The same balance, inside a session

What it asks before doing

The agent reads, edits, runs tests and uses git without asking. It stops and asks only before the few things that cannot be undone:

  • deletes that cannot be undone (rm -rf, find … -delete, rimraf, shred, Remove-Item -Recurse)
  • overwriting a disk or wiping a file (dd of=/dev/…, mkfs, truncate -s 0)
  • git reset --hard, git push --force, git clean -f, git branch -D
  • sudo
  • reading or writing secrets files (.env, ~/.ssh, ~/.aws, ~/.qmg, …)

Choose Allow once, Allow for this session (stops asking for that kind until you start a new session), or Deny. In print mode (qmg -p) there is no one to ask, so those calls are refused; pass --yolo (or set QUMGE_YOLO=1) to allow everything.

This catches the model slipping; it is not a sandbox. It matches command text, so a command hidden inside a script is not seen, and the agent runs with your user's permissions. Work in a git repository with your changes committed, or run it in a container.

Models

/model lists the recommended coding models with their prices; qmg models (or /prices inside a session) shows live prices. The list is cached at qmg login and refreshed in the background once a day, so launching never waits on a network request. Set QMG_NO_CATALOG_REFRESH=1 to turn the refresh off.

Troubleshooting

Invalid API key — run qmg login again. — the saved key was revoked or belongs to another account.

Insufficient balance ... top up at ... — open the link to add funds.

Qumge's network edge blocked this request before it reached the API — the firewall in front of Qumge refused something in the conversation. Start a new session with /new; if it keeps happening, report it at https://github.com/Qumge/qumge-code/issues.

Qumge returned a non-JSON response (from qmg balance / qmg models) — the same edge refused a request. Retry; if it persists, report it as above.

Could not reach Qumge — check your connection or proxy settings.

Upstream

QMG Code uses the unmodified Pi runtime through npm dependencies. As of 2026-11-02, both pinned packages (@earendil-works/pi-ai and @earendil-works/pi-coding-agent) are at 1.4.0, matching the current npm release. There is no newer runtime version to merge. See the update checklist.

Licence

MIT. QMG Code uses Pi as its agent runtime; see NOTICE for that licence.

About

Terminal coding agent powered by Qumge models. 使用 Qumge 模型的终端编程 Agent。

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages