hangar
The hangar commands.
A Hangar is a cloud machine for coding agents, next to your applications. The agents you choose are installed when it first starts, each in a window of its own, and the machine keeps working whether or not anybody is connected.
A Hangar belongs to the team, not to whoever created it. Anyone in the team can connect, everyone connected shares one screen, and the files and each agent's sign in are shared the same way. The home directory is the Hangar's disk, so what you install or clone there stays until the Hangar is deleted.
Hangars are in beta, and free while it lasts. Every Hangar runs on one size with a 10 GB disk, and a team can have up to five. The name follows the application rule and is shared with applications: a name one of them holds is taken for the other.
Most people start in the console, where Hangars creates one and opens its terminal in the browser. These commands do the same from a terminal or a script.
hangar connect is the one command here that cannot run without a terminal at both
ends, so an agent asked to open one gets the Hangar ready and hands the command over.
hangar delete stops for a person's confirmation, as every deletion does. These commands
need outplane v0.2.11 or newer. hangar port, hangar metrics and hangar restart
need v0.2.12 or newer, hangar pause, hangar resume, hangar update and
--hangar on the env commands need v0.2.13 or newer, and --repo on hangar create
needs v0.2.15 or newer.
hangar create --repo owner/name --branch main clones a GitHub repository into the
home directory on the Hangar's first start, once, and the repository cannot be changed
afterwards. A clone that fails is not tried again: the terminal says why and gives the
command to clone it by hand. Out Plane only clones, so pushing means signing in to
GitHub in the Hangar's terminal. See
Push from a Hangar.
hangar port opens up to three ports for the dev servers that run in a Hangar. Every
open port is reachable from the team's applications at {name}:{port}, and a public one
from everyone on the internet, with no IP access profile and no custom domain in front of
it. A change applies within seconds and restarts nothing, so the terminal and the agents
keep running. A dev server is reached only when it listens on 0.0.0.0.
hangar metrics shows what each Hangar is using right now: CPU and memory against what
its size allows, and how full its home disk is. A Hangar that reaches its memory limit
freezes rather than restarting, so act when memory reaches 90%.
hangar pause stops a Hangar's machine and keeps its disk, ports and variables, and
hangar resume starts it again on a new machine in under a minute. hangar update
changes how long it may sit idle before it pauses on its own: 15 minutes to 24 hours, or
never, with 30 minutes for a new Hangar.
The env commands take --hangar in place of --app, so env set --hangar and
env group assign --hangar change a Hangar's variables and the variable groups linked to
it after it is created. Saving changes nothing that is running: the change applies the
next time the Hangar starts, at hangar restart, or at hangar resume when it is paused,
and --restart does that in the same command.
The CLI is installed in every Hangar as well. Run outplane login in its terminal, or
set OUTPLANE_TOKEN as a Hangar variable, and an agent working there can use these
commands. See Use the Out Plane CLI in a Hangar.
Commands
| Command | What It Does | Risk |
|---|---|---|
hangar list | List the Hangars in a team. | read |
hangar get | Show one Hangar in detail. | read |
hangar create | Create a Hangar and start it. | write |
hangar connect | Join a Hangar's terminal session. | write |
hangar pause | Pause a Hangar, keeping its disk. | write |
hangar resume | Start a paused Hangar again. | write |
hangar update | Change how long a Hangar may sit idle before it pauses. | write |
hangar restart | Restart a Hangar on a new machine, keeping its disk. | write |
hangar delete | Permanently delete a Hangar and its disk. | destructive |
hangar metrics | Show what Hangars are using right now. | read |
hangar port list | List the ports a Hangar has open. | read |
hangar port set | Open a port on a Hangar, or change one that is already open. | write |
hangar port unset | Close a port on a Hangar. | write |