System Utilities
The nanx sys command provides system utilities including
system monitoring and automated setup profiles.
Subcommands
top Beta
Interactive system monitor showing CPU, memory, disk, and process information:
nanx sys top The system monitor provides real-time insights into your system's performance and resource usage.
Features
- CPU Usage: Per-core and overall CPU utilization
- Memory: RAM usage, swap, and available memory
- Disk I/O: Read/write speeds and usage
- Processes: Top processes by CPU and memory
- Network: Network interface stats (if available)
Providers
The sys top command supports multiple backend providers:
| Provider | Platform | Notes |
|---|---|---|
btop | All platforms | Rich TUI with graphs (recommended) |
native | All platforms | Built-in nanx implementation |
htop | Linux, macOS | Classic terminal monitor |
auto | All platforms | Auto-detect best available (default) |
Configuration
Configure the system monitor in your config.yaml:
sys:
top:
provider: btop # or native, htop, auto Installing Providers
Install btop for the best experience:
# Using nanx apps
nanx apps install btop
# Or manually
# macOS
brew install btop
# Ubuntu/Debian
sudo apt install btop
# Arch Linux
sudo pacman -S btop Usage Examples
# Use default provider (auto-detect)
nanx sys top
# Force use btop
nanx sys top --provider btop
# Use native implementation
nanx sys top --provider native setup Alpha
Automated system setup using predefined profiles:
nanx sys setup The setup command helps bootstrap development environments by installing and configuring tools based on predefined profiles.
Profile Types
| Profile | Includes |
|---|---|
minimal | Essential tools only (git, curl, jq) |
developer | Common dev tools (node, python, docker) |
web | Web development stack (node, pnpm, deno) |
rust | Rust development (rustc, cargo, rust-analyzer) |
python | Python development (python, pip, poetry) |
full | Complete development environment |
Interactive Setup
# Run interactive setup wizard
nanx sys setup
# Prompts will guide you through:
# 1. Select profile(s) to install
# 2. Confirm tools to be installed
# 3. Configure shell integration
# 4. Set editor preferences Non-Interactive Setup
# Install specific profile
nanx sys setup --profile developer --yes
# Install multiple profiles
nanx sys setup --profile web,rust --yes
# Skip package installation (config only)
nanx sys setup --config-only What Gets Installed
Example for developer profile:
- Version Control: git, gh (GitHub CLI)
- Languages: node, python3, rustc
- Package Managers: pnpm, pip, cargo
- Containers: docker, docker-compose
- Utilities: jq, ripgrep, fzf, bat
- Editors: VS Code or configured editor
Post-Setup
After setup completes:
- Shell configuration is updated (bashrc/zshrc)
- Environment variables are set
- nanx shortcuts are configured
- Editor integration is enabled
Command Options
sys top Options
| Option | Description | Default |
|---|---|---|
--provider <name> | Force specific provider | auto |
--refresh <seconds> | Update interval (native provider only) | 1 |
sys setup Options
| Option | Description | Default |
|---|---|---|
--profile <name> | Select profile(s) to install | Interactive prompt |
--yes, -y | Skip confirmation prompts | false |
--config-only | Configure without installing packages | false |
--dry-run | Show what would be installed | false |
Examples
Monitor System Resources
# Launch system monitor
nanx sys top
# Use btop explicitly
nanx sys top --provider btop Fresh Machine Setup
# Interactive wizard
nanx sys setup
# Quick developer setup
nanx sys setup --profile developer -y
# Web + Rust development
nanx sys setup --profile web,rust -y
# See what would be installed
nanx sys setup --profile full --dry-run Troubleshooting
System Monitor
Provider Not Found
# Install btop
nanx apps install btop
# Or fall back to native
nanx sys top --provider native Permission Issues
Some system metrics may require elevated privileges:
# Run with sudo if needed (not recommended for btop)
sudo nanx sys top System Setup
Installation Failures
If setup fails:
# Check logs
cat ~/.local/share/nanx/logs/setup.log
# Try with verbose output
nanx sys setup --profile developer -y --verbose Partial Installation
If some tools fail to install:
# Manually install missing tools
nanx apps install <tool_name>
# Re-run config-only setup
nanx sys setup --config-only