<!--
hoody-api Subskill (cli)
Auto-generated by Hoody Skills Generator
Generated: 2026-05-06T20:48:58.945Z
Model: mimo-v2.5-pro
Mode: cli


Tokens: 29316

DO NOT EDIT MANUALLY - Changes will be overwritten on next generation
-->

# hoody-api Subskill

## Overview

### What This Service Does

`hoody-api` is the core platform API for the Hoody ecosystem. It manages all foundational resources: user accounts, authentication, projects, containers, servers, networking, storage, billing, and access control. Every other Hoody service depends on `hoody-api` for identity, authorization, and resource lifecycle management.

### When to Use It

Use `hoody-api` (via the `hoody` CLI) when you need to:

- **Authenticate** — log in, sign up, manage tokens, configure 2FA
- **Manage projects** — create, update, delete projects; manage project-level permissions
- **Manage containers** — create, start, stop, copy, configure containers; manage environment variables, firewall rules, network settings, snapshots
- **Manage access control** — configure proxy permissions, authentication groups, hooks at project and container levels
- **Manage storage** — create and manage storage shares between containers
- **Manage billing** — view balances, process payments, manage payment methods, download invoices
- **Manage servers** — browse the rental marketplace, rent servers, execute remote commands
- **Manage pools** — create teams, invite members, manage roles
- **View events and activity** — query event history, activity logs, notifications
- **Access the vault** — store and retrieve encrypted key-value pairs
- **Browse AI models** — list available AI models in the Hoody catalog

### Authentication Model

All `hoody-api` operations require authentication. Three methods are supported:

1. **Interactive login** — `hoody auth login` stores a JWT locally
2. **Auth token** — `--token <token>` or `HOODY_TOKEN` env var for CI/automation
3. **Username/password** — `--username` / `--password` flags for automatic login

Auth tokens support realm scoping, IP whitelisting, expiration, and public profiles with ED25519 keys.

### How It Fits Into Hoody Philosophy

`hoody-api` is the single source of truth for all platform resources. It enforces:

- **Zero-config networking** — automatic domain routing via proxy aliases
- **Isolation** — per-container firewall, network, and permission boundaries
- **Team collaboration** — pools, project sharing, role-based access
- **Security-first** — 2FA, encrypted vault, signed claims, audit logging
- **CLI-first operations** — every API endpoint has a corresponding `hoody` CLI command

### Critical Rules

- **NEVER use curl** — all operations go through `hoody` CLI commands
- **Container targeting** — use `-c <container-id>` or `HOODY_CONTAINER` env var for container-scoped commands
- **Machine output** — use `-o json` for parseable output
- **Authentication** — always authenticate first via `hoody auth login` or `--token`

---

## Core Resource Workflows

### 1. Authentication

#### Login and Session Management

```
# Login with username and password
hoody auth login

# Login with explicit credentials
hoody auth login --username user@example.com --password MySecurePass1

# Login with a pre-existing token
hoody auth login --token eyJhbGciOi...

# Refresh an expiring access token
hoody auth refresh

# Get current user profile
hoody auth current

# Logout (discards local session)
hoody auth logout
```

#### Account Signup and Email Verification

```
# Create a new account
hoody auth signup

# Verify email address using token from verification email
hoody auth verify

# Resend verification email
hoody auth resend
```

#### Password Reset

```
# Request password reset email
hoody auth forgot

# Reset password using token from email
hoody auth reset
```

#### OAuth (GitHub and Google)

```
# Redirect to GitHub OAuth
hoody auth redirect

# GitHub OAuth callback (handled automatically)
hoody auth callback

# Redirect to Google OAuth
hoody auth redirect

# Google OAuth callback (handled automatically)
hoody auth callback
```

#### Available Regions

```
# Get regions where free-tier servers exist
hoody auth regions
```

---

### 2. Auth Tokens

Auth tokens are long-lived credentials for automation, CI/CD, and service-to-service communication.

#### Create and List Tokens

```
# Create a new auth token
hoody auth create

# List all auth tokens (token values are NOT included)
hoody auth list
```

#### Get and Update Tokens

```
# Get details of a specific token
hoody auth get <token-id>

# Update a token (alias, IP restrictions, expiration, enabled status)
hoody auth update <token-id>

# Copy an existing token's configuration into a new token
hoody auth copy <token-id>
```

#### Current Token Operations

```
# Get metadata for the currently authenticated token
hoody auth get-current

# Update current token's public profile (public_key and public_storage)
hoody auth update

# Resolve a public profile by ED25519 public key
hoody auth by-public-key <public-key>
```

#### Realm Management on Tokens

```
# Add a realm to a token (idempotent)
hoody auth add <token-id>

# Remove a realm from a token (idempotent)
hoody auth remove <token-id>
```

#### Delete Tokens

```
# Delete an auth token permanently
hoody auth delete <token-id>
```

---

### 3. Two-Factor Authentication

#### Setup 2FA

```
# Begin 2FA setup (returns QR code and backup codes)
hoody auth setup

# Verify and complete 2FA setup with first OTP code
hoody auth verify-setup
```

#### Login with 2FA

```
# After initial login returns a temp_token, verify 2FA code
hoody auth verify
```

#### Manage 2FA

```
# Check 2FA status (enabled, backup codes remaining)
hoody auth status

# Disable 2FA (requires password + OTP or backup code)
hoody auth disable

# Regenerate backup codes (invalidates existing ones)
hoody auth regenerate

# Enable/disable OTP requirement for token mutations
hoody auth gate
```

---

### 4. Users

#### Get and Update User Profiles

```
# Get user profile by ID
hoody users get <user-id>

# Update user profile (alias, password)
hoody users update <user-id>
```

#### Retry Account Setup

```
# Manually claim free-tier server and create default project/container
hoody users retry-setup
```

---

### 5. Vault (Encrypted Key-Value Store)

#### Vault Statistics

```
# Get vault usage statistics
hoody vault stats
```

Example response:

```
{
  "total_keys": 5,
  "total_size_bytes": 1024,
  "limit_mb": 10,
  "remaining_mb": 9.99,
  "used_percentage": 0.01
}
```

#### List and Retrieve Keys

```
# List all vault keys (metadata only, no values)
hoody vault list

# Get a specific key-value pair
hoody vault get my-secret-key
```

#### Set and Delete Keys

```
# Set a vault key (create or update)
hoody vault set my-secret-key

# Delete a specific key
hoody vault delete my-secret-key

# Clear entire vault (DANGER: cannot be undone)
hoody vault clear
```

---

### 6. Projects

#### Create and List Projects

```
# List all projects you own or have permissions for
hoody projects list

# Create a new project
hoody projects create
```

#### Get, Update, Delete Projects

```
# Get project details
hoody projects get <project-id>

# Update project (alias, color, quotas)
hoody projects update <project-id>

# Delete project permanently
hoody projects delete <project-id>
```

#### Project Permissions

```
# List all users with access to a project
hoody projects list

# Grant access to another user (read, edit, or delete)
hoody projects create

# Update a user's permission level
hoody projects update

# Revoke a user's access
hoody projects delete
```

#### Project Statistics

```
# Get aggregated resource usage for all containers in a project
hoody projects stats <project-id>
```

#### Project Proxy Permissions

```
# Get project proxy permissions configuration
hoody projects get

# Replace entire proxy permissions JSON
hoody projects replace

# Delete all proxy permissions (reverts to open access)
hoody projects delete

# Update default proxy policy (allow or deny)
hoody projects default

# Enable or disable proxy for the project
hoody projects state
```

#### Project Proxy Authentication Groups

```
# Set JWT authentication group
hoody projects set

# Set password authentication group
hoody projects set

# Set IP authentication group
hoody projects set

# Set token authentication group
hoody projects set

# Remove an authentication group
hoody projects delete
```

#### Project Proxy Program Permissions

```
# Set program permission for a group
hoody projects set

# Remove all program permissions for a group
hoody projects clear

# Remove a single program permission for a group
hoody projects delete
```

---

### 7. Containers

#### Create and List Containers

```
# List all containers for a project
hoody containers list <project-id>

# List all containers across all projects
hoody containers list

# Create a new container in a project
hoody containers create
```

#### Get, Update, Delete Containers

```
# Get container details
hoody containers get <container-id>

# Update container
hoody containers update <container-id>

# Delete container permanently
hoody containers delete <container-id>
```

#### Container Operations

```
# Start a container
hoody containers manage <container-id> start

# Stop a container
hoody containers manage <container-id> stop

# Force-stop a container
hoody containers manage <container-id> force-stop

# Restart a container
hoody containers manage <container-id> restart

# Pause a container
hoody containers manage <container-id> pause

# Resume a container
hoody containers manage <container-id> resume
```

#### Container Copy and Sync

```
# Copy a container (runs asynchronously, new container starts automatically)
hoody containers copy <container-id>

# Sync a copied container with its source (incremental)
hoody containers sync <container-id>
```

#### Container Authorization

```
# Issue a signed, portable container authorization claim
hoody containers authorize <container-id>
```

#### Container Status Logs

```
# Get status transition logs for a container
hoody containers status-logs <container-id>
```

#### Container Statistics

```
# Get real-time resource usage (CPU, memory, disk, network)
hoody containers stats <container-id>
```

---

### 8. Container Environment Variables

#### List Environment Variables

```
# List all environment variables for a container
hoody containers list -c <container-id>
```

#### Set Environment Variables

```
# Bulk set environment variables (merge semantics)
hoody containers bulk-set -c <container-id>

# Set a single environment variable
hoody containers set -c <container-id>
```

#### Delete Environment Variables

```
# Delete a single environment variable
hoody containers delete -c <container-id>
```

> **Note**: Keys starting with `HOODY_` are reserved and cannot be set or deleted. Changes take effect on the next container restart.

---

### 9. Container Network Configuration

```
# Get current network configuration and status
hoody network get -c <container-id>

# Update network proxy/blocking settings
hoody network update -c <container-id>

# Remove network configuration entirely
hoody network delete -c <container-id>

# Start network proxy or blocking service
hoody network start -c <container-id>

# Stop network proxy or blocking service
hoody network stop -c <container-id>
```

---

### 10. Container Snapshots

```
# List all snapshots for a container
hoody snapshots list -c <container-id>

# Create a new snapshot
hoody snapshots create -c <container-id>

# Restore container from a snapshot
hoody snapshots restore -c <container-id>

# Delete a snapshot
hoody snapshots delete -c <container-id>

# Update snapshot alias
hoody snapshots update-alias -c <container-id>
```

---

### 11. Container Firewall

#### List and Reset Rules

```
# List all ingress and egress firewall rules
hoody firewall list -c <container-id>

# Reset firewall (delete ACL, detach from bridge, return to open state)
hoody firewall reset -c <container-id>
```

#### Ingress (Inbound) Rules

```
# Add an ingress rule
hoody firewall create -c <container-id>

# Toggle ingress rule state (enable/disable without deleting)
hoody firewall toggle -c <container-id>

# Remove ingress rule(s)
hoody firewall delete -c <container-id>
```

#### Egress (Outbound) Rules

```
# Add an egress rule
hoody firewall create -c <container-id>

# Toggle egress rule state (enable/disable without deleting)
hoody firewall toggle -c <container-id>

# Remove egress rule(s)
hoody firewall delete -c <container-id>
```

---

### 12. Container Images

#### Browse Public Images

```
# List public container images
hoody images list

# Get details of a specific public image
hoody images get <image-id>

# Get image icon
hoody images icon <image-id>
```

#### Manage Your Images

```
# List images you own (imported/purchased)
hoody images mine

# Import a free public image
hoody images import-free <image-id>

# Purchase a paid image
hoody images purchase <image-id>

# Rate an image (0-5 stars)
hoody images rate <image-id>
```

---

### 13. Proxy Aliases

Proxy aliases create custom domain names that mask the real project/container IDs in URLs.

```
# Create a new proxy alias
hoody proxy create

# List all proxy aliases
hoody proxy list

# Get alias details
hoody proxy get <alias-id>

# Update an alias
hoody proxy update <alias-id>

# Delete an alias permanently
hoody proxy delete <alias-id>

# Enable or disable an alias
hoody proxy set-state <alias-id>
```

#### Build Proxy URLs

```
# Build target URL for a container service
hoody proxy build-url

# Build target URL via query parameters
hoody proxy build-url-from-query
```

---

### 14. Proxy Permissions (Container-Level)

#### Get and Replace Permissions

```
# Get container proxy permissions
hoody containers get -c <container-id>

# Replace entire proxy permissions JSON (requires If-Match header)
hoody containers replace -c <container-id>

# Delete all proxy permissions
hoody containers delete -c <container-id>
```

#### Default Policy and State

```
# Update default proxy policy (allow or deny)
hoody containers default -c <container-id>

# Enable or disable proxy for the container
hoody containers state -c <container-id>
```

#### Authentication Groups

```
# Set JWT authentication group
hoody containers set -c <container-id>

# Set password authentication group
hoody containers set -c <container-id>

# Set IP authentication group
hoody containers set -c <container-id>

# Set token authentication group
hoody containers set -c <container-id>

# Remove an authentication group
hoody containers delete -c <container-id>
```

#### Program Permissions

```
# Set program permission for a group
hoody containers set -c <container-id>

# Remove all program permissions for a group
hoody containers clear -c <container-id>

# Remove a single program permission for a group
hoody containers delete -c <container-id>
```

---

### 15. Proxy Hooks

Hooks intercept and transform requests to container services. They use first-match-wins ordering.

#### List Hooks

```
# List all hooks grouped by service
hoody containers list -c <container-id>

# List hooks for a specific service
hoody containers list-service <container-id> <service-name>
```

#### Create and Manage Hooks

```
# Append or insert a new hook
hoody containers create <container-id> <service-name>

# Get a single hook by ID
hoody containers get <container-id> <service-name> <hook-id>

# Replace a hook in place
hoody containers update <container-id> <service-name> <hook-id>

# Delete a single hook
hoody containers delete <container-id> <service-name> <hook-id>

# Clear all hooks for a service
hoody containers clear-service <container-id> <service-name>

# Move a hook to a new position
hoody containers move <container-id> <service-name> <hook-id>
```

---

### 16. Proxy Settings and Discovery

#### Root Settings

```
# Get proxy root settings (enable_proxy, default)
hoody containers get -c <container-id>

# Update proxy root settings
hoody containers update -c <container-id>
```

#### Discovery

```
# List proxy groups
hoody containers list -c <container-id>

# List services referenced in proxy config
hoody containers list -c <container-id>

# Get merged proxy view for a service (permissions + hooks + effective default)
hoody containers get <container-id> <service-name>
```

---

### 17. Proxy Logging

```
# Query centralized proxy logs
hoody proxy list

# Clear all logs
hoody proxy clear

# Get logging configuration
hoody proxy get

# Update logging configuration
hoody proxy update

# Get log statistics
hoody proxy stats

# Check database health
hoody proxy health

# Export logs as NDJSON
hoody proxy export

# Live-tail logs over Server-Sent Events
hoody proxy stream

# Rotate the audit database
hoody proxy rotate-audit

# Repair the logs database
hoody proxy repair

# Reset the logs database (preserves audit)
hoody proxy reset

# VACUUM the logs database
hoody proxy vacuum

# Get effective (resolved) log config for a scope
hoody proxy resolved
```

---

### 18. Storage Shares

#### Create and List Shares

```
# Create a storage share from source container to target
hoody storage create -c <container-id>

# List all shares from a source container
hoody storage list -c <container-id>

# List all storage shares across all containers
hoody storage list-all
```

#### Get, Update, Delete Shares

```
# Get share details
hoody storage get -c <container-id>

# Update share properties (mode, mount path, metadata, expiration)
hoody storage update -c <container-id>

# Delete a share (globally unique share ID, no container needed)
hoody storage delete <share-id>
```

#### Incoming Shares

```
# Get incoming shares for a specific container
hoody storage list -c <container-id>

# Get all incoming shares across all containers
hoody storage list-all

# Toggle mount of an incoming share (accept/reject)
hoody storage toggle-mount -c <container-id>
```

---

### 19. Notifications

```
# Get all public notifications (no auth required)
hoody inbox list-public

# Get all notifications for the authenticated user
hoody inbox list

# Mark a notification as read
hoody inbox mark <notification-id>

# Mark all notifications as read
hoody inbox mark-all
```

---

### 20. Events

```
# Get event statistics
hoody events stats

# List event history with filtering
hoody events list

# Get event details by ID
hoody events get <event-id>

# Delete a single event
hoody events delete <event-id>

# Bulk delete events based on filters
hoody events bulk-delete

# Cleanup events older than retention period
hoody events cleanup
```

---

### 21. Activity Logs

```
# Get activity logs with optional filtering
hoody activity logs

# Get activity log storage statistics
hoody activity stats
```

---

### 22. AI Models

```
# List available AI models in the Hoody catalog
hoody ai list
```

> **Note**: Pricing is returned as Hoody prices. Provider details are intentionally not exposed.

---

### 23. Meta

```
# Get Hoody API signing public key (ED25519)
hoody meta get
```

The signing key is used to verify:
- API response signatures (`X-Hoody-Signature` header)
- Identity claims issued at login
- Container authorization claims

---

### 24. Realms

```
# List all unique realm IDs from your projects, containers, servers, and auth tokens
hoody realms list
```

Returns a deduplicated list of 24-character hex realm identifiers.

---

### 25. Wallet and Billing

#### Balances

```
# Get aggregate balances (general + AI)
hoody wallet get

# Get general balance only
hoody wallet general

# Get AI credit balance (limit, usage, remaining)
hoody wallet ai

# Transfer from general balance to AI credits
hoody wallet transfer
```

#### Transactions

```
# List transactions
hoody wallet list

# Get transaction by ID
hoody wallet get <transaction-id>

# List AI credit fee history
hoody wallet fees
```

#### Payment Methods

```
# List all payment methods
hoody wallet list

# Add a new payment method
hoody wallet create

# Get payment method by ID
hoody wallet get <method-id>

# Update a payment method
hoody wallet update <method-id>

# Delete a payment method
hoody wallet delete <method-id>

# Set a payment method as default
hoody wallet set-default <method-id>
```

#### Payments

```
# Process a payment
hoody wallet create

# Get payment status
hoody wallet status <payment-id>
```

#### Invoices

```
# List all invoices
hoody wallet list

# Get invoice by ID
hoody wallet get <invoice-id>

# Download invoice as PDF
hoody wallet download <invoice-id>

# Generate invoice for a transaction
hoody wallet generate <transaction-id>
```

---

### 26. Pools (Team Collaboration)

#### Pool Management

```
# List pools you own or are a member of
hoody pools list

# Create a new pool
hoody pools create

# Get pool details
hoody pools get <pool-id>

# Update pool details (owner only)
hoody pools update <pool-id>

# Delete a pool (owner only, cannot delete default pool)
hoody pools delete <pool-id>
```

#### Pool Members

```
# Invite a user to the pool (admin+ required)
hoody pools invite <pool-id>

# Update a member's role (owner only)
hoody pools update-role <pool-id> <user-id>

# Remove a member from the pool (admin+ required)
hoody pools delete <pool-id> <user-id>
```

#### Pool Invitations

```
# List pending invitations
hoody pools list

# Accept an invitation
hoody pools accept <pool-id>

# Reject an invitation
hoody pools reject <pool-id>
```

---

### 27. Servers and Rentals

#### Browse and Rent Servers

```
# Browse available servers in the marketplace
hoody servers marketplace

# Rent a server for a specified duration
hoody servers rent <server-id>

# List your rented servers
hoody servers list-rentals

# Get rental details
hoody servers get-rental <rental-id>

# Extend a rental
hoody servers extend <rental-id>
```

#### Server Aliases

```
# List user servers (alias for list-rentals)
hoody servers list

# Get server details (alias for get-rental)
hoody servers get <server-id>
```

#### Server Commands

```
# Get available commands for a server
hoody servers commands <server-id>

# Execute a command on a server
hoody servers exec <server-id>
```

---

### 28. IP Address

```
# Get information about your IP address (geolocation, network details)
hoody ip get
```

---

## Advanced Operations

### Full Container Lifecycle

A complete workflow from project creation to a running, secured container:

```
# Step 1: Create a project
hoody projects create

# Step 2: Create a container in the project
hoody containers create

# Step 3: Set environment variables
hoody containers bulk-set -c <container-id>

# Step 4: Configure firewall rules
hoody firewall create -c <container-id>
hoody firewall create -c <container-id>

# Step 5: Start the container
hoody containers manage <container-id> start

# Step 6: Verify the container is running
hoody containers stats <container-id>

# Step 7: Create a snapshot of the running state
hoody snapshots create -c <container-id>
```

### Container Copy and Sync Workflow

```
# Step 1: Copy a container (async, starts automatically on completion)
hoody containers copy <source-container-id>

# Step 2: Monitor the new container status
hoody containers get <new-container-id>

# Step 3: Later, sync changes from source to copy
hoody containers sync <new-container-id>
```

### Network Proxy Setup

```
# Step 1: Configure network proxy settings
hoody network update -c <container-id>

# Step 2: Start the network proxy
hoody network start -c <container-id>

# Step 3: Verify network status
hoody network get -c <container-id>

# Step 4: Create a proxy alias for a clean URL
hoody proxy create

# Step 5: Verify the alias is active
hoody proxy get <alias-id>
```

### Proxy Access Control Setup

```
# Step 1: Enable proxy for the container
hoody containers state -c <container-id>

# Step 2: Set default policy to deny
hoody containers default -c <container-id>

# Step 3: Create a password authentication group
hoody containers set -c <container-id>

# Step 4: Set program permissions for the group
hoody containers set -c <container-id>

# Step 5: Add a request hook for a service
hoody containers create <container-id> <service-name>

# Step 6: Verify the merged proxy view
hoody containers get <container-id> <service-name>
```

### Storage Share Between Containers

```
# Step 1: Create a share from source container
hoody storage create -c <source-container-id>

# Step 2: Verify the share was created
hoody storage get -c <source-container-id>

# Step 3: On the target container, check incoming shares
hoody storage list -c <target-container-id>

# Step 4: Enable mounting of the incoming share
hoody storage toggle-mount -c <target-container-id>
```

### Server Provisioning Workflow

```
# Step 1: Browse available servers
hoody servers marketplace

# Step 2: Rent a server
hoody servers rent <server-id>

# Step 3: Check rental status
hoody servers get-rental <rental-id>

# Step 4: Get available commands
hoody servers commands <server-id>

# Step 5: Execute a setup command
hoody servers exec <server-id>

# Step 6: Extend rental when needed
hoody servers extend <rental-id>
```

### Pool Team Setup

```
# Step 1: Create a pool
hoody pools create

# Step 2: Invite team members
hoody pools invite <pool-id>

# Step 3: Verify member joined
hoody pools get <pool-id>

# Step 4: Update member role to admin
hoody pools update-role <pool-id> <user-id>

# Step 5: Create a shared project
hoody projects create

# Step 6: Grant project access to pool members
hoody projects create
```

### 2FA Setup and Token Gate

```
# Step 1: Begin 2FA setup
hoody auth setup

# Step 2: Verify setup with first OTP code
hoody auth verify-setup

# Step 3: Enable OTP requirement for token mutations
hoody auth gate

# Step 4: Verify 2FA status
hoody auth status
```

### Vault Secret Rotation

```
# Step 1: List current vault keys
hoody vault list

# Step 2: Get the current value
hoody vault get api-key

# Step 3: Set the new value
hoody vault set api-key

# Step 4: Verify the update
hoody vault get api-key

# Step 5: Check vault usage
hoody vault stats
```

### Firewall Hardening

```
# Step 1: List current rules
hoody firewall list -c <container-id>

# Step 2: Reset to clean state
hoody firewall reset -c <container-id>

# Step 3: Allow only HTTPS ingress
hoody firewall create -c <container-id>

# Step 4: Allow only specific egress (DNS + HTTPS)
hoody firewall create -c <container-id>
hoody firewall create -c <container-id>

# Step 5: Verify rules are applied
hoody firewall list -c <container-id>
```

### Batch Container Management

```
# List all containers across all projects
hoody containers list -o json

# Get stats for each container
hoody containers stats <container-id-1>
hoody containers stats <container-id-2>
hoody containers stats <container-id-3>
```

### Error Recovery: Project Deletion Failure

```
# Step 1: Attempt project deletion
hoody projects delete <project-id>

# Step 2: If partial failure, list remaining containers
hoody containers list <project-id>

# Step 3: Delete remaining containers
hoody containers delete <container-id>

# Step 4: Retry project deletion
hoody projects delete <project-id>
```

### Event Cleanup and Monitoring

```
# Step 1: Get event statistics
hoody events stats

# Step 2: List recent events
hoody events list

# Step 3: Cleanup old events
hoody events cleanup

# Step 4: Verify cleanup reduced event count
hoody events stats
```

### Wallet and Billing Management

```
# Step 1: Check balances
hoody wallet get

# Step 2: Transfer funds to AI credits
hoody wallet transfer

# Step 3: Add a payment method
hoody wallet create

# Step 4: Set it as default
hoody wallet set-default <method-id>

# Step 5: Process a payment
hoody wallet create

# Step 6: Download invoice
hoody wallet download <invoice-id>
```

---

## Quick Reference

### Endpoint Groups and CLI Commands

| Resource Group | CLI Group | Key Commands |
|---|---|---|
| Authentication | `hoody auth` | `login`, `logout`, `signup`, `verify`, `refresh`, `current` |
| Auth Tokens | `hoody auth` | `create`, `list`, `get`, `update`, `delete`, `copy`, `add`, `remove` |
| 2FA | `hoody auth` | `setup`, `verify-setup`, `verify`, `status`, `disable`, `regenerate`, `gate` |
| Users | `hoody users` | `get`, `update`, `retry-setup` |
| Vault | `hoody vault` | `stats`, `list`, `get`, `set`, `delete`, `clear` |
| Projects | `hoody projects` | `list`, `create`, `get`, `update`, `delete`, `stats` |
| Project Permissions | `hoody projects` | `list`, `create`, `update`, `delete` (permission subcommands) |
| Project Proxy | `hoody projects` | `get`, `replace`, `delete`, `default`, `state`, `set`, `clear` |
| Containers | `hoody containers` | `list`, `create`, `get`, `update`, `delete`, `manage`, `copy`, `sync`, `authorize` |
| Container Env | `hoody containers` | `list`, `bulk-set`, `set`, `delete` (env subcommands) |
| Container Network | `hoody network` | `get`, `update`, `delete`, `start`, `stop` |
| Container Snapshots | `hoody snapshots` | `list`, `create`, `restore`, `delete`, `update-alias` |
| Container Firewall | `hoody firewall` | `list`, `reset`, `create`, `delete`, `toggle` |
| Container Images | `hoody images` | `list`, `get`, `icon`, `mine`, `import-free`, `purchase`, `rate` |
| Container Proxy | `hoody containers` | `get`, `replace`, `delete`, `default`, `state`, `set`, `clear` (proxy subcommands) |
| Proxy Hooks | `hoody containers` | `list`, `list-service`, `create`, `get`, `update`, `delete`, `clear-service`, `move` |
| Proxy Settings | `hoody containers` | `get`, `update` (proxy settings subcommands) |
| Proxy Discovery | `hoody containers` | `list`, `get` (proxy discovery subcommands) |
| Proxy Aliases | `hoody proxy` | `create`, `list`, `get`, `update`, `delete`, `set-state`, `build-url` |
| Proxy Logging | `hoody proxy` | `list`, `clear`, `get`, `update`, `stats`, `health`, `export`, `stream` |
| Storage Shares | `hoody storage` | `create`, `list`, `get`, `update`, `delete`, `list-all`, `toggle-mount` |
| Notifications | `hoody inbox` | `list-public`, `list`, `mark`, `mark-all` |
| Events | `hoody events` | `stats`, `list`, `get`, `delete`, `bulk-delete`, `cleanup` |
| Activity Logs | `hoody activity` | `logs`, `stats` |
| AI Models | `hoody ai` | `list` |
| Meta | `hoody meta` | `get` |
| Realms | `hoody realms` | `list` |
| Wallet | `hoody wallet` | `get`, `general`, `ai`, `transfer`, `list`, `create`, `update`, `delete`, `set-default`, `status`, `download`, `generate`, `fees` |
| Pools | `hoody pools` | `list`, `create`, `get`, `update`, `delete`, `invite`, `update-role`, `accept`, `reject` |
| Servers | `hoody servers` | `marketplace`, `rent`, `list-rentals`, `get-rental`, `extend`, `list`, `get`, `exec`, `commands` |
| IP | `hoody ip` | `get` |

### Essential Parameters

| Parameter | Description | Usage |
|---|---|---|
| `-c <container-id>` | Target a specific container | Required for all container-scoped commands |
| `-o json` | Machine-readable JSON output | Use for scripting and automation |
| `--token <token>` | API authentication token | Overrides stored credentials |
| `--yes` | Skip confirmation prompts | Use for destructive operations in scripts |
| `--profile <name>` | Named configuration profile | Switch between accounts/environments |

### Top-Level Aliases

| Alias | Expands To |
|---|---|
| `hoody login` | `hoody auth login` |
| `hoody signup` | `hoody auth signup` |
| `hoody logout` | `hoody auth logout` |
| `hoody ps` | `hoody containers list` |

### Typical Response Envelope

All API responses follow this structure:

```
{
  "success": true,
  "data": {}
}
```

Error responses:

```
{
  "success": false,
  "error": {
    "code": "NOT_FOUND",
    "message": "Resource not found"
  }
}
```

### Proxy URL Pattern

All Hoody Kit services use this automatic routing pattern:

```
https://{projectId}-{containerId}-{serviceName}-{serviceId}.{node}.containers.hoody.icu
```

Components:
- `{projectId}` — 24-character project identifier
- `{containerId}` — container identifier
- `{serviceName}` — service name within the container
- `{serviceId}` — service instance identifier
- `{node}` — infrastructure node name