This file is a prompt: paste it (or a link to it) into a coding agent that has shell access and the agent will install the NICo CLI (nicocli) for you. The agent will clone the repo, run the make target, handle common errors, and verify the install. If you are a human reading this, follow the steps yourself or use cli/README.md instead.
You are installing the NICo CLI (nicocli) for the user. Follow the steps below in order. Do not skip the verification step. If a step fails, consult the "Common failures" section before retrying; do not retry the same failing command more than twice without changing something.
When you are done, all of the following must be true:
- A binary named
nicocliexists at a known path. - That path is on the user's
PATHin a fresh shell (or the user has been told explicitly how to add it). nicocli --versionruns without error.- You have told the user the install path and version.
If any of those are not true, the task is not complete.
-
Check prerequisites. Run:
go version git --version make --version
You need Go 1.25.4 or newer, plus working
gitandmake. If any is missing or too old, stop and tell the user what to install. Do not attempt to install Go, git, or make yourself unless the user explicitly asks. -
Pick a working directory the user owns. Default to
~/Developer/nicocli-install/. Do not use/tmp/(some agent sandboxes block it, and some build systems treat it as ephemeral):WORKDIR="$HOME/Developer/nicocli-install" mkdir -p "$WORKDIR" cd "$WORKDIR"
-
Clone the upstream repo (shallow clone is fine; this is a build workspace, not a development checkout):
git clone --depth 1 https://github.com/NVIDIA/infra-controller-rest.git cd infra-controller-rest -
Build and install with the provided
maketarget:make nico-cli
This builds
nicocliand installs it to$(go env GOPATH)/bin/nicocliby default. To install elsewhere (for example, system-wide), passINSTALL_DIR:make nico-cli INSTALL_DIR="$HOME/.local/bin" # or, with sudo for a system path: sudo make nico-cli INSTALL_DIR=/usr/local/bin
Prefer a user-owned directory over
/usr/local/binso you don't needsudo. -
Verify the binary exists and reports a version. Use the absolute path first so you don't depend on
PATH:"$(go env GOPATH)/bin/nicocli" --versionThen verify it is on
PATHin a fresh shell. If not, see "PATH not set" below. -
Report back to the user with:
- The absolute install path (
$(go env GOPATH)/bin/nicoclior theINSTALL_DIRyou used) - The version string printed by
nicocli --version - Any
PATHshell-rc edit the user still needs to make
- The absolute install path (
-
command not found: go— Go is not installed. Stop and tell the user to install Go 1.25.4 or newer from https://go.dev/dl/. Do not auto-install Go. -
go: go.mod requires go >= 1.25.4— Installed Go is too old. Stop and ask the user to upgrade. -
command not found: make—makeis not installed. On macOS, suggestxcode-select --install. On Debian/Ubuntu, suggestsudo apt install build-essential. If the user cannot installmake, fall back to a directgo build:go build -o "$(go env GOPATH)/bin/nicocli" ./cli/cmd/cli -
command not found: git— installgitfirst. macOS:xcode-select --install. Linux: use the distro package manager. -
PATH not set:
nicocli: command not foundafter a successful build —$(go env GOPATH)/binis not onPATH. Tell the user to add it. Detect the shell first:echo "$SHELL"
For zsh (default on macOS):
echo 'export PATH="$(go env GOPATH)/bin:$PATH"' >> ~/.zshrc
For bash:
echo 'export PATH="$(go env GOPATH)/bin:$PATH"' >> ~/.bashrc
For fish:
fish_add_path "$(go env GOPATH)/bin"Tell the user to open a new shell or
sourcethe rc file before runningnicocli. -
permission deniedwriting to/usr/local/binor another system path — re-run withsudoor switchINSTALL_DIRto a user-owned directory (~/.local/bin,~/bin, etc.). Do not chmod the system directory. -
fatal: unable to access 'https://github.com/...': ...orgo mod downloadnetwork errors — confirm the user has internet access and (if behind a corporate proxy) thatHTTPS_PROXY/GOPROXYare set. Surface the exact error to the user; do not retry indefinitely. -
Repo not found at
NVIDIA/infra-controller-rest— the repo may have been renamed. Check https://github.com/NVIDIA for a repo whose name containsinfra-controllerornico. If you cannot find it, stop and ask the user for the current location. -
go: cannot find main module— you are not inside the cloned repo. Re-runcdinto the cloned directory. -
Build succeeds but
nicocli --versionprints nothing or hangs — the binary may be partially built or running TUI mode. Confirm you are passing--versionexactly, and run with a 10-second timeout:timeout 10 nicocli --version
If it still hangs, surface the issue to the user.
- Do not modify any source files in the cloned repo.
- Do not create commits, branches, or PRs in the cloned repo — it is a build workspace, not a development checkout.
- Do not delete or overwrite the user's existing
~/.nico/config.yaml. - Do not install Go, git, or
makeautomatically; ask the user instead. - Do not retry the same failing command more than twice. After two failures, change strategy or surface the failure to the user.
Once nicocli --version works, you may leave the cloned repo in place at $WORKDIR (so the user can rebuild later) or ask the user whether to remove it. Default: leave it in place.
To install via your agent, paste the URL of this file as a prompt. Example phrasings:
- "Install nicocli following the instructions at https://github.com/NVIDIA/infra-controller-rest/blob/main/cli/INSTALL.md"
- "Follow the steps in cli/INSTALL.md from https://github.com/NVIDIA/infra-controller-rest to install nicocli on this machine."