Skip to content

feat(studios): extend studio commands with support for configuration from git repository#642

Open
georgi-seqera wants to merge 1 commit into
masterfrom
gh/feat/studio-command-updates
Open

feat(studios): extend studio commands with support for configuration from git repository#642
georgi-seqera wants to merge 1 commit into
masterfrom
gh/feat/studio-command-updates

Conversation

@georgi-seqera

Copy link
Copy Markdown
Contributor

Configuring studios via Git repository config and studio configuration enhancements

This PR adds support for Git repository studio config as the headline feature, alongside several studio configuration enhancements across the add, start, and update commands.

Main change: Git-backed studio configuration

Studios can now be created from a Git repository via -u/--url, with an optional --revision (branch, tag, or commit). When a repository is provided, -t/--template becomes optional, since the remote repository may define the template itself.

tw studios add -n my-studio -w my-workspace -c my-ce --url https://github.com/owner/repo --revision main

Other enhancements

  • Environment variables — set env vars with repeatable -e/--env KEY=value pairs (available on add, start, and update).

    tw studios add -n my-studio -w my-workspace -c my-ce -t <template> -e FOO=bar -e BAZ=qux
  • Spot instances — launch on spot via --spot (on add and start). Note: whether spot instances are supported can depend on the chosen underlying compute environment where the studio is launched.

    tw studios add -n my-studio -w my-workspace -c my-ce -t <template> --spot
  • SSH connectivity — enable SSH with --ssh (on add, start, and update); SSH host/port/command are shown in the studio view.

    tw studios add -n my-studio -w my-workspace -c my-ce -t <template> --ssh
  • Change compute environment on update — move a stopped studio to a compatible CE with -c/--compute-env. If the target CE is incompatible, the CLI lists the compatible ones.

    tw studios update -w my-workspace -i <session-id> --compute-env another-ce
  • Richer studio view — the studio view now also shows Private, Lifespan, SSH details, and environment variables.

Command examples
# Set environment variables (repeatable) on any of the commands below
tw studios add -n my-studio -w my-workspace -c my-ce -t <template> \
  -e FOO=bar -e BAZ=qux

Add a template-based studio

tw studios add -n my-studio -w my-workspace -c my-ce \
  -t cr.seqera.io/public/data-studio-vscode:1.93.1-snapshot

Add a Git-backed studio (template optional)

# With a revision
tw studios add -n my-studio -w my-workspace -c my-ce \
  --url https://github.com/owner/repo --revision main

# Without a template — the repository may define it
tw studios add -n my-studio -w my-workspace -c my-ce \
  --url https://github.com/owner/repo

Add on spot instances with SSH enabled

tw studios add -n my-studio -w my-workspace -c my-ce -t <template> \
  --spot --ssh

Start a studio with overrides

tw studios start -w my-workspace -i <session-id> --spot --ssh

Update SSH connectivity

tw studios update -w my-workspace -i <session-id> --ssh

Move a stopped studio to a compatible compute environment

tw studios update -w my-workspace -i <session-id> --compute-env another-ce

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant