Platform

Platform overviewArchitectureWorkflow orchestrationGitOps configurationGovernance and AAAAI and MCPKnowledge and contextRuntime and executionEvidence and monitoring

Use cases

All use casesProduction incidentRelease preparationHotfix to productionSecurity scan triage
Why NopsAIIntegrationsSecurity

Resources

All resourcesAI agent governanceMCP governanceMCP securitySelf-hosted platforms
PricingGitHub

Company

How a run worksAboutContactBook a demo

Command-line interface

Automation commands plus an interactive operator console over the same authenticated API.

ReferenceOperatorAdministratorDeveloper

Key points

  • The CLI drives the same authenticated REST API as the UI. It has no private path.
  • First-time installs download the latest GitHub Release archive from https://github.com/nopsai/nopsai/releases/latest, extract nopsai or nopsai.exe onto PATH, and remove the archive.
  • Contexts hold the API URL and credentials so one binary can target several installations.
  • The interactive console exposes API catalog calls, raw API requests, route listing and descriptions, context management, token login and logout, install generation, platform doctor, platform release, platform upgrade, completion generation, guide topics, help, and exit.
  • nopsai install docker-compose and nopsai install kubernetes generate version-pinned install files.
  • After the first install, nopsai update --version <x.y.z> downloads the exact OCI archive and SHA256SUMS, verifies the checksum, then replaces the local binary.
  • nopsai platform upgrade docker-compose|kubernetes --version <x.y.z> upgrades an installed platform. It keeps the secrets install generated, is forward-only, and prints the verified release changelog with the required actions before applying.
  • Interactive actions show the equivalent nopsai ... command as a final preview before anything is sent or changed.

Examples

Install the latest CLIbash
version="$(curl -fsSL https://api.github.com/repos/nopsai/nopsai/releases/latest | sed -nE 's/.*"tag_name": *"v?([^"]+)".*/\1/p' | head -1)"
[ -n "$version" ] || { echo "Could not resolve latest NopsAI release" >&2; exit 1; }
os="$(uname -s | tr '[:upper:]' '[:lower:]')"
arch="$(uname -m)"
case "$os" in linux|darwin) ;; *) echo "Unsupported OS: $os" >&2; exit 1 ;; esac
case "$arch" in x86_64|amd64) arch=amd64 ;; arm64|aarch64) arch=arm64 ;; *) echo "Unsupported architecture: $arch" >&2; exit 1 ;; esac
archive="nopsai-cli_${version}_${os}_${arch}.tar.gz"
base_url="https://github.com/nopsai/nopsai/releases/download/v${version}"

curl -fL "$base_url/$archive" -o "$archive"
curl -fL "$base_url/SHA256SUMS" -o SHA256SUMS
checksum_line="$(awk -v asset="$archive" '{ name=$2; sub(/^\*/, "", name); sub(/^\.\//, "", name); if (name == asset) print $0 }' SHA256SUMS)"
[ -n "$checksum_line" ] || { echo "Missing checksum for $archive" >&2; exit 1; }
if command -v sha256sum >/dev/null 2>&1; then
  printf '%s\n' "$checksum_line" | sha256sum -c -
else
  printf '%s\n' "$checksum_line" | shasum -a 256 -c -
fi
tar -xzf "$archive" nopsai
sudo install -m 0755 nopsai /usr/local/bin/nopsai
rm -f "$archive" SHA256SUMS nopsai
nopsai --version
Result

The nopsai binary is installed on PATH and the downloaded archive has been removed.

Point the CLI at an installation and check itbash
nopsai context add prod --api https://nopsai.example.com
nopsai context use prod
NOPSAI_TOKEN=nopat_<secret> nopsai login --token
nopsai platform doctor
Result

Doctor reports platform reachability and configuration problems it can detect from the client side.

Generate a pinned Docker Compose installbash
nopsai install docker-compose --version 1.4.2
Result

Generated Compose files and locks with exact versions rather than floating tags.

Review and apply a platform upgradebash
nopsai update --version 1.5.0
nopsai platform upgrade docker-compose --version 1.5.0 --plan
nopsai platform upgrade docker-compose --version 1.5.0 --run
Result

The plan prints the changelog and required actions; a series upgrade needs --accept-series-upgrade before it applies.

How it works

The live terminal layout uses centered screens with fixed header and footer chrome, breadcrumb text above nested menus, a fixed 20-row menu viewport, and a pinned guide and details section beneath it. Every feature menu, result viewer, wizard, and platform screen shares that layout.

API request parameter lists follow the wizard step order, expand the active item inline with its required marker and value, and render an empty active value as a cursor rather than a blank placeholder. Blank optional parameters, including multiline ones, advance with Enter.

UI release gates print UTC start and finish timestamps and durations for each npm stage so local-time log rendering cannot look like a loop.

Implementation evidence

  • doc/cli.md

    Contexts, credentials, interactive REST access, installs, and diagnostics.

  • internal/cli/command

    Command implementations, including the interactive console.