Skip to content
naisPublic

Repository files navigation

Nais Command Line Interface

This repository contains the source code for the Nais command line interface (CLI).

See the CLI documentation for usage instructions.

Local Development

Adding a command that uses nais-relay

Follow the shared relay integration requirements and fill in the integration template in the product's design or rollout documentation. A new command needs a product-specific authenticated NAIS API mutation and an approved target policy; the CLI does not create RelayAccess resources.

Install development tools

mise install

Build Nais CLI

mise run build

Run tests

mise run test

Verify Nais CLI

./bin/nais --version

Set up shell completion for local builds

For example, enable Zsh completion in the current session:

source <(./bin/nais completion zsh)

Supported shells: Zsh, Bash, Fish, and PowerShell. Run ./bin/nais completion <shell> --help for shell-specific setup instructions.

Instrumentation

We use otel for instrumentation and record the user interaction with the CLI to see if we can optimize the user experience.

We respect your privacy and do not collect telemetry if you set the environment variable DO_NOT_TRACK=1, following the Do Not Track convention.

There's a grafana dashboard.

Contributing

This repo uses Conventional Commits. Please read up on how to format your commit messages. Please see the commit-msg hook to see which types we allow.

Releases

Used by

Contributors

Languages