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
| Flag | Description | Default |
|---|---|---|
--name <name> | Server name | auto-generated |
--repo <url> | GitHub repo URL to clone | — |
--ttl <minutes> | Time-to-live in minutes | 60 |
--fleet <count> | Create N servers in parallel | 1 |
--config <path> | Path to .gibil.yml | auto-detected |
--location <loc> | Datacenter location | fsn1 |
--json | Output as JSON | false |
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 20What happens
- Generates SSH key pair →
~/.gibil/keys/<name>/id_ed25519 - Uploads public key to Hetzner
- Generates cloud-init script (installs runtime, Docker, clones repo)
- Creates Hetzner server with cloud-init + SSH key
- Polls until server status = running
- Polls until SSH port 22 responds
- 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
- gibil ssh — connect to your server
- gibil run — execute commands remotely
- Configuration — customize with
.gibil.yml - Fleet Mode — create multiple servers at once