Set up Qwen
Capture Qwen Code, Alibaba's coding agent, in your terminal.
Worsley captures Qwen Code (the qwen command), Alibaba's coding agent in your terminal, through the Worsley CLI. Interactive and one-shot (qwen -p) sessions are both captured.
Qwen Chat in the browser and the Qwen apps aren't captured yet.
Sign in to the Worsley CLI
Do this once on each computer where you run Qwen Code.
- 1Install the Worsley CLI. It runs on macOS, Windows and Linux and needs Node.js 22.23.4 or later (on a Mac,
brew install nodeworks too). On macOS or Linux, run:
curl -fsSL https://www.worsley.ai/install.sh | shOn Windows, in PowerShell:
irm https://www.worsley.ai/install.ps1 | iexThe installer checks the download against its published checksum, puts the CLI in your home folder (~/.worsley, or %LOCALAPPDATA%\Worsley on Windows) and adds it to your PATH. Open a new terminal window afterward so the worsley command is found. Run the same command again any time to update.
- 1Sign in. The command below prints a link and a short code, then waits.
worsley login- 1Open the link. Log in to Worsley if asked, check that the code on the page matches the one in your terminal and that it names this computer, then select Connect. If you last logged in more than 10 minutes ago, Worsley asks you to log in again first. Opened the page without the code? Type it in.
- 2Back in the terminal, Worsley confirms Signed in as your email. The sign-in is kept in your system's credential store (macOS Keychain, Windows Credential Manager or Secret Service on Linux), never in a plain file. The code expires after 10 minutes; run
worsley loginagain if it does.
Turn on Qwen Code capture
- 1Tell Worsley to capture Qwen Code. It reads only Qwen Code's session folder, ~/.qwen/projects, and nothing else on your computer.
worsley enable qwen-codeIf you moved Qwen Code's folder with QWEN_HOME, Worsley follows it. Kept somewhere else entirely? Pass the folder yourself: worsley enable qwen-code --dir <folder>.
- 1Start uploading. Leave this running in a terminal window while you work; it checks for new turns and uploads them as they happen. Press Ctrl+C to stop.
worsley watchPrefer to upload now and then? Run worsley sync instead: it reads what's new, uploads it once, and exits. Nothing is read or uploaded while neither is running.
- 1Use Qwen Code as you normally do. Every new session appears in Worsley, usually within a minute.
Check that it's working
- Open History in Worsley. Your session shows up there with the tool's name, usually within a minute of a finished turn.
- In the terminal, run
worsley status. It shows the account this computer is signed in to and anything still waiting to upload.
What's captured
- What you typed and Qwen's replies, turn by turn, with the model that wrote each reply, so switching models mid-session shows.
- Files you add with @ are recorded by name and type; their contents never are.
- Picking a session back up with
qwen --resumeorqwen --continueadds the new turns to the same session. When you rewind, the turns you dropped are replaced. - Opening Qwen Code and running only slash commands or shell commands (!) isn't a session, so nothing appears.
- Never read: Qwen's thinking, tool calls and their output, memory, and your project's files.
If a session doesn't appear
- Browser: check that the Worsley icon isn't showing Not Connected, Reconnect or No Site Access, and reload the tool's tab. More in Extension isn't capturing.
- Terminal: check that
worsley watchorworsley proxywas running while you worked, and runworsley status. If it says the sign-in was revoked or expired, runworsley loginagain. - Still missing after a few minutes? Contact support and tell us which tool and which browser or terminal you used.
Related articles
- Capturing sessions in your terminalWorsley captures the AI sessions you run in your terminal, as well as those in your browser.
- Session isn't appearingWhat to check when a conversation doesn't show up in Worsley.
- What Worsley capturesYour prompts and responses in order, plus the details needed to understand them.

