Installation
Windows
Install via Powershell
Download and execute the PowerShell script to install the Codespaces CLI.
macOS
Homebrew is the easiest way to manage your CLI install. It provides convenient ways to install, update, and uninstall. If you don't have homebrew available on your system, install homebrew before continuing.
You can install the CLI by updating your brew repository information, and then running the install command:

I am on macOS Sierra version 12.10.16. I downloaded an application. This app has.dmg extension. I would like to install it without using sudo or without being one of the sudo users. When I do hdi. Jan 19, 2018 But, one of the best things about using a Mac is how easy it is to install software. And removing most software packages on macOS is just as easy. Don't install ruby with homebrew if you are going to use a ruby version manager, i.e. I would at this point recommend brew uninstall ruby. Then use rbenv if you already have it working to install.
Linux
Install via apt
Add the public key for the microsoft repo:
Add the necessary repo for your release:
MacOS Package (.pkg) Installer. The easiest way to install MacPorts on a Mac is by downloading the pkg or dmg for Catalina, Mojave, High Sierra, Sierra, El Capitan, Yosemite, Mavericks, Mountain Lion, Lion, Snow Leopard, Leopard or Tiger and running the system's Installer by double-clicking on the pkg contained therein, following the on-screen instructions until completion.
Ubuntu
- Ubuntu 18.04:
- Ubuntu 16.04:
- Ubuntu 14.04:
Debian
Debian 10:
Debian 9:
Debian 8:
Update apt-get:
Install the Codespaces CLI:
For other Linux distributions, run the following script by using curl and pipe directly to bash, or download the script to a file and inspect it before running.
Usage
Codespaces is launched using the following command:
The following options can be provided to Codespaces:
-v | --versionDisplays the current installed version of the CLI-? | -h | --helpPrints out help information for the command
The following commands are available:
startBegins the interactive process of registering your self-hosted machine. For more information, see Start Codespaces.stopRemoves your machine from Visual Studio Codespaces
Start Codespaces
Install Sudo Windows
The start command begins the interactive process of registering your self-hosted machine:
Macos Sudo Without Password
Macos Sudo Operation Not Permitted
These arguments can be provided to the start command:
Note
You can either specify your plan by supplying either the subscription, resource group, and name or the plan id.
-s | --subscriptionThe Subscription of the plan this environment should be registered to-r | --resource-groupThe Resource Group of the plan this environment should be registered to-p | --plan-nameThe existing plan name this environment should be registered to-i | --plan-idThe fully qualified plan id ('/subscriptions/...')-w | --workspace-pathThe workspace path. By default, the CLI will use the current working directory as the landing point when you connect. You will be able to switch folders after connection.-n | --nameThe environment name-v | --serviceIf supplied, runs the local agent as a service/daemon on this machine (Requires admin/sudo privileges on Windows and OSX)-? | -h | --helpShow help information
Stop Codespaces
The stop command removes your environment from the Visual Studio Codespaces service: