Skip to main content

nctl

nctl is a tool to interact with your Nine self-service products.

Installation

To install nctl, please follow the setup on GitHub.

Getting started

Log in

To log in with nctl, you can use the following command and use your Cockpit credentials: nctl auth login

Projects and Organizations

To switch between projects, you can do the following:

$ nctl get projects
NAME DISPLAY NAME
test <none>

$ nctl auth set-project test

To switch between organizations, you can do the following:

$ nctl auth whoami
You are currenlty logged in the with the following account: "test@nine.ch"
Your current organization: "test"

Available Organizations:
test
test1

$ nctl auth set-org test1

Interacting with Nine resources

To see all available commands, you can use the following command: nctl --help

To view all your resources of the current project, you can use the following command: nctl get all

To view all your resources of of a different project, you can use the following command: nctl get all -p <other-project-name>

To create a resource, you can use the following command: nctl create <resource> <name> e.g. nctl create project test2

To update a resource, you can use the following command: nctl update <resource> <name> e.g. nctl update project test2

To delete a resource, you can use the following command: nctl delete <resource> <name> e.g. nctl delete project test2