Skip to main content

Node Administration Made Intuitive

Project description

Nami 🌊

Node Access & Manipulation Interface is a simple tool for managing connections to multiple remote instances (particularly GPU servers), with built-in GPU monitoring, file transfer capabilities via rsync/S3, and a template system for common tasks.

Features

  • 🔗 Multi-instance SSH management - Add, list, and connect to remote servers
  • 🌐 Heterogeneous environments - Works across different Linux distros and cloud providers (Vast, AWS, Runpod, etc.)
  • 📊 GPU monitoring - GPU utilization and memory tracking
  • 📁 File transfer - Transfer files between instances directly via rsync or using S3 as intermediary
  • 📜 Template system - Execute pre-configured bash script templates on remote instances
  • ⚙️ Configuration management - Personal and global configuration storage

Installation

pip install -U nami-surf

Quick Start

# Add a remote instance
nami add gpu-box 192.168.1.100 22 --user ubuntu --description "Main GPU server"

# List all instances with GPU status
nami list

# Connect to an instance via SSH  
nami ssh gpu-box

# Run a command on an instance
nami ssh gpu-box "nvidia-smi"

# Transfer files between instances
nami transfer --source_instance local --dest_instance gpu-box --source_path ./data --dest_path ~/data

# Upload files to S3 from an instance
nami to_s3 --source_instance gpu-box --source_path ~/results --dest_path s3://bucket/experiment1/

# Download files from S3 to an instance  
nami from_s3 --dest_instance gpu-box --source_path s3://bucket/dataset/ --dest_path ~/data/

# Execute a template on an instance
nami template gpu-box setup_conda --env_name myenv --python_version 3.9

🔧 Commands

Instance Management:

# Add a new instance
nami add <name> <host> <port> [--user USER] [--local-port PORT] [--description DESC]

# List all instances with GPU status
nami list

# Remove an instance
nami remove <name>

# Connect via SSH or run a command
nami ssh <instance> [command]

Configuration:

# Set personal config value
nami config set <key> <value>

# Show configuration (all or specific key)
nami config show [key]

File Transfer:

# Transfer files between instances
nami transfer --source_instance SRC --dest_instance DEST \
              --source_path PATH \
              [--dest_path PATH] \
              [--method rsync|s3] \
              [--exclude PATTERNS] \
              [--archive] \
              [--rsync_opts "OPTIONS"]

# Upload to S3
nami to_s3 --source_instance INSTANCE \
           --source_path PATH \
           --dest_path S3_PATH \
           [--exclude PATTERNS] \
           [--archive] \
           [--aws_profile PROFILE]

# Download from S3  
nami from_s3 --dest_instance INSTANCE \
             --source_path S3_PATH \
             --dest_path PATH \
             [--exclude PATTERNS] \
             [--archive] \
             [--aws_profile PROFILE]

Templates:

# Execute a template with variables
nami template <instance> <template_name> [--var1 value1 --var2 value2 ...]

⚙️ Configuration

NAMI stores its configuration in ~/.nami/:

  • config.yaml - Instance definitions and global settings
  • personal.yaml - User-specific configurations (S3 bucket, AWS profile, etc.)
  • templates/ - Custom bash script templates

Configuration File Structure

~/.nami/config.yaml - Main configuration file:

instances:
  gpu-box:
    host: "192.168.1.100"
    port: 22
    user: "ubuntu"
    description: "Main GPU server"
    local_port: 8888  # optional - for SSH tunneling
  
  cloud-instance:
    host: "ec2-xxx.compute.amazonaws.com"
    port: 22
    user: "ec2-user"
    description: "AWS EC2 instance"

variables:
  # Global template variables available to all templates
  # var1: value1
  # ...

~/.nami/personal.yaml - User-specific settings (excluded from git):

# S3 configuration for file transfers
aws_profile: "my-profile"
s3_bucket: "my-bucket"

aws_access_key_id: XXXX
aws_secret_access_key: XXXX
aws_endpoint_url: https://XXXX.com

# Other personal settings
# ...

Variable Priority: Template variables are resolved in this order (highest priority first):

  1. Command-line variables (--var key=value)
  2. Personal config (personal.yaml)
  3. Global config (config.yaml variables section)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nami_surf-0.1.1.tar.gz (14.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nami_surf-0.1.1-py3-none-any.whl (14.8 kB view details)

Uploaded Python 3

File details

Details for the file nami_surf-0.1.1.tar.gz.

File metadata

  • Download URL: nami_surf-0.1.1.tar.gz
  • Upload date:
  • Size: 14.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.19

File hashes

Hashes for nami_surf-0.1.1.tar.gz
Algorithm Hash digest
SHA256 a0eead5df33f0aeb6c1ab25386d9fa07bbc7b188b635b3b34f3123cb4edd02b0
MD5 c5a1783d959d0539d4ac5370b093157a
BLAKE2b-256 c035f32e410ba059dc90e8a8d8a66c9aaa3fb3bf1d3cd22185fbb65932bd966a

See more details on using hashes here.

File details

Details for the file nami_surf-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: nami_surf-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 14.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.19

File hashes

Hashes for nami_surf-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e23720cc5da0f67232fdc0af89b35159b53adfa96874b84f50ca4084819ed6e6
MD5 a24f6cabdf75947682efe1d7a45c399a
BLAKE2b-256 605db7a27f2e248d689538922403508aeb4d8914962f8d3272fd114697f27386

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page