Skip to content

[UX]: Add dstack project CLI to configure, list and switching between projects#2653

Merged
peterschmidt85 merged 2 commits intomasterfrom
2553-dstack-project-cli-command
May 19, 2025
Merged

[UX]: Add dstack project CLI to configure, list and switching between projects#2653
peterschmidt85 merged 2 commits intomasterfrom
2553-dstack-project-cli-command

Conversation

@peterschmidt85
Copy link
Copy Markdown
Contributor

Fixes #2553

Benefits

Easily switch between local and hosted servers and view the current user configuration using the new dstack project command.

How it works

The new dstack project command replaces the existing dstack config command.

  1. dstack project (same as dstack project list)
$ dstack project

 PROJECT         URL                    USER            DEFAULT
 peterschmidt85  https://sky.dstack.ai  peterschmidt85
 main            http://127.0.0.1:3000  admin              ✓
  1. dstack project set-default
$ dstack project set-default peterschmidt85
OK

3 dstack project add (similar to old dstack config, but --project is changed to --name)

$ dstack project add --name peterschmidt85 --url https://sky.dstack.ai --token 76d8dd51-0470-74a7-24ed9ec18-fb7d341
OK

@peterschmidt85 peterschmidt85 requested a review from r4victor May 17, 2025 12:45
@peterschmidt85 peterschmidt85 linked an issue May 17, 2025 that may be closed by this pull request
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why leaving documentation for dstack config with an example for dstack project.


class ProjectCommand(BaseCommand):
NAME = "project"
DESCRIPTION = "Manage projects"
Copy link
Copy Markdown
Collaborator

@r4victor r4victor May 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd clarify that dstack project manages only the CLI configuration. Otherwise, users may get an impression that it can add and delete projects on the server.

@peterschmidt85 peterschmidt85 changed the title [UX]: Better UX for switching between projects using the CLI [UX]: Add dstack project CLI to configure, list and switching between projects May 19, 2025
@peterschmidt85 peterschmidt85 merged commit a5b9b93 into master May 19, 2025
5 checks passed
@peterschmidt85 peterschmidt85 deleted the 2553-dstack-project-cli-command branch May 19, 2025 09:26
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.

[UX]: Better UX for switching between projects using the CLI

2 participants