Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/gnmyt/Nexterm/llms.txt

Use this file to discover all available pages before exploring further.

The nt CLI exposes a set of subcommands that cover the full lifecycle of working with your Nexterm servers from the terminal: authenticating, browsing your inventory, opening interactive sessions, running one-off commands, and forwarding ports. Every subcommand resolves servers by numeric ID, exact name, or fuzzy match, so you rarely need to look anything up first.
You must run nt login at least once before using any other command. See Installation for setup instructions.

nt login

Authenticate with a Nexterm server and save the session token to ~/.config/nexterm/config.json.
nt login
When you run nt login, you are prompted to:
  1. Enter (or confirm) your server URL — for example, https://nexterm.example.com.
  2. Choose an authentication method:
    • Code — a one-time code is printed. Enter it in the web UI under Servers → Connect Device.
    • Browser — your default browser opens the authorization page automatically.
The CLI polls for authorization and prints the account name once access is granted.

nt logout

Clear the stored session token. You will need to run nt login again before any authenticated command works.
nt logout

nt ls

List all servers in a tree that mirrors the folder hierarchy in the Nexterm web UI. Only terminal-based entries (SSH, Telnet, PVE LXC, PVE Shell) are shown.
nt ls

Flags

FlagTypeDescription
--folder <name>stringShow only servers inside a folder whose name contains <name> (case-insensitive).
--tag <name>stringShow only servers that have a tag whose name contains <name> (case-insensitive).
--jsonbooleanPrint the raw server inventory as pretty-printed JSON instead of the tree view.

Examples

nt ls
Each server line in the tree output includes its numeric ID (for example, #8), name, protocol, IP address, and any tags. You can pass the ID directly to nt connect to avoid any name ambiguity.

nt connect

Open an interactive terminal session with a server, or run a single command on it non-interactively.
nt connect <server>
nt connect <server> -- <command>
The <server> argument is resolved in order:
  1. Numeric ID — matches the #N shown by nt ls (for example, nt connect 8).
  2. Exact name — case-insensitive match on the server name.
  3. Fuzzy match — the closest matching server name or IP is selected automatically.
If the server has more than one identity attached, you are prompted to pick one before the connection is established.

Running a command non-interactively

Append -- followed by the command you want to run. Standard output and standard error are printed directly, and the remote exit code is forwarded to the calling shell.
nt connect my-server -- uptime
This makes it straightforward to compose nt connect with other shell tools:
nt connect 8 -- "df -h" | grep /dev/sda1
Use the numeric ID in scripts to guarantee you target the right server even if you rename it later.

Fuzzy-search across all your servers by name and IP address, then pick one from an interactive ranked list to connect to.
nt search <query>
nt search <query> -- <command>
Results are ranked by match quality. The selection prompt is itself a fuzzy-search input, so you can narrow the list further after the initial query.

Examples

nt search "mail"

nt recent

Browse your full server list interactively and select one to connect to. Useful when you don’t remember a server’s exact name or ID.
nt recent
All connectable servers are shown in a scrollable list. Select one and press Enter to open an interactive session.

nt forward

Forward a remote port to your local machine through a server, similar to ssh -L. The tunnel stays open until you press Ctrl+C.
nt forward <server> --port <remote-port> [--local <local-port>] [--remote <remote-host>]
The <server> argument follows the same resolution rules as nt connect (numeric ID, exact name, or fuzzy match).

Flags

FlagTypeDefaultDescription
--port <n> / -pnumberRequired. The port on the remote side to expose.
--local <n> / -lnumberSame as --portLocal port to listen on.
--remote <host> / -rstring127.0.0.1Remote host to connect to on the server’s network.

Examples

nt forward my-server --local 8080 --port 3000
In the first example, the server’s port 3000 becomes available at 127.0.0.1:8080 on your machine. In the second example, the CLI connects through my-server to a host at 10.0.0.5 on the server’s network and exposes its port 5432 locally.
The --remote flag is useful for reaching databases, internal services, or admin panels that are not directly exposed on the server itself.

nt config

View and modify CLI configuration stored in ~/.config/nexterm/config.json.

Subcommands

config show

Print all configuration keys and their current values.
nt config show
Example output:
server-url:           https://nexterm.example.com
accept-invalid-certs: false
session-token:        (set)

config set

Set a configuration key to a new value.
nt config set <key> <value>
nt config set server-url https://nexterm.example.com
nt config set accept-invalid-certs true

config get

Print the current value of a single key.
nt config get <key>
nt config get server-url

Configuration keys

KeyDescription
server-urlThe URL of your Nexterm server.
accept-invalid-certsSet to true to allow self-signed SSL certificates.

Build docs developers (and LLMs) love