GibilGibil

gibil create

Forge a Linux box on demand

The core command. Generates SSH keys, creates a server on your chosen provider (Hetzner or Vultr), attaches a cloud-init script, and waits until the box is ready to use.

Usage

gibil create [options]

Description

Forges a new Gibil box. Generates SSH keys, creates a server on your chosen provider, uploads your SSH key, attaches a cloud-init script, and waits until the box is ready. Set --ttl anywhere from 15m to 30d; extend it later with gibil extend if the work runs long.

Options

FlagDescriptionDefault
--name <name>Server nameauto-generated
--repo <url>GitHub repo URL to clone
--ttl <duration>Time-to-live (30m, 2h, 7d, 1y, or plain minutes)60
--fleet <count>Create N servers in parallel1
--config <path>Path to .gibil.ymlauto-detected
--provider <name>Cloud provider (hetzner or vultr)configured default
--size <size>Provider-agnostic size (small, medium, large)provider default
--server-type <native>Native SKU — overrides --size (e.g. cax21, vc2-4c-8gb)auto-detected
--location <loc>Datacenter location (fsn1, nrt, sgp, ...)provider default
-e, --env <KEY=VALUE>Environment variables (repeatable)
--dry-runPrint what would be created without calling the provider APIfalse
--jsonOutput as JSONfalse

Examples

# Basic — forge a server on the default provider
gibil create --name my-app

# With a repo — clones and runs tasks from .gibil.yml
gibil create --name my-app --repo https://github.com/you/project --ttl 30m

# Pick a specific cloud and region (e.g. Tokyo on Vultr)
gibil create --name tokyo --provider vultr --location nrt --size small --ttl 30m

# Fleet mode — 3 servers in parallel
gibil create --name fleet --fleet 3 --ttl 15

# JSON output for AI agents
gibil create --name agent-task --repo https://github.com/you/repo --json --ttl 20

# Native SKU override (escape hatch when --size doesn't fit)
gibil create --name benchmark --server-type cax31 --location fsn1

What happens

  1. Resolves the provider from --provider or the configured default
  2. Reads provider-specific defaults from ~/.gibil/config.json
  3. Generates SSH key pair → ~/.gibil/keys/<name>/id_ed25519
  4. Uploads public key to the chosen provider
  5. Generates cloud-init script (installs runtime, Docker, clones repo)
  6. Creates the server with cloud-init + SSH key
  7. Polls until server status = running
  8. Polls until SSH port 22 responds
  9. Polls until cloud-init is complete (/root/.gibil-ready, 6 min timeout)
  10. Saves instance metadata (including provider) to ~/.gibil/instances/<name>.json

JSON output

{
  "name": "my-app",
  "ip": "49.13.42.101",
  "server_id": 12345678,
  "status": "ready",
  "ttl": 30,
  "created_at": "2024-01-15T10:30:00Z"
}

The CLI waits for cloud-init to complete (polls /root/.gibil-ready with a 6 minute timeout) before returning. Your server is fully provisioned when the command finishes.

Next steps

On this page