Other ways to work
Open a cloud workspace from VS Code and the terminal
Work on a Duscode Cloud workspace from the app, VS Code and the terminal. Dus runs in the workspace; your computer only shows it.
A cloud workspace is Duscode running in Duscode Cloud, with your project on it. Dus works there, so your computer doesn't need to run anything. You create workspaces, share them and see their cost in the Duscode Cloud console, under Account → Your workspaces. This page is about opening one from where you already work.
Everything here uses your Duscode account. If you haven't signed in on this computer yet, see Sign in.
In the app
Settings → Account → Cloud workspaces lists your workspaces and the ones shared with you, with their state.
- Open opens the workspace in a new browser tab.
- Start starts a stopped workspace. Only its owner can start or stop it.
- Stop stops it. Its files are kept, and you can start it again at any time.
- Create a workspace goes to the console when you have none yet.
The desktop app shows the same page, so it works the same there.
In VS Code
- Run Duscode: Connect to a cloud workspace… from the Command Palette.
- The first time, VS Code opens your browser to sign in to Duscode Cloud. Check the code in the browser matches the one VS Code shows, and approve it. VS Code keeps the sign-in in its secret storage.
- Pick a workspace. A stopped one is started first; VS Code shows its progress.
- The Duscode panel shows the workspace, and the status bar says Duscode: cloud · your workspace.
While you're connected:
- Diffs of what Dus changed open in VS Code's diff view, as before.
- Files open read-only, straight from the workspace. Edit them in the workspace (in the panel, or in the browser with Open), so there's only ever one copy.
- Add Selection to Chat is off, because the files open in this window aren't the workspace's. Name the file in your message instead.
- VS Code reconnects to the same workspace next time it opens, if it's running. It never starts one on its own, because a running workspace costs money.
To go back, run Duscode: Use the local server. The extension then works exactly as before, with Duscode on your computer. Duscode: Sign out of Duscode Cloud forgets the sign-in in VS Code.
In the terminal
duscode cloud list # your workspaces and their state
duscode cloud open shop # open "shop" in the browser
duscode cloud connect shop # work with Dus on "shop" from this terminalYou can name a workspace by its name, the start of its name, or its id. duscode cloud connect starts a stopped workspace first, then you type tasks as in the terminal app. Dus asks for approvals and answers here. Type /stop (or press Ctrl+C) to stop a task, and /exit to disconnect. The workspace keeps running until you stop it with duscode cloud stop shop, in the app, or in the console. If Dus needs a form filled in, for example a secret, the terminal tells you to answer it in the browser. Every command is in the command line reference.
Access and keys
Your computer never holds the workspace's own key. Duscode Cloud checks you may open the workspace and gives your app, VS Code or terminal an access link or token that works only for that workspace and runs out after a few hours. VS Code and the terminal ask for a new one before it runs out, so you aren't interrupted. If the owner stops sharing a workspace with you, you can't get a new one.