LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

gh-cs

shorthand for codespaces management

TLDR

Create a codespace for a repository
$ gh cs create -R [owner/repo]
copy
List codespaces
$ gh cs list
copy
Connect to codespace via SSH
$ gh cs ssh -c [codespace-name]
copy
Open codespace in VS Code
$ gh cs code
copy
Stop a running codespace
$ gh cs stop -c [codespace-name]
copy
Delete a codespace
$ gh cs delete -c [codespace-name]
copy
Copy files from codespace to local machine
$ gh cs cp remote:[/path/to/file] [local/path]
copy

SYNOPSIS

gh cs command [options]

DESCRIPTION

gh cs is the shorthand alias for gh codespace, managing GitHub Codespaces from the command line. Codespaces are cloud-hosted development environments that provide a full VS Code experience with configurable compute resources.The command enables creating, connecting, and managing codespaces without visiting github.com. It supports SSH connections for terminal access, integration with local VS Code installations, and file copying between local and remote environments.

PARAMETERS

create

Create a new codespace.
list
List available codespaces.
ssh
SSH into a codespace.
code
Open codespace in Visual Studio Code.
stop
Stop a running codespace.
delete
Delete codespaces.
ports
List and manage port forwarding.
cp
Copy files between local and remote file systems.
logs
Access codespace logs.
rebuild
Rebuild a codespace.
view
View details about a codespace.
jupyter
Open a codespace in JupyterLab.
edit
Edit a codespace.
-c CODESPACE, --codespace CODESPACE
Target codespace name. If omitted, a list is displayed for selection.
-R REPO, --repo REPO
Repository for new codespace.
--help
Display help information.

INSTALL

sudo apt install gh
copy
sudo dnf install gh
copy
sudo pacman -S github-cli
copy
sudo apk add github-cli
copy
sudo zypper install gh
copy
brew install gh
copy
nix profile install nixpkgs#gh
copy

CAVEATS

Requires GitHub account with Codespaces access. Usage may incur charges. Codespaces have timeout and retention limits.

HISTORY

gh cs was added to the GitHub CLI to support Codespaces, GitHub's cloud development environment launched in 2020.

SEE ALSO

gh(1), gh-codespace(1), gh-repo(1), code(1)

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid