Other ways to work

VS Code extension

Duscode inside VS Code with the server built in. Send Dus the code you are looking at, and open files and diffs in VS Code itself, locally, in WSL or over Remote SSH.

The Duscode extension shows the same workspace inside a VS Code panel: chat, approvals, Project details, Git view. Duscode itself is built into the extension, so you don't install anything else. Dus can see the file and lines you're working on when you send a message, and file links and Open diff open in VS Code's own editor and diff view, next to the panel.

Coming soon

The extension on the VS Code Marketplace and Open VSX. Until then, it's installed from a .vsix file. Early-access users can ask for the file at support@duscode.com.

What you need

  • VS Code 1.90 or newer.
  • Node.js 22 or newer. Duscode runs on it. Check with node -v in a terminal; if it's missing or older, install the LTS version from nodejs.org. In a WSL, Remote SSH or dev container window, the Node that comes with VS Code's server is used when you haven't installed one.
  • A provider key, added the first time you open Duscode (or with duscode keys if you also use the app).

Install

In VS Code, open the Extensions view and choose … → Install from VSIX…. Pick the duscode-<version>.vsix file. Or, from a terminal:

bash
code --install-extension duscode-0.1.0.vsix

Open Duscode

Run Duscode: Open from the Command Palette, or click Duscode in the status bar. With several folders open, it uses the folder of the active editor or asks which one.

The panel says Starting Duscode for your-folder… while it starts. The first start takes a few seconds. The extension looks for a Duscode server on port 4317 and the 19 ports after it:

  • A Duscode is already running (for example one you started with duscode, or another VS Code window). The extension reuses it and opens your folder in it. The status bar tooltip says shared server.
  • None is running. The extension starts the Duscode built into it, on the first free port. Its output goes to the Duscode output channel.

If something goes wrong, the panel says what and how to fix it:

The panel says What to do
Duscode needs Node.js 22 or newer, and VS Code can't find it. Install Node.js 22 from nodejs.org (Get Node.js), then Retry. If Node is installed but VS Code doesn't see it (common on macOS when VS Code is started from the Dock), use Set Node path and enter the path from which node, such as /opt/homebrew/bin/node.
…the Node VS Code found is 20.x The same: install Node 22 or newer, or point duscode.nodePath at a newer one.
Duscode could not start. The message underneath says why. Show output has the server's log; Retry tries again.

Duscode: Stop Server stops a server this VS Code window started. Closing the window does too. A server you started yourself, or one another window started, keeps running.

Send Dus what you're looking at

When you open a file, the message box shows it as a chip: the file's name, and the lines if you've selected some (for example format.ts:3–9). Hover it for the full path. When you send a message, Dus gets that file and selection with it, so "rename this" or "why does this fail?" means the code you're looking at. Your message in the chat shows which file and lines went with it.

  • Leave it out: click × on the chip. It stays out until you open another file or select something else.
  • Add a selection on purpose: select code and press Ctrl+Alt+D (Cmd+Alt+D on a Mac), or right-click → Duscode: Add Selection to Chat. It opens the panel if needed and puts the cursor in the message box. Added selections stay until you send, so you can add a few from different files.

What is and isn't shared:

  • Nothing is sent until you send a message. The chip only shows what would go with it.
  • Only files saved inside the folder Duscode has open. Unsaved new files and files from other folders are never offered.
  • Files that look like they hold secrets are never offered: .env files (not .env.example), keys and certificates, .npmrc, credentials and secrets files, and anything in .ssh, .aws or similar folders. The same rule makes Dus ask before it reads them.
  • Up to 20,000 characters of a selection; Dus is told when it's longer, and reads the file for the rest.
  • If the editor has unsaved changes, the chip shows a dot, and Dus is told the file on disk differs.
  • Turn the automatic chip off with duscode.shareEditorContext. Add Selection to Chat still works.

Opening Duscode in a normal browser tab never shows the chip: it only comes from VS Code.

Settings

Setting Default What it does
duscode.port 4317 The port to look for, or start, a Duscode server on. A busy port moves to the next free one.
duscode.nodePath empty The Node.js 22+ to run Duscode with. Empty: node on the PATH, then the usual install places (Homebrew, nvm, Volta, fnm).
duscode.shareEditorContext true Show the active file and selection as a chip in the message box
duscode.serverCommand empty Start the server with your own command instead of the built-in one, run in the workspace folder. ${cwd} and ${port} are replaced, for example duscode ${cwd} --port ${port} --no-open --foreground.
duscode.openOnStartup false Open Duscode when a workspace folder opens

Commands

Command Keys
Duscode: Open
Duscode: Add Selection to Chat Ctrl+Alt+D / Cmd+Alt+D
Duscode: Stop Server

Status bar

Shows Means
Duscode Ready. Click to open.
Duscode with a spinner Starting the server
Duscode with a warning Something failed. Hover for the error.

WSL, Remote SSH and dev containers

The extension runs where your files are. In a WSL, Remote SSH or dev container window, it finds or starts Duscode on that side, with Node from that side (or the one VS Code's server brings). VS Code forwards the port to your machine, and the server still listens on 127.0.0.1 only.

The terminal

The built-in Duscode uses your system's script command for the Terminal tab on Linux and macOS: colours, prompts and Ctrl+C work, but resizing the pane doesn't resize the shell. The Terminal tab says which mode it's in. For a fully resizable terminal, install the Duscode app and set duscode.serverCommand to it, or keep one running with duscode; the extension reuses it.

Safety

  • The panel shows only the local Duscode workspace, under a strict content security policy.
  • The extension opens a file only if it's inside the workspace folder, after following symlinks. Anything else is refused with a message.
  • What the editor shows reaches the Duscode panel only, and the server only with a message you send. The server checks it again: paths outside the project and secret-looking files are dropped.

Known limits

  • Accept and Reject for a change stay in the Duscode panel, not in VS Code's diff view.
  • Workspaces opened in a browser (vscode.dev, GitHub Codespaces in the browser) aren't supported yet.
  • Windows without WSL isn't supported (Duscode runs in WSL on Windows).

Something missing or wrong? Email support@duscode.com.