Skip to main content
Documentation
Preview
You're viewing the Next docs — a rolling preview of in-development changes. The current release docs may differ.

Nexigon CLI

Nexigon CLI is a command line tool to interact with Nexigon Hub and access devices remotely.

Installation and Setup

For older builds and checksums, see the Nexigon CLI releases.

This documentation tracks unreleased CLI changes. For installation instructions and downloads for the current release, see the CLI 0.6 documentation.

On Linux and macOS, ensure that the binary is executable with chmod +x nexigon-cli.

If you want, put the binary into some global directory for executables, e.g., ~/.local/bin.

Configure Nexigon CLI by running the following command:

nexigon-cli configure

You need to provide the URL to your Nexigon Hub instance and either a user access token starting with u_sk or an organization API token starting with org_sk. Organization token access is limited by the token’s policy.

Nexigon Hub URL: https://eu.nexigon.cloud/
User or Organization API Token: [hidden]

The configure command will create a file ~/.nexigon/cli.toml with the following structure:

~/.nexigon/cli.toml
hub-url = "https://eu.nexigon.cloud/"
token = "u_sk_Ufw5NttTcMJYJFVw4pHBxB2HpwztZkn1Emou6XvLtk5R332a3NT71xhR2xxhTp6MFd"

Port Forwarding

Agent 0.6 permits a remote port if it is declared as an HTTP export, appears in the enabled forwarding.allowed-tcp-ports list, or the device enables forwarding.allow-all-ports. See the agent configuration guide.

To forward a port to your local machine, use the following command:

nexigon-cli forward <device id> [<local port>:<remote port>]*

Schedule Builds from CI

Use the version ID returned by creation when changing a particular build’s deadline. A floating tag might select a different build later.

# Retain a new nightly build for seven days.
nexigon-cli repositories versions create firmware/controller \
  --name nightly --tag nightly --delete-after 7d

# Reset a particular build's deadline to fourteen days from now.
nexigon-cli repositories versions schedule-deletion <version-id> --delete-after 14d

# Cancel this deadline. Package retention still applies.
nexigon-cli repositories versions schedule-deletion <version-id> --cancel

Durations must be positive. Use seconds (s), minutes (m), hours (h), days (d), or weeks (w), including combinations such as 2h30m. A day is 24 hours and a week is seven days. Calendar months and years are not supported. The CLI computes the deadline using its current clock immediately before sending the request. Rescheduling counts from now, not from the previous deadline.

For an absolute deadline, use --delete-at when creating a version or --at when scheduling an existing version. Timestamps must include a timezone:

nexigon-cli repositories versions schedule-deletion <version-id> --at 2027-01-31T00:00:00Z

Choose one of a duration, an absolute deadline, or cancellation. Creation stores the deadline atomically with the new version, so a rejected deadline leaves no version behind. Scheduling requires the same package permission as manual version deletion.

See scheduled version deletion for tag removal, cancellation, and asset cleanup behavior.

Preserve Releases and Retain Routine Builds

Seal a completed release to permanently protect its contents and prevent deletion. Complete its contents and metadata first; sealing cannot be reversed.

Configure retention per package. Either exceeded limit deletes an unsealed version; sealed versions are excluded and do not count toward the limit.

# Keep at most 100 unsealed versions and expire builds older than 30 days.
nexigon-cli repositories packages set-retention firmware/controller --max-versions 100 --max-age-days 30

# Permanently preserve a completed release and cancel any scheduled deletion.
nexigon-cli repositories versions seal <version-id>

# Disable the package policy. Explicit deletion schedules still apply.
nexigon-cli repositories packages set-retention firmware/controller --disable

set-retention replaces the policy. Supply only --max-versions or --max-age-days to use a single limit. Changes apply to existing versions on the next cleanup run. Seal releases before enabling a policy that could delete them. Use packages info to inspect the saved policy and versions info to inspect protection.

See sealed versions and version retention for editing, tagging, deletion, and storage cleanup behavior.