FugokuFugoku Docs
Mask

CLI Tool

Command-line interface for managing Fugoku Cloud infrastructure

🚧 The Fugoku CLI and API are in active development. Join our waitlist at fugoku.com/contact for early access.

Fugoku CLI

The Fugoku CLI provides a fast, scriptable way to manage your infrastructure from the terminal.

Installation

macOS

Homebrew:

brew install fugoku/tap/fugoku-cli

Manual:

curl -sSL https://cli.fugoku.com/install-macos.sh | bash

Linux

Debian/Ubuntu:

curl -sSL https://cli.fugoku.com/install.sh | sudo bash

Arch Linux:

yay -S fugoku-cli

Manual (any distro):

curl -sSL https://cli.fugoku.com/install.sh | bash

Windows

PowerShell:

iwr https://cli.fugoku.com/install.ps1 -useb | iex

WSL: Use Linux installation method.

npm/yarn (cross-platform)

npm install -g @fugoku/cli
# or
yarn global add @fugoku/cli

Verify Installation

fugoku version
# Fugoku CLI v0.1.0-beta.1

Global Options

Every command accepts these flags:

--output <format>   # Output format: table (default), json, yaml
--region <region>    # Override default region
--profile <name>    # Use named auth profile
--org <org>         # Organization context (for multi-org environments)
--verbose           # Show HTTP requests/responses
--no-color          # Disable colored output

Authentication

Interactive Login

fugoku auth login

Opens browser for OAuth flow. Credentials saved to ~/.fugoku/config.json.

API Token

# Set token directly
fugoku auth set-token fgk_abc123...

# Or use environment variable
export FUGOKU_API_TOKEN="fgk_abc123..."

Get token: Console → Account → API Credentials

Show Current Token

fugoku auth token

Logout

fugoku auth logout

Check Current User

fugoku auth whoami
# Logged in as: user@example.com
# Account ID: acc-xyz789

Configuration

Config stored at ~/.fugoku/config.json.

View Config

fugoku config list

Get / Set Values

fugoku config get default-region
fugoku config set default-region lagos-1
fugoku config set output json

Multiple Profiles

# Create new profile
fugoku auth login --profile production

# Use specific profile
fugoku --profile production instances list

# Set default profile
fugoku config set default-profile production

Compute Commands

List Instances

# All instances
fugoku instances list

# Filter by region
fugoku instances list --region lagos-1

# Filter by status
fugoku instances list --status running

# Filter by tag
fugoku instances list --tag production

Output:

ID              NAME        PLAN         STATUS    IP              REGION
inst-abc123     web-1       standard-2   running   102.89.45.178   lagos-1
inst-def456     web-2       standard-2   running   102.89.45.179   lagos-1
inst-ghi789     db-1        ram-4        running   10.10.0.10      lagos-1

Get Instance Details

fugoku instances get web-1

# JSON output
fugoku instances get web-1 --output json

Create Instance

fugoku instances create \
  --name web-1 \
  --plan standard-2 \
  --image ubuntu-22.04 \
  --region lagos-1 \
  --ssh-key laptop \
  --tag production \
  --tag web \
  --wait

Wait for provisioning:

fugoku instances create --name web-1 --plan standard-2 --image ubuntu-22.04 --wait
# ✓ Instance created: inst-abc123
# ⏳ Provisioning... (45s)
# ✓ Instance running
# IP: 102.89.45.178

Instance Actions

# Start
fugoku instances start web-1

# Stop
fugoku instances stop web-1

# Reboot
fugoku instances reboot web-1

Delete Instance

fugoku instances delete web-1 --confirm

SSH Into Instance

# Direct SSH (CLI manages keys)
fugoku ssh web-1

Instance Metrics

fugoku instances stats web-1

# Output:
# CPU:     12.5% (0.25 / 2 cores)
# RAM:     1.8 GB / 4 GB (45%)
# Disk:    2.1 GB / 80 GB (3%)
# Network: ↓ 450 Kbps ↑ 120 Kbps
# Uptime:  2h 34m

Storage Commands

Volumes

# List volumes
fugoku volumes list

# Create volume
fugoku volumes create --name my-data --size 100 --region lagos-1

# Attach to instance
fugoku volumes attach my-data --instance web-1

# Detach from instance
fugoku volumes detach my-data

# Resize volume
fugoku volumes resize my-data --size 200

# Delete volume
fugoku volumes delete my-data --confirm

Snapshots

# Create snapshot
fugoku snapshots create my-data --name before-upgrade

# List snapshots
fugoku snapshots list

# Delete snapshot
fugoku snapshots delete snap-abc123 --confirm

Networking Commands

Private Networks

# Create network
fugoku networks create \
  --name backend-net \
  --subnet 10.10.0.0/24 \
  --region lagos-1

# List networks
fugoku networks list

# Get network details
fugoku networks get backend-net

# Delete network
fugoku networks delete backend-net --confirm

Floating IPs

# Create floating IP
fugoku floating-ips create --region lagos-1

# List floating IPs
fugoku floating-ips list

# Assign to instance
fugoku floating-ips assign <ip-id> --instance web-1

# Unassign from instance
fugoku floating-ips unassign <ip-id>

# Delete floating IP
fugoku floating-ips delete <ip-id> --confirm

Security Groups

# List security groups
fugoku security-groups list

# Create security group
fugoku security-groups create --name web-servers --description "Rules for web tier"

# Get security group details
fugoku security-groups get web-servers

# Add rule
fugoku security-groups add-rule web-servers \
  --direction inbound \
  --protocol tcp \
  --port 80 \
  --source 0.0.0.0/0

# Remove rule
fugoku security-groups remove-rule web-servers --rule-id rule-abc123

# Delete security group
fugoku security-groups delete web-servers --confirm

Load Balancers

# List load balancers
fugoku lb list

# Create load balancer
fugoku lb create \
  --name api-lb \
  --region lagos-1

# Get load balancer details
fugoku lb get api-lb

# Delete load balancer
fugoku lb delete api-lb --confirm

SSH Keys

# List SSH keys
fugoku ssh-keys list

# Add SSH key
fugoku ssh-keys add --name laptop ~/.ssh/id_rsa.pub

# Delete SSH key
fugoku ssh-keys delete laptop --confirm

Images

# List available images
fugoku images list

Plans

# List available plans
fugoku plans list

Regions

# List available regions
fugoku regions list

# Output:
# ID            NAME              LOCATION
# lagos-1       Lagos 1           Lagos, Nigeria
# london-1      London 1          London, UK
# frankfurt-1   Frankfurt 1       Frankfurt, Germany

Account & Billing

Account Info

fugoku account info

Billing

# Billing overview
fugoku billing overview

# Current usage
fugoku billing usage

# List invoices
fugoku billing invoices

# Add funds to account
fugoku billing add-funds 50.00

Organizations

Manage multi-org environments — switch between organizations, invite members, and control access.

List Organizations

fugoku orgs list

Switch Organization

fugoku orgs switch org-abc123

All subsequent commands will operate in the context of this organization.

Show Current Organization

fugoku orgs current

List Members

fugoku orgs members

Invite a Member

# Default role: member
fugoku orgs invite user@example.com

# Specify role
fugoku orgs invite user@example.com --role admin

Roles: admin, member, billing

Multi-Org Workflow

# Check which org you're in
fugoku orgs current

# List all your orgs
fugoku orgs list

# Switch to production org
fugoku orgs switch org-prod-123

# Or use --org flag for one-off commands
fugoku --org org-prod-123 instances list

Output Formats

Table (default)

fugoku instances list

JSON

fugoku instances list --output json

YAML

fugoku instances list --output yaml

Scripting & Automation

Environment Variables

# API token
export FUGOKU_API_TOKEN="fgk_abc123..."

# Default region
export FUGOKU_DEFAULT_REGION="lagos-1"

# Output format
export FUGOKU_OUTPUT="json"

# Disable color output
export FUGOKU_NO_COLOR=1

Exit Codes

  • 0 - Success
  • 1 - General error

Example: Deploy Stack

#!/bin/bash
set -e

REGION="lagos-1"

# Create private network
fugoku networks create --name app-net --subnet 10.10.0.0/24 --region $REGION

# Create database instance
fugoku instances create \
  --name postgres-1 \
  --plan ram-4 \
  --image ubuntu-22.04 \
  --region $REGION \
  --wait

# Create app instances
for i in {1..3}; do
  fugoku instances create \
    --name app-$i \
    --plan standard-2 \
    --image ubuntu-22.04 \
    --region $REGION \
    --wait &
done
wait

# Create load balancer
fugoku lb create --name app-lb --region $REGION

echo "Stack deployed successfully!"

Debugging

Verbose Output

fugoku --verbose instances list
# Shows HTTP requests and responses

Troubleshooting

Command not found

# Verify installation
which fugoku

# Check PATH
echo $PATH

# Reinstall if needed
curl -sSL https://cli.fugoku.com/install.sh | bash

Authentication errors

# Check token
fugoku auth whoami

# Re-login
fugoku auth logout
fugoku auth login

Connection issues

# Test API connectivity
curl -I https://api.fugoku.com/v1/status

# Use verbose mode
fugoku --verbose instances list

Getting Help

# General help
fugoku help

# Command help
fugoku instances --help
fugoku instances create --help

Documentation: docs.fugoku.com/cli

Support: support@fugoku.com


Planned Features

The following features are on our roadmap but not yet available in the CLI:

  • instances rebuild — Reinstall OS on an existing instance
  • instances resize — Change instance plan
  • --user-data — Pass cloud-init data on instance creation
  • --private-network — Attach instance to network on creation
  • --enable-backups — Enable automatic backups on creation
  • --quiet flag — Output IDs only (for scripting)
  • completion — Shell completion (bash, zsh, fish)
  • update — Self-update command

Next Steps:

On this page