GibilGibil

gibil create

Forge an ephemeral server

The core command. Generates SSH keys, creates a Hetzner VM, attaches a cloud-init script, and waits until the server is ready to use.

Usage

gibil create [options]

Description

Forges a new ephemeral server. Generates SSH keys, creates a Hetzner VM, uploads your SSH key, attaches a cloud-init script, and waits until the server is ready.

Options

FlagDescriptionDefault
--name <name>Server nameauto-generated
--repo <url>GitHub repo URL to clone
--ttl <minutes>Time-to-live in minutes60
--fleet <count>Create N servers in parallel1
--config <path>Path to .gibil.ymlauto-detected
--location <loc>Datacenter locationfsn1
--jsonOutput as JSONfalse

Examples

# Basic — forge a server with defaults
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 30

# 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

What happens

  1. Generates SSH key pair → ~/.gibil/keys/<name>/id_ed25519
  2. Uploads public key to Hetzner
  3. Generates cloud-init script (installs runtime, Docker, clones repo)
  4. Creates Hetzner server with cloud-init + SSH key
  5. Polls until server status = running
  6. Polls until SSH port 22 responds
  7. Saves instance metadata 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 returns as soon as SSH is reachable (~10s). Cloud-init continues installing in the background. Poll for /root/.gibil-ready if you need the full setup to complete before running commands.

Next steps

On this page