2025-03-14 21:59:59 -06:00
|
|
|
# gh codespace
|
|
|
|
|
|
|
|
|
|
> Connect and manage your codespaces in GitHub.
|
|
|
|
|
> More information: <https://cli.github.com/manual/gh_codespace>.
|
|
|
|
|
|
|
|
|
|
- Create a codespace in GitHub interactively:
|
|
|
|
|
|
2025-12-16 10:20:31 -07:00
|
|
|
`gh {{[cs|codespace]}} create`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- List all available codespaces:
|
|
|
|
|
|
2025-12-16 10:20:31 -07:00
|
|
|
`gh {{[cs|codespace]}} {{[ls|list]}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Connect to a codespace via SSH interactively:
|
|
|
|
|
|
2025-12-16 10:20:31 -07:00
|
|
|
`gh {{[cs|codespace]}} ssh`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Transfer a specific file to a codespace interactively:
|
|
|
|
|
|
2025-12-16 10:20:31 -07:00
|
|
|
`gh {{[cs|codespace]}} cp {{path/to/source_file}} remote:{{path/to/remote_file}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- List the ports of a codespace interactively:
|
|
|
|
|
|
2025-12-16 10:20:31 -07:00
|
|
|
`gh {{[cs|codespace]}} ports`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Display the logs from a codespace interactively:
|
|
|
|
|
|
2025-12-16 10:20:31 -07:00
|
|
|
`gh {{[cs|codespace]}} logs`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Delete a codespace interactively:
|
|
|
|
|
|
2025-12-16 10:20:31 -07:00
|
|
|
`gh {{[cs|codespace]}} delete`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Display help for a subcommand:
|
|
|
|
|
|
2025-12-16 10:20:31 -07:00
|
|
|
`gh {{[cs|codespace]}} {{code|cp|create|delete|edit|...}} {{[-h|--help]}}`
|