v0.1.6·Open source under MIT

Log in to Nipa Cloud once a day. Run OpenStack tools all day.

nipa turns your password and one OTP code into a session, then runs openstack, terraform or any other tool with it.

npm install -g nipa-cli
Read the quickstart
nipa
TryMade-up data
Lake George, John Frederick Kensett, 1869

Why nipa

A Nipa Cloud account with multi-factor authentication needs your password and a one-time code to log in, and application credentials can't skip that rule. nipa asks for both once, keeps the token Keystone returns, and hands it to every tool you run until it expires, 24 hours later.

The token stays in ~/.config/nipa with mode 0600. nipa never saves the OTP code or its secret, because a second factor on the same disk as the password stops being a second factor. How nipa logs in with MFA

How it works

One login. Every tool you already use.

01

Log in once

nipa login asks for your password and an OTP code, then saves a token for your project. nipa whoami shows how long it has left, and nipa switch moves to another project without asking again.

nipa whoami
$ nipa whoami> Logged in as me@example.com> Profile: prod (identity-api.nipa.cloud, NCP-TH)> Project: my-project (1234567890abcdef1234567890abcdef)> The session expires in 23h 41m$ nipa switch billing> Success! Switched to billing [184ms]
02

Run your tools with that session

nipa os runs openstack, nipa tf runs terraform and nipa exec runs anything else. Each starts with the session in its OS_ variables, so you need no openrc file.

nipa tf plan
$ nipa -P staging tf plan> Using profile staging (keystone.example.com)Plan: 2 to add, 0 to change, 0 to destroy.$ nipa exec env | grep OS_AUTHOS_AUTH_TYPE=v3tokenOS_AUTH_URL=https://identity-api.nipa.cloud/v3
03

See what's wrong, not only what's there

nipa lists your servers, volumes, networks, databases and load balancers through the API the Space portal calls. Its inspect commands end with what needs your attention.

nipa lb inspect
$ nipa lb inspect web-lb> Load balancer web-lb in my-project [428ms]  ID              0b6f3c1e-8a52-4d7e-9c41-5e2a7f90d3b8  Status          ● Active  Health          ● Degraded  Address         192.0.2.12  External IP     203.0.113.20  Created         12d ago> 3 members  Member     Address           Backend group     Weight     Backup     Status       Health  web-1      192.0.2.21:80     web               1          No         ● Active     ● Online  web-2      192.0.2.22:80     web               1          No         ● Active     ● Error  web-3      192.0.2.23:80     web               1          No         ● Active     ● Error> NOTE: 2 of 3 members are down.

One OTP code in the morning. No more until tomorrow.

A session lasts 24 hours. nipa whoami shows how long it has left.

The Oxbow, Thomas Cole, 1836

Features

Built for the way you work in a terminal.

  • Profiles

    Keep production and a staging Keystone side by side. Add a profile once, then name it on any command.

    nipa -P staging tf plan

  • Linked folders

    Link a folder to a profile and a project. Every command there uses them, so your Terraform code plans against the right project.

    nipa -P staging link my-project

  • Doctor

    When a command fails, doctor checks your profile, session and network in one go and says what to fix. It changes nothing.

    nipa doctor

  • Quotas

    See how much of each quota your project uses. A quota at 80% shows in yellow, and one at 100% in red, before the next create fails.

    nipa quota

  • Pipes and JSON

    Tables for people, IDs for scripts. In a pipe, a list prints one ID per line, and --json prints all of it.

    nipa server ls --json

  • Tab completion

    Press Tab for commands, options and the names of your own servers and security groups, in bash, zsh, fish and PowerShell.

    nipa completion --install

Commands

24 commands, one session.

Session

nipa login
Log in with your password and an OTP code
nipa logout
Revoke the token and forget the session
nipa whoami
Show who you're logged in as
nipa switch
Use another project
nipa link
Use a project in this folder
nipa unlink
Stop using a linked project in this folder

Resources

nipa server
List, inspect, start, stop and restart your servers
nipa flavor
List the flavors a server can have
nipa volume
List the volumes in your project
nipa network
List the networks in your project
nipa sg
List and inspect your security groups
nipa ip
List the external IPs in your project
nipa lb
List and inspect your load balancers
nipa k8s
List the Kubernetes clusters in your project
nipa db
List and inspect your databases
nipa quota
Show how much of each quota your project uses
nipa open
Open the Space portal in your browser

Run tools

nipa os
Run openstack with the session
nipa tf
Run terraform with the session
nipa exec
Run any command with the session
nipa env
Print the OS_* variables for your shell

Setup

nipa profile
Manage Keystone profiles, such as staging
nipa doctor
Check your setup and say what to fix
nipa completion
Print or install the tab completion script

Every command and option in the CLI reference

Type your OTP code once today.

Install nipa from npm with Node.js 22.13 or later, or download a binary for your platform.

npm install -g nipa-cli
A Gorge in the Mountains (Kauterskill Clove), Sanford Robinson Gifford, 1862