Skip to content

Conversation

@jedisct1
Copy link

Add a new fastly setup command providing an interactive wizard for configuring the Fastly CLI with API token or SSO authentication.

Change summary

After installing the CLI for the first time, it’s not obvious how to set it up or register a profile.

Running fastly sso is not necessarily what users would try first. When they do, it fails and tells them to use fastly profile create. However, fastly profile create asks for a token, while SSO is usually what users expect to use when setting up the CLI initially.

We’ve received feedback from customers who wanted to use the MCP server but struggled to configure the CLI on their first attempt, and I experienced the same confusion myself.

This PR introduces a simple command designed to immediately catch the attention of new users right after installation, before they even need to consult the online documentation.

setup               Interactive setup wizard for configuring the Fastly CLI

It checks whether a default profile already exists, lets users register a new profile either with an API token or via SSO, and gracefully handles conflicts with existing profile names.

It also prints a small set of suggested commands that users can run to try out the tool, along with the path where the configuration is stored. This information is especially helpful for first-time users.

The command name is intentionally generic ("setup"), allowing it to be extended in the future to support additional CLI setup tasks, such as enabling or configuring optional components.

While this command doesn’t introduce any new capabilities, it improves the onboarding experience.
It can also be run in non-interactive mode.

This is meant as a proposal. The setup command may feel redundant, and if the consensus is that it doesn’t add enough value, closing the pull request is completely fine :)

All Submissions:

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?

New Feature Submissions:

  • Does your submission pass tests?

Changes to Core Features:

  • Have you written new tests for your core changes, as applicable?
  • Have you successfully run tests with your changes locally?

User Impact

Improved onboarding experience.

Are there any considerations that need to be addressed for release?

A short documentation page needs to be written for this new command. I’d be happy to do it.

No breaking changes expected.

But this also addresses an old TODO item in profile/create.go about consolidating the directory check logic that was duplicated in multiple places (and would have had to be duplicated one more time).

@jedisct1 jedisct1 requested a review from a team as a code owner January 26, 2026 21:59
@jedisct1 jedisct1 requested a review from kpfleming January 26, 2026 21:59
Add new 'fastly setup' command providing an interactive wizard for
configuring the Fastly CLI with API token or SSO authentication.
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