概要
🤖 manage virtual machines 🖥️ in multi cloud ☁️
システム・インフラできること
- hetzner - ✅ - ✅ - ✅ - —
- openshell - ✅ - — - — - —
計測したスター増加
- 24時間
- 0
- 7日間
- +1
- 15日間
- +1
- 1か月
- 履歴を収集中
期間ごとの純増数です。期間は重複しており、日別の値ではありません。未計測の値は空欄です。スター数は注目度の指標であり、品質の保証ではありません。
README.md
オリジナルOnctl
onctl is a tool to manage virtual machines in multi-cloud.
Check 🌍 https://onctl.sh for detailed documentation
What onctl brings
- 🌍 Simple intuitive CLI to run VMs in seconds.
- ⛅️ Supports multi cloud providers (aws, azure, gcp, hetzner, ovh, more coming soon...)
- 📦 Hosted microVMs with the
boxesprovider: no cloud account, no host to run --onctl loginonce (it opens your browser for approval at boxctl.io), thenonctl create -p boxes. Boxes have no public address;onctl ssh(and plain ssh viaonctl ssh-proxy) reach them through the service.onctl execruns one command in a new box and deletes it,onctl cpcopies files,onctl exposegives a port a public URL, andonctl runslists every run. See Hosted boxes. - 🤖
onctl claude: run Claude Code on a box instead of your laptop -- a hosted box, or your own VM on any provider (onctl -p hetzner claude; on a Mac,onctl -p ac clauderuns it in an Apple container from the prebuilt claude-agent image) -- a fresh box per run with your project cloned (or copied) there, its work fetched back asbox/*and the box deleted when Claude exits (--keepfor a long-lived project box;--repo owner/nameclones a GitHub repository with no local copy), Claude in herdr so it keeps going when you detach, several workspaces at once (--workspace), and the work back as git (onctl claude fetch/push).--task,--issueand--prstart a run with nobody attached that ends in a pull request;onctl claude status,logsandevidencefollow it.--harness,--modeland--effortset the run's rules, model and effort. - 🔥 Run local microVMs with the
fc(Firecracker) provider (Linux + KVM, no cloud account needed). No bare-metal Linux box? Create a nested-virtualization-enabled GCP VM (gcp.vm.nestedVirtualization: true) withonctl create -n fc-host -a firecracker/firecracker-host-setup.sh, then SSH in and runONCTL_CLOUD=fc onctl create -n my-microvm. - 🍎 Run local sandboxes on a Mac with the
ac(Apple container) provider: each one is a lightweight Linux VM on Virtualization.framework (macOS 26+, no cloud account needed). Install thecontainerCLI, runcontainer system start, thenONCTL_CLOUD=ac onctl create -n my-sandbox(any OCI image via--image; sshd is set up on first boot).pause/resumemap tocontainer stop/start. - 🛡️ Run policy-enforced sandboxes on an NVIDIA OpenShell gateway with the
openshellprovider: outbound connections are denied by default and credentials stay out of the sandbox. Set up a gateway on any VM withonctl create --image ubuntu-24.04 -a openshell/openshell.sh, register it withopenshell gateway add(the template prints how), thenonctl create -p openshell -n my-sandbox. Sandboxes are unprivileged, so their software comes from--image, not-a. - 🐮 Run local microVMs with the
ch(Cloud Hypervisor) provider — same idea asfc(Linux + KVM, no cloud account needed), no pause/resume support yet. Pointch.kernelImage/ch.rootfsImageat a kernel + rootfs image and runONCTL_CLOUD=ch onctl create -n my-microvm. Also supports Windows guests via--ch-os windows(UEFI boot) — see TESTING-ch-windows.md for base-image prep; unverified against real hardware. - 🌐 Try the terminal UI in your browser, nothing installed: onctl.sh/play runs onctl compiled to WebAssembly, on demo VMs or your Hetzner Cloud servers.
- 🚀 Sets your public key and Gives you SSH access with
onctl ssh <vm-name> - ✨ Cloud-init support. Set your own cloud-init file
onctl up -n qwe --cloud-init <cloud.init.file> - 🤖 Use ready to use templates to configure your vm. Check onctl-templates
onctl up -n qwe -a k3s/k3s-server.sh - 🗂️ Use your custom local or http accessible scripts to configure your vm.
onctl ssh qwe -a <my_local_script.sh> - 📥 Import a server onctl didn't create (e.g. a Hetzner auction/dedicated box) so you can
ssh/lsit too:onctl import <name> --ip <ip>
Quick Start
initialize project. this will create a .onctl directory. check configuration file and set as needed.
❯ onctl init
onctl environment initialized
export ONCTL_CLOUD to set Cloud Provider (or pass -p <provider> to any command).
❯ export ONCTL_CLOUD=hetzner
Be sure that credentials for that specific cloud provider is already set.
If you already use cloud provider CLI. They're already . ex. az, aws, hcloud
❯ echo $HCLOUD_TOKEN
Create VM.
❯ onctl up -n onctl-test
Using: hetzner
Creating SSHKey: onctl-42da32a9...
SSH Key already exists (onctl-42da32a9)
Starting server...
Server IP: 168.119.58.112
Vm started.
Ssh into VM.
❯ onctl ssh onctl-test
Using: hetzner
Welcome to Ubuntu 22.04.3 LTS (GNU/Linux 5.15.0-89-generic x86_64)
.
.
.
root@onctl-test:~#
Or browse and manage your VMs and agents in a k9s-style terminal UI. It opens on a home screen with two sides, the VMs and the agents (Claude's runs and your repos); ctrl-t switches between them. On the VMs: s opens a shell, a runs Claude Code on the VM (onctl claude), c creates, p/r pause and resume, ctrl-d destroys, :images and :sizes show what the provider offers, :repos lists your GitHub repositories and enter starts Claude on a box with one cloned (onctl claude --repo), :provider switches clouds, ? lists every key.
❯ onctl # or: onctl tui
Import an existing server
Already have a server onctl didn't create — a Hetzner auction/dedicated box (these live on Hetzner's Robot API, a different product from Hetzner Cloud, so the hetzner provider can never see them), or any other reachable host? Register it so ssh/ls work against it too:
❯ onctl import myauctionbox --ip 1.2.3.4 --user root --key ~/.ssh/auction_key
✔ Imported "myauctionbox" (1.2.3.4)
Use it with: onctl --provider static ssh myauctionbox
❯ onctl --provider static ls
❯ onctl --provider static ssh myauctionbox
Imported hosts only support ssh/ls/destroy — destroy just forgets the host locally, it never touches the real machine, since onctl didn't create it and has no lifecycle API for it.
Concepts: tasks, runs, workspaces, boxes
onctl claude and onctl backlog use these words (see docs/plans/shared-vocabulary.md):
| Word | Means | Where you meet it |
|---|---|---|
| Task | One piece of work that ends in one pull request, in one repository | onctl backlog add "..." |
| Backlog | Tasks waiting their turn, worked on a few at a time: ~/.onctl/backlog.json, or the open issues labelled onctl once onctl backlog repos names repositories |
onctl backlog, :backlog in the tui |
| Run | One agent working once, attached (interactive, onctl claude) or not (code), or a follow-up on a task's pull request (ci_fix, conflict_fix, change) |
onctl runs, :runs in the tui, onctl claude ls |
| Agent | What does the work: Claude Code, with its model | onctl backlog add --model, onctl claude --model |
| Workspace | Where a run's code is: the project's checkout on a box, or a git worktree beside it | onctl claude --workspace <name> |
| Box | A VM, microVM or container: hosted (-p boxes) or on any provider. It holds one or more workspaces |
onctl create, ls, pause, destroy |
A run may open a pull request. If CI fails on it, or it conflicts with its base, a follow-up run fixes it. Nothing merges it but you, and merging it finishes the task. onctl claude runs on a box from any provider; the backlog's runs go on hosted boxes only.
Provider capabilities
What each provider can do. onctl capabilities prints the same table, and onctl capabilities <provider> shows one provider in detail; the docs explain each column.
| Provider | onctl pause |
onctl images |
onctl sizes |
onctl restart |
|---|---|---|---|---|
| ac | ✅ | — | — | — |
| aws | ✅ | — | — | — |
| azure | ✅ | — | — | — |
| boxes | ✅ | ✅ | ✅ | — |
| ch | — | — | — | — |
| fc | ✅ | ✅ | — | ✅ |
| gcp | ✅ | — | ✅ | — |
| hetzner | ✅ | ✅ | ✅ | — |
| openshell | ✅ | — | — | — |
| ovh | ✅ | — | ✅ | — |
| static | — | — | — | — |
Installation
macOS and Linux
curl -fsSL https://onctl.sh/get.sh | bash
The installer downloads the release for your OS and architecture, verifies it against the release checksums, installs onctl to ~/.local/bin (override with ONCTL_INSTALL_DIR), and adds that directory to your PATH in ~/.bashrc, ~/.zshrc or fish's config if it isn't there already. No sudo. Open a new terminal afterwards. To install a specific version, set ONCTL_VERSION=v0.1.34. Windows users can grab onctl-windows-amd64.zip from the releases page.
Edge build (latest main, Linux, macOS and Windows)
To install or update to the edge build, a binary rebuilt from the tip of main on every push:
curl -fsSL https://onctl.sh/get-edge.sh | bash
On Windows, download onctl-windows-amd64.zip from the edge release.
Tab completion
The install scripts also set up tab completion for your shell (bash,
zsh or fish): subcommands, flags, and the names of your own VMs, so
onctl ssh my-b<TAB> finishes the name for you. Open a new terminal
after installing to pick it up.
It works by writing a completion script to your shell's per-user
completion folder and, for bash and zsh, adding one line to ~/.bashrc
or ~/.zshrc that loads it. To skip this, run the installer with
ONCTL_NO_COMPLETION=1:
curl -fsSL https://onctl.sh/get.sh | ONCTL_NO_COMPLETION=1 bash
To set it up by hand instead:
echo 'source <(onctl completion bash)' >> ~/.bashrc # bash
echo 'source <(onctl completion zsh)' >> ~/.zshrc # zsh
onctl completion fish > ~/.config/fish/completions/onctl.fish
VM names are looked up live from your cloud provider, so completing them
needs an initialized .onctl directory and working credentials.
Windows
- download windows binary from releases page
- unzip and copy onctl.exe to a location in PATH
Enjoy ✅
❯ onctl --help
onctl is a tool to manage cross platform resources in cloud
Usage:
onctl [flags]
onctl [command]
Examples:
# Browse and manage your VMs in the k9s-style terminal UI
onctl
# List all VMs
onctl ls
# Create a VM with docker installed
onctl create -n test -a docker/docker.sh
# SSH into a VM
onctl ssh test
# Destroy a VM
onctl destroy test
Available Commands:
action Execute a custom action from GitHub
backlog Tasks for Claude to turn into pull requests, a few at a time
capabilities Show what each provider can do
claude Run Claude Code on a box, with this project on it
completion Generate the autocompletion script for the specified shell
cp Copy files between a box and this machine
create Create a VM
deploy Deploy a Docker image to a remote VM
destroy Destroy VM(s)
env Manage environments
exec Run a command in a fresh, disposable box and print the result as JSON
expose Give a port inside a box a public HTTPS URL
harness List the harnesses `onctl claude --harness` can use
help Help about any command
host-agent Run this machine as a box host for a control plane (boxctl, onctl-runners)
images List available OS images for the current cloud provider
import Import an existing server so it can be managed with ssh/ls
init init onctl environment
login Log in to hosted boxes (-p boxes) through your browser, or with a personal token
logout Forget the saved boxes token
ls List VMs
pause Snapshot and delete a VM to stop compute cost (keeps its IP)
port-forward Forward local ports to ports on a VM, over ssh
restart Cold-boot a VM again from its own disk, optionally on a new kernel (fc)
resume Recreate a paused VM from its snapshot
runs List every run, going and ended
sizes List the VM sizes the current provider offers (what --type takes)
ssh Spawn an SSH connection to a VM
ssh-proxy Relay stdin/stdout to a VM's port through the provider (for ssh's ProxyCommand)
templates Manage onctl templates
tui Browse and manage your VMs in a k9s-style terminal UI
unexpose Take a box's public URL down
version Print the version number of onctl
Flags:
-c, --config string Path to onctl.yaml configuration file (overrides the .onctl directory lookup)
-h, --help help for onctl
--project gcloud config get-value project GCP: project ID (falls back to gcloud config get-value project when the onctl.yaml placeholder is present)
-p, --provider string cloud provider: aws, hetzner, azure, gcp, ovh, fc, ch, ac, static, boxes, openshell (overrides ONCTL_CLOUD)
--resource-group string Azure: resource group (required for the azure provider; falls back to the az CLI's configured default group, if any)
--service-name string OVH: Public Cloud project service name (required for the ovh provider)
--subscription-id az account show Azure: subscription ID (required for the azure provider; falls back to az account show)
Use "onctl [command] --help" for more information about a command.
Contributing
See CONTRIBUTING.md for how to report issues and what a pull request needs.
For development guidelines — especially when using AI coding agents (opencode, Claude, etc.) — see AGENTS.md.
Important: When running multiple AI agents in parallel on this repo, you must use separate git worktrees (or clones) for isolation. See the "Coordinating multiple agents..." section in AGENTS.md.
関連プロジェクトを探す
読み込み中…