The NFYio CLI and AWS CLI provide command-line access to NFYio storage, agents, and networking. This reference covers installation, authentication, and common commands.
NFYio CLI Installation
npm / pnpm / yarn
npm install -g @nfyio/cli
# or
pnpm add -g @nfyio/cli
# or
yarn global add @nfyio/cli
Homebrew (macOS/Linux)
brew tap nfyio/nfyio
brew install nfyio
Direct Download
Download the latest binary from the NFYio releases page.
# Linux
curl -sSL https://github.com/hilaltechnologic/nfyio/releases/latest/download/nfyio-linux-amd64 -o nfyio
chmod +x nfyio && sudo mv nfyio /usr/local/bin/
# macOS
curl -sSL https://github.com/hilaltechnologic/nfyio/releases/latest/download/nfyio-darwin-amd64 -o nfyio
chmod +x nfyio && sudo mv nfyio /usr/local/bin/
Authentication
Login (Interactive)
nfyio login
Prompts for API URL and API key. Credentials are stored in ~/.nfyio/config.json.
Environment Variables
export NFYIO_API_URL=https://api.yourdomain.com
export NFYIO_API_KEY=your-api-key
nfyio buckets list
Config File
~/.nfyio/config.json:
{
"api_url": "https://api.yourdomain.com",
"api_key": "nfy_xxxxxxxxxxxx"
}
Common Commands
Global Options
| Option | Description |
|---|
--api-url URL | Override API URL |
--api-key KEY | Override API key |
--output json | Output as JSON |
--output table | Output as table (default) |
--output yaml | Output as YAML |
--verbose | Verbose logging |
Bucket Operations
| Command | Description |
|---|
nfyio buckets list | List all buckets |
nfyio buckets create <name> | Create a bucket |
nfyio buckets get <name> | Get bucket details |
nfyio buckets delete <name> | Delete a bucket |
# List buckets
nfyio buckets list
# Create bucket
nfyio buckets create my-app-bucket
# Get bucket info
nfyio buckets get my-app-bucket --output json
# Delete bucket (requires --force if non-empty)
nfyio buckets delete my-app-bucket --force
Object Operations
| Command | Description |
|---|
nfyio objects list <bucket> [prefix] | List objects |
nfyio objects put <bucket> <key> <file> | Upload object |
nfyio objects get <bucket> <key> | Download object |
nfyio objects delete <bucket> <key> | Delete object |
nfyio objects presign <bucket> <key> | Generate presigned URL |
# List objects with prefix
nfyio objects list my-bucket docs/
# Upload file
nfyio objects put my-bucket path/to/file.txt ./local-file.txt
# Download file
nfyio objects get my-bucket path/to/file.txt -o ./downloaded.txt
# Generate presigned URL (1 hour)
nfyio objects presign my-bucket path/to/file.pdf --expires 3600
Agent Management
| Command | Description |
|---|
nfyio agents list | List agents |
nfyio agents create | Create agent (interactive) |
nfyio agents get <id> | Get agent details |
nfyio agents delete <id> | Delete agent |
nfyio agents chat <id> <message> | Send chat message |
# List agents
nfyio agents list
# Chat with agent
nfyio agents chat agent_abc123 "What is our refund policy?"
# Chat with streaming output
nfyio agents chat agent_abc123 "Summarize the docs" --stream
VPC Commands
| Command | Description |
|---|
nfyio vpc list | List VPCs |
nfyio vpc create <name> --cidr <cidr> | Create VPC |
nfyio vpc get <id> | Get VPC details |
nfyio vpc delete <id> | Delete VPC |
nfyio subnets list --vpc <id> | List subnets |
nfyio security-groups list --vpc <id> | List security groups |
# Create VPC
nfyio vpc create production --cidr 10.0.0.0/16
# List subnets
nfyio subnets list --vpc vpc_abc123
AWS CLI Compatibility
NFYio storage is S3-compatible. Use the AWS CLI with a custom endpoint:
aws configure set aws_access_key_id $NFYIO_ACCESS_KEY_ID --profile nfyio
aws configure set aws_secret_access_key $NFYIO_SECRET_ACCESS_KEY --profile nfyio
Common AWS CLI Commands
| Command | Description |
|---|
aws s3 ls | List buckets |
aws s3 mb s3://bucket-name | Create bucket |
aws s3 rb s3://bucket-name | Delete bucket |
aws s3 ls s3://bucket-name/ | List objects |
aws s3 cp <local> s3://bucket/key | Upload |
aws s3 cp s3://bucket/key <local> | Download |
aws s3 rm s3://bucket/key | Delete object |
aws s3 sync <local> s3://bucket/ | Sync directory |
# Use with NFYio endpoint
aws --endpoint-url https://storage.yourdomain.com --profile nfyio s3 ls
# Or set default
export AWS_ENDPOINT_URL=https://storage.yourdomain.com
aws s3 ls --profile nfyio
# Default (human-readable)
aws s3 ls s3://my-bucket/
# JSON output
aws s3api list-objects-v2 --bucket my-bucket --output json
# Table output
aws s3 ls s3://my-bucket/ --output table
| Format | Use Case |
|---|
table | Human-readable, default |
json | Scripting, piping to jq |
yaml | Configuration, readability |
# JSON for scripting
nfyio buckets list --output json | jq '.[].name'
# YAML
nfyio agents get agent_abc123 --output yaml
Next Steps