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 currently logged in 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, use the flag --help
:
nctl --help
To view all your resources of the current project, use the command nctl get all
:
nctl get all
To view all your resources of of a different project, use the flag -p <other-project-name>
:
nctl get all -p test1
To create a resource, use nctl create <resource> <name>
:
nctl create project test2
To update a resource, use nctl update <resource> <name>
:
nctl update project test2 --display-name="Test 2"
To delete a resource, use nctl delete <resource> <name>
:
nctl delete project test2
To edit a resource in your editor, use nctl edit <resource> <name>
:
nctl edit project test2
By default this uses the editor from the EDITOR
environment variable of your
shell. But you can also override the editor just for nctl by setting the
variable NCTL_EDITOR
.