Short answer
Install Qwen Code CLI with omarchy pkg add qwen-code, then run qwen in your project and pick an auth method with /auth. The CLI is free and open source; model access is a separate bill, since the free Qwen OAuth tier ended April 15, 2026.
Qwen Code CLI on Omarchy
Qwen Code CLI on Omarchy is Alibaba Qwen team’s Apache-2.0 terminal coding agent, optimized for Qwen models: run qwen in a project, pick a provider with /auth, and describe the task, with approval modes from read-only plan to full YOLO.
TL;DR
omarchy pkg add qwen-code
Then cd ~/my-project and run qwen. That installs Qwen Code CLI v0.28.4-1 (28 MB download, 114.6 MB installed, depends on nodejs, glibc, and gcc-libs). On first launch, pick an auth method with /auth and connect a model. Then describe what you want done. The CLI is free and open source; model access is a separate bill.
Getting started (5 minutes)
1. Pick an auth method with /auth.
On first run, and any time later with /auth, Qwen Code shows a menu. Qwen Account with Subscription signs in with your Qwen account through Qwen OAuth and uses your Plus or Pro subscription from chat.qwen.ai. QwenCloud is the official recommended setup: a Token Plan subscription with a monthly credit quota, or a standard pay-as-you-go API key, on the China or International platform. Alibaba ModelStudio offers a Coding Plan for individual developers (fixed monthly fee with a weekly quota), a Token Plan for teams, or a standard API key. Third-party Providers has ready-made entries for DeepSeek, Grok, MiniMax, Z.AI, Kimi, ModelScope, OpenRouter, and Requesty. Custom Provider takes any OpenAI, Anthropic, or Gemini-compatible endpoint, including a local server. The old free Qwen OAuth tier was discontinued on April 15, 2026, so do not expect a free login: you need an API key, a plan, or a local model.
2. Start with a read-only task.
Try: “Take a look at this project and explain its main directories.” Qwen Code reads and searches the project before answering, so you see how it works before it edits anything. Then run /init to have it study the code and write a QWEN.md with build commands and conventions it found. QWEN.md is read at the start of every session, so keep it short: every line costs tokens on every request.
3. Three things worth doing in the first session:
- Check the approval mode before your first edit. Qwen Code has five modes: plan (read-only), default (ask), auto-edit, auto (an LLM classifier decides, and this is the default), and yolo. Switch with Shift+Tab or
/approval-mode. The default Auto mode plus a sandbox that is off by default is a risky combination on a machine you care about: switch to default (ask) and turn the sandbox on in~/.qwen/settings.jsonfor daily work. - Set permissions in settings. The
permissionsblock in~/.qwen/settings.jsontakes allow, ask, and deny rules: allowgit statusandpnpm testwithout asking, always ask forgit push, and denyrm -rfand reading.envoutright. Check what is active with/permissions. - Run
/doctorwhen anything looks wrong. It shows which authentication is active, which model is selected, and whether the sandbox is on. Check the active auth and model there before assuming a login worked: a successful login does not prove the account can use the model you picked.
Common issues & fixes
You used to sign in free with Qwen OAuth, and now every request fails
The Qwen OAuth free tier was discontinued on April 15, 2026. It no longer appears in /auth, and new requests through it are rejected even if an old token is still cached.
Fix: Run qwen and then /auth to reconfigure: pick QwenCloud, Alibaba ModelStudio, a third-party provider, or a custom provider with an API key or local model. There is no free tier to restore. (Qwen Code README and docs, AgentVera Qwen Code guide)
Login succeeds but every request fails
Check account entitlement separately from a successful login: a sign-in that works does not mean the account can use the model you picked. The official troubleshooting table sorts the common causes: auth failure means the credential or model access is wrong, unknown model or endpoint means the model ID or base URL is wrong, and rate or quota limit means the provider quota is hit.
Fix: Open /auth and /model to verify the selected connection and model. For a custom API, verify the endpoint, protocol, model ID, and credential in the shell that launches Qwen Code. Do not repeatedly retry a request that is clearly rejected for credentials or configuration. (Qwen Code troubleshooting docs)
The agent approves its own tool calls, or runs commands you would have blocked
Recent versions default to Auto approval mode, where a separate classifier model evaluates every command, network access, or MCP tool call, and the sandbox and folder trust are both off by default. That means the agent can act without asking you, and each classifier check is an extra API request (if no fast model is set, the main model is used, and each check costs as much as a full request).
Fix: Switch to default (ask) mode with /approval-mode or Shift+Tab, turn the sandbox on in ~/.qwen/settings.json, and set explicit deny rules for destructive commands. YOLO mode should only run in an isolated environment. (Qwen Code config guide, Anchor Terminal Qwen Code review)
A tool is denied or unavailable, and adding an allow rule does not bring it back
Use /permissions to inspect the rules and recent denials, the active mode, explicit deny rules, available tool selection, workspace directories, and MCP configuration. Note that dont_ask rejects requests that require new approval, and accept_edits does not automatically approve arbitrary shell commands.
Fix: Inspect the rules with /permissions first; a tool absent from the available tool set cannot be restored solely by adding an allow rule. Avoid disabling all permission checks as a diagnostic shortcut. (Qwen Code troubleshooting docs)
You try the old qwen auth shell command from a tutorial and it does nothing, or the wrong version of qwen starts
The old qwen auth shell command has been removed, so /auth inside a session is the place to change providers. If the wrong version starts, a stale npm or standalone install earlier on PATH shadows the Omarchy package.
Fix: Run qwen --version and inspect your shell’s executable lookup. Remove the duplicate install and restart the terminal. (AgentVera Qwen Code guide, Qwen Code troubleshooting docs)
Pairs well with / If you hate this, try
Pairs well with
- git (review diffs before committing), a local Ollama model as a Custom Provider for $0 runs, and the Qwen desktop app or editor extensions (VS Code, Zed, JetBrains) when you want the same agent outside the terminal.
If you hate this, try
- If you hate the dead free tier: Kimi Code CLI has a $0 membership tier with OAuth login, and OpenCode takes free-tier keys from 75+ providers. If you want the same terminal-agent shape from one vendor’s models, Claude Code is the paid reference point.
Comparison: Qwen Code CLI vs Claude Code vs Kimi Code CLI vs Kilo Code CLI
| Qwen Code CLI | Claude Code (CLI) | Kimi Code CLI | Kilo Code CLI | |
|---|---|---|---|---|
| Price | Free CLI; QwenCloud or ModelStudio plan, or your own provider key | Requires Claude Pro $20/mo+ | Free CLI; Kimi membership from $15/mo or per-token API billing | Free agent; you pay provider rates |
| Best for | Qwen models, any OpenAI/Anthropic/Gemini endpoint, headless runs | The strongest single-vendor models, no key juggling | A fast single-binary TUI with subagents, MCP, and a free tier | Picking your own model per task, local models, scripted runs |
| Omarchy install | omarchy pkg add qwen-code | npm install -g @anthropic-ai/claude-code | omarchy pkg add kimi-code | omarchy pkg add kilocode-cli |
Verdict: Pick Qwen Code if you already use Qwen models or want a provider-agnostic agent that also runs headless with qwen -p. Pick Kimi Code CLI if you want a free tier with no key, and Claude Code if you want one vendor’s models and zero config.
How to switch from Claude Code (~15 minutes per project)
- Export from Claude Code: your project instructions already live in
CLAUDE.md. Qwen Code readsQWEN.md; copy the contents across or run/initand let it generate one from the codebase. - Import into Qwen Code: move MCP servers with
qwen mcp add, and put your model and provider settings in~/.qwen/settings.json(or set the provider env vars). Your existing OpenAI-compatible keys work as a Custom Provider. - What doesn’t transfer: chat history, Claude-specific slash commands and permission modes, and Claude Code’s GitHub Actions integration. Qwen Code has its own approval modes, subagents, and a GitHub Action (
qwen-code-action) instead. - Time estimate: takes about 15 minutes per project.
Open the Qwen Code CLI package
See the live version, upstream screenshot, requirements, source and exact Omarchy install command.
Frequently asked questions
Is Qwen Code free?
The CLI is free and open source (Apache-2.0). Model access is not free anymore: the Qwen OAuth free tier was discontinued April 15, 2026. You need a QwenCloud or ModelStudio plan, a third-party provider key, or a local model.
What happened to the free Qwen OAuth tier?
It was discontinued on April 15, 2026. It no longer appears in /auth, and requests through it are rejected even if an old token is still cached. Use /auth to pick a plan or key instead.
What is the difference between Qwen Code and the Qwen chatbot?
Qwen Code is the terminal coding agent (this guide). The Qwen chatbot at chat.qwen.ai is the web chat, and its Plus or Pro subscription is one of the ways to pay for Qwen Code through the Qwen Account with Subscription option.
Where does Qwen Code store its config?
User settings live in ~/.qwen/settings.json, project settings in .qwen/settings.json at the repo root, and logs in ~/.qwen/logs/. Project rules go in QWEN.md at the project root (plus ~/.qwen/QWEN.md for your own global rules and .qwen/QWEN.local.md for rules only you see in that project). Do not put API keys in settings files: use environment variables or user-level settings.
Does it work offline or run a model locally?
Only with a local model. Point a Custom Provider at Ollama or any OpenAI-compatible local server, and Qwen Code talks to it. Every hosted provider needs network access.
Can I use Claude or GPT models with it?
Yes. Qwen Code supports OpenAI-compatible, Anthropic, and Google GenAI protocols, plus built-in third-party providers (DeepSeek, Grok, MiniMax, Z.AI, Kimi, ModelScope, OpenRouter, Requesty) and any custom endpoint.
Official sources
- Omarchy package listing: qwen-code (v0.28.4-1, 28 MB download / 114.6 MB installed)
- Qwen Code docs, overview, install, auth methods, free-tier discontinuation
- Qwen Code authentication docs, five /auth options
- Qwen Code troubleshooting docs, login failures, permissions, logs
- Qwen Code step-by-step guide, /auth, free-tier end, /doctor
- Qwen Code CLI review, version 0.26.4 checks, approval modes, sandbox
- Qwen Code review, pricing, approval modes, usage stats, weaknesses
- Qwen Code config guide, QWEN.md, approval modes, MCP, sandbox
- Qwen Code source and README
Commands and fixes verified against official sources November 2026; on-machine verification pending.