CLI Profiles

This article is a guide for the bns configure profiles command.


Introduction

The bns configure profiles command in the Bunnyshell CLI allows you to manage configuration profiles.

Configuration profiles are sets of customized settings that can be used to work with different environments or setups within the same Bunnyshell CLI installation. They are extremely useful when working on multiple projects simultaneously.

This guide will walk you through the available subcommands and their functionalities.


CLI Subcommands

  1. add

Usage: bns configure profiles add [flags]

Description: Use this subcommand to add a new configuration profile.

Flags:

  • --default: Set the newly created profile as the default profile.
  • --environment string: Set the environment context for all resources associated with this profile.
  • --name string: Unique name for the new profile.
  • --organization string: Set the organization context for all resources associated with this profile.
  • --project string: Set the project context for all resources associated with this profile.
  • --service string: Set the ServiceComponent context for all resources associated with this profile.
  • --token string: Set the API token for the new profile.

The flags are optional, as there is a wizard to require all needed information from the user.


  1. context

Usage: bns configure profiles context

Description: Use this subcommand to manage the context settings for the current profile.

Interaction: The CLI will prompt you with options to remove context values such as organization, project, environment, and component. You can choose whether to remove any of these context values. Once you interact with the prompts, the profile context will be updated.


  1. default

Usage: bns configure profiles default

Description: Use this subcommand to set a specific local profile as the default profile.

Interaction: The CLI will prompt you to provide the name of the local profile you want to set as the default. Once you provide the profile name, the specified profile will become the default, automatically used when no specific profile is specified in a command.


  1. list

Usage: bns configure profiles list

Description: Use this subcommand to display a list of available profiles and their associated details.

Output: The CLI will provide a JSON output containing the available profiles, their tokens, and context configurations, if available.


  1. remove

Usage: bns configure profiles remove

Description: Use this subcommand to remove a specific local profile from the available profiles.

Interaction: The CLI will prompt you to provide the name of the profile you want to remove. Once you provide the profile name, the specified profile and its associated configurations will be permanently deleted.


Important Notes

  • Be cautious when using the remove subcommand, as it permanently deletes the specified profile and its settings.
  • The default subcommand sets the specified profile as the default, which is used when no specific profile is provided in a command.

Remember that configuration profiles in the Bunnyshell CLI provide flexibility and ease of use when working with various environments and setups. Use the bns configure profiles command to manage and customize your CLI experience based on your requirements.


πŸ“˜

For more detailed information on each subcommand and its available options, you can use the --help flag with any of the subcommands. For example: bns configure profiles add --help.