CLI Reference

NFYio CLI installation, authentication, bucket operations, object operations, agent management, and VPC commands.

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

OptionDescription
--api-url URLOverride API URL
--api-key KEYOverride API key
--output jsonOutput as JSON
--output tableOutput as table (default)
--output yamlOutput as YAML
--verboseVerbose logging

Bucket Operations

CommandDescription
nfyio buckets listList 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

CommandDescription
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

CommandDescription
nfyio agents listList agents
nfyio agents createCreate 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

CommandDescription
nfyio vpc listList 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:

Configure Profile

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

CommandDescription
aws s3 lsList buckets
aws s3 mb s3://bucket-nameCreate bucket
aws s3 rb s3://bucket-nameDelete bucket
aws s3 ls s3://bucket-name/List objects
aws s3 cp <local> s3://bucket/keyUpload
aws s3 cp s3://bucket/key <local>Download
aws s3 rm s3://bucket/keyDelete 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

Output Formats

# 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

Output Formats

FormatUse Case
tableHuman-readable, default
jsonScripting, piping to jq
yamlConfiguration, readability
# JSON for scripting
nfyio buckets list --output json | jq '.[].name'

# YAML
nfyio agents get agent_abc123 --output yaml

Next Steps