Skip to content

Dapla Team CLI

Welcome to the Dapla Team CLI documentation. This tool was created to make it easier for Dapla teams to manage different aspects of their teams, such as managing GCP roles and bucket access, creating secrets and managing team group members.

Features

  • Create GCP secrets
  • Interactively generate IAM bindings
  • List members of a team
  • Do pull request operations on team IAC repositories
  • More to come!

Jupyter

Dapla Team CLI is currently available on Jupyter in the staging environment. In order to use the CLI, you can simply open a terminal and run the command dpteam, no setup required!

Installation on local machine

Dapla Team CLI can be installed easily using pipx. If you do not have pipx installed on your system, follow their installation instructions before continuing.

To install Dapla Team CLI, run the command

pipx install dapla-team-cli

This might take quite a long time, so be patient! After the installation has finished, the dpteam command should be available in your terminal. If it isn't, you might have to close your current terminal and open a new one before it becomes available.

Enabling auto-complete

dapla-team-cli supports autocompletion for most shells. Run dpteam --help to get a list of supported shells (listed under the --show-completion/--install-completion options). For example, to install completion for the zsh shell, run dpteam --install-completion zsh. For some setups you might have to do some manual set up. If --install-completion does not work, run --show-completion <your-shell> and copy the output into your shell's rc file, e.g. ~/.zshrc for zsh.

Debugging

If something is not working, you can supply the option --loglevel debug (or the shorthand -v debug) to the CLI to get more verbose output. When invoking a subcommand, you need to supply the option to the main command, for example for the groups subcommand:

dpteam -v debug groups list-members

Common pitfalls

Not using pipx

pipx installs dapla-team-cli in its own virtual environment, avoiding any kind of dependency conflicts. If you install dapla-team-cli using some other tool like pip, you might encounter issues.

Not running pipx ensurepath

After installing pipx, you might have to run pipx ensurepath to make sure that pipx is available to you in your terminal. On Linux and Windows systems you may have to run python3 -m pipx ensurepath. Consult the pipx documentation for more information.

Other dependencies

Some features of the CLI require other third-party tools. You should have the git and gcloud tools installed on your system to get the full benefits of Dapla Team CLI.