Skip to main content

nanx supports Linux and macOS systems on both x86_64 (Intel) and ARM64 (Apple Silicon) architectures.

Requirements

  • Linux (x86_64) or macOS (Intel or Apple Silicon)
  • bash or zsh shell
  • curl or wget

Install with curl

The recommended installation method:

# Using zsh
curl -fsSL https://install.nanx.dev | zsh

# Using bash
curl -fsSL https://install.nanx.dev | bash

Install with wget

If you prefer wget:

wget -qO- https://install.nanx.dev | bash

Custom Install Directory

By default, nanx installs to ~/.local/bin. To install to a different location, set the NANX_INSTALL_DIR environment variable:

# Install to /usr/local/bin (may require sudo)
NANX_INSTALL_DIR=/usr/local/bin curl -fsSL https://install.nanx.dev | bash

# Install to custom directory
NANX_INSTALL_DIR=~/bin curl -fsSL https://install.nanx.dev | bash

Force Reinstall

If you already have nanx installed and want to force a reinstall (even if the same version), use the NANX_FORCE environment variable:

NANX_FORCE=1 curl -fsSL https://install.nanx.dev | bash

Adding to PATH

If ~/.local/bin is not already in your PATH, add the following to your shell profile:

# Add to ~/.bashrc or ~/.zshrc
export PATH="$PATH:$HOME/.local/bin"

Then reload your shell:

# For bash
source ~/.bashrc

# For zsh
source ~/.zshrc

Verify Installation

Check that nanx is installed correctly:

nanx --version

Updating

Once installed, you can update nanx at any time using:

nanx self update

See Self Management for more update options.

Uninstalling

To remove nanx from your system:

nanx self uninstall

Or manually:

rm ~/.local/bin/nanx