Qwen Code, dispatched with the same -p as its parent
Qwen Code is a Gemini CLI fork, so it takes the same prompt flag. PortBay runs `qwen -p` against a card in a project that is already serving, with a database attached and logs the agent can read.
How do I run Qwen Code CLI on a task board?
PortBay detects the `qwen` binary on your PATH and offers Qwen Code in the agent picker alongside ten others. Assign it to a card, move the card to To Do, and PortBay spawns `qwen -p "<the card>"` headless with the working directory set to your project — the same prompt flag Gemini CLI takes, because Qwen Code is a fork of it. What changes the quality of the run is the environment on the other side: the project is already serving on its own .test hostname behind a certificate macOS trusts, a per-project database is attached with its connection variables injected, and outgoing mail is captured locally, so the agent can exercise what it wrote instead of reasoning about it. A model chosen on the card is appended as `-m`, matching Gemini's flag. Each card takes its own git worktree so parallel runs do not collide, and a strike system stops a card that has failed three times from re-dispatching.
qwen -p, pointed at a card
Same invocation shape as Gemini, same board, same worktree — and the same running app to check the result in.
Your first Qwen Code card
Five steps from a clean Mac to a Qwen Code run you can open in a browser. Every command runs as written.
- Install PortBay
- Add your project and press play
- Check qwen resolves
- Write a card and assign Qwen Code
- Move the card to To Do and review the running app
Install PortBay
Homebrew installs the app and the bundled portbay CLI. Prefer a direct download? Grab the DMG from GitHub Releases and drag PortBay.app into Applications.
brew tap portbay-app/portbay && brew install --cask portbayAdd your project and press play
PortBay reads the stack from the folder, fills in the runtime and port, issues the certificate and attaches a database. That environment is what the run inherits.
portbay add ~/code/myappCheck qwen resolves
PortBay looks for the qwen binary on your PATH and shows it in the picker when it finds one. Set the path by hand if yours lives somewhere unusual. Authentication stays where Qwen Code already reads it.
which qwenWrite a card and assign Qwen Code
Brief the task and state the checkable outcome. Assign Qwen Code on the card, or set it as the board default. Pin a model on the card and PortBay appends -m to the command.
.portbay/tasks/normalize-address-fields.mdMove the card to To Do and review the running app
The run starts in its own worktree and comments what it changed when it ends. Open the project URL and use it. Require review holds the card until you approve.
https://myapp.testQwen Code in a terminal tab
The command works fine on its own. It is the second and third task where the tab stops being enough.
A card keeps the brief in the repo, the run in its own worktree, and the result behind a URL you can open.
cd ~/code/myappqwen -p "normalize the address fields on checkout" # one branch, one tab, one prompt you will not have tomorrow# and no served app for the agent to check itself against
The pieces underneath
Agent task board
A Kanban board both you and your agents work. Cards are Markdown in the repo; moving one to To Do dispatches the agent.
Explore →Agent dev environment
Stack detection, runtimes, HTTPS, databases and mail, provisioned per project — the running app your agents verify their work against.
Explore →Asked before downloading
As a headless subprocess: `qwen -p "<the card>"`, with the working directory set to the project. Qwen Code is a Gemini CLI fork, which is why the prompt flag is identical.
No, and the difference is worth stating plainly: Gemini CLI is one of four agents PortBay wires in both directions, and Qwen Code is not, despite the shared lineage. Dispatch works in full; only the reverse direction is missing.
Yes. Qwen Code's short model flag is wired, so a model chosen on the card is appended as `-m <model>` — the same flag Gemini uses. Leave it unset and the CLI uses its own default.
Yes. Assign per card or set a board default, with a concurrency cap on how many run at once. Every card takes its own git worktree, so runs on the same repo never write the same file.

Give your projects and your agents a real local home.
Download for macOSFree & open source · macOS 11+ on Apple Silicon · Pro from $10/mo