Skip to content

Conversation

@peterschmidt85
Copy link
Contributor

@peterschmidt85 peterschmidt85 commented Jan 23, 2026

  1. Similar to gh auth login, if the user does not pass --url to dstack login, the command prompts the user to enter it interactively. The default value in this case is https://sky.dstack.ai.

  2. If the logged-in user has more than one project, dstack login prompts the user to select a default project using an interactive menu.

Screenshot 2026-01-23 at 16 41 07
  1. Similar to dstack project, to explicitly avoid interactive prompts, dstack login now accepts -n/--no (does not change the default project) and -y/--yes (sets the user’s first project as the default).
Screenshot 2026-01-23 at 16 41 16

Note

Enhances dstack login with interactive UX and clearer project configuration.

  • Interactive URL prompt via rich (UrlPrompt) when --url is omitted; defaults to https://sky.dstack.ai
  • Provider selection prompt using questionary when multiple providers and TTY; otherwise requires -p/--provider
  • New --yes and --no flags to control default project selection; automatic logic for single project or preserving existing default
  • Project config flow: add all projects as non-default, then set a default (auto or via select_default_project); updated console messages
  • Tests updated to cover no projects, multi-project with/without prompts, --yes/--no, and single-project auto-default

Written by Cursor Bugbot for commit fca3d6e. This will update automatically on new commits. Configure here.

cursor[bot]

This comment was marked as outdated.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

token=selected_project.token,
default=True,
)
config_manager.save()
Copy link

Choose a reason for hiding this comment

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

Missing confirmation message after interactive project selection

Low Severity

The interactive project selection path (the else branch) successfully configures and saves the selected default project but does not print a confirmation message. All other code paths that set a default project (the --yes flag at lines 193-195 and the auto-default case at lines 224-226) print a "Set [project] project as default at [path]" message. This inconsistency means users who interactively select a project receive no feedback that their selection was applied.

Fix in Cursor Fix in Web

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants