Questa pagina non è ancora tradotta in italiano: eccola in inglese.
glac calls the same API as the SDKs. Its commands are grouped by product, as the platform is: glac cube …, glac sandboxes …, glac drives …, with the project and the account at the top. It is written for three kinds of user: a person at a terminal, a script in CI, and a coding agent. So:
- By default it prints the one thing you asked for (an id, a table, the command’s own output). Every command takes
--jsonand then prints what the API returned, errors too. glac run,glac sandboxes execandglac sandboxes shellexit with the exit code of the command in the sandbox. A failure that is not the command’s is 125.- On an error it prints the API’s
messageandcodeon stderr. - It never waits for input it was not asked to read, and never deletes what it was not asked to delete.
Install
glac is one file (1.7 MB on macOS arm64, 2.3 MB on Linux x86_64) that starts in about 3 ms. Install it with:
curl -fsSL https://glac.ai/install.sh | shConfigure
glac reads GLAC_API_URL and GLAC_API_KEY (the same two as the SDKs), then the file glac login writes (~/.config/glac/config.json, mode 0600; $XDG_CONFIG_HOME and GLAC_CONFIG move it). Without either, it talks to https://api.glac.ai.
glac login --api-url https://api.glac.ai --api-key - # reads the key from standard inputA token for one sandbox (st_…) works as a key too, for exec, cp, shell and url on that sandbox. HTTPS uses the Mozilla root certificates built into glac; SSL_CERT_FILE adds your own. Redirects are not followed, so a key is never sent elsewhere.
The commands
glac deploy IMAGE … the same as glac cube deploy
glac run COMMAND … the same as glac sandboxes run
glac install APP … the same as glac installations create
glac cube deploy | ls | get | update | rm | versions | rollback | upgrade | upgrades | logs | log-usage | log-delete | metrics
glac cube instances create | ls | get | rm
glac cube instances ports ls | open | close
glac cube key-secrets create | ls | get | rm
glac cube keys sign
glac compose up | config | down | ps | logs | restart
glac deploys create | ls | get
glac sandboxes run | create | ls | get | update | rm | sleep | restart | exec | ps | logs | kill
| shell | cp | url | fork | restore | ssh
glac sandboxes snapshots create | ls | get | rename | rm
glac sandboxes ssh-keys add | ls | get | rm
glac sandboxes tokens revoke
glac sandboxes ports ls | open | close
glac browsers create | ls | get | update | sleep | rotate-url | live | save-profile | profiles ls | profiles rm | rm
glac drives create | ls | get | rename | rm | attach | detach | fork | restore
glac drives snapshots create | ls | get | rm
glac volumes create | ls | get | rm | attach | detach
glac backups ls | create | get | rm | restore
glac domains create | ls | get | update | rm
glac db create | ls | get | update | rm | sleep | wake | restore | roles | reset-password
glac db branches ls | get | create | rm
glac catalogue ls | get
glac installations create | ls | get | update | rm
glac project · glac variables put | ls | rm · glac secrets put | hosts | ls | rm · glac events · glac audit
glac webhooks create | ls | get | update | rm
glac keys create | ls | get | rm
glac destinations create | ls | get | update | test | rm
glac limits · glac limits request | requests
glac usage · glac account … · glac billing … · glac login · glac logout · glac versionEvery group answers to its singular too (glac sandbox, glac browser, glac drive, glac volume, glac backup, glac secret, glac variable, glac domain, glac database, glac installation, glac db branch, glac cube instance, glac sandboxes snapshot, glac sandboxes ssh-key, glac sandboxes token, glac sandboxes port, glac drives snapshot), glac workers is glac cube, and glac sbx is glac sandboxes: glac sbx exec web ls is glac sandboxes exec web ls. glac help lists every command by product, glac help sandboxes the commands of one group, glac help sandboxes exec what one command takes. Options and columns keep the API’s names: a Cube is an app there. An app, a sandbox, a snapshot, a Drive, a volume and an SSH key are named by their id or their name, a version of an app by its number or its id, and a snapshot of a Drive (dsnap-…) and a backup (bak-…) by their ids.
Cube
Cube runs an image as a service, a Cube, which the API calls an app. glac workers … (or glac worker …) is another name for glac cube ….
| Command | What it does |
|---|---|
glac deploy IMAGE --name api --port 8080 |
Deploys an image as an app (a new version if the app exists), waits until it is ready, prints its address. --no-wait returns at once. glac cube deploy is the same command. --ulimit nofile=65535, --sysctl, --tmpfs, --dns, --dns-search, --dns-option and --shm-size, as Docker takes them, are the version’s runtime settings, replaced whole where any is given (glac cube update api --reset runtime takes them away). |
glac cube ls, get, update, rm |
The apps; update deploys a new version when it changes what a version is made of. get says the database an app is under (managed_by): the database changes, deploys and deletes it, and update, deploy, rollback and rm of it are refused (managed_by_database). |
glac cube versions, rollback api [version] |
The versions; send the traffic to another (without a version, to the newest ready one before the current). |
glac cube update agent --suspend-after-ms 60000 --wake-daily-at 03:30 |
How long a stopped instance stays paused (its next request answered in a millisecond or two) before its memory is saved and it sleeps for real, and the time of day in UTC at which the app’s keyed instances and its stateful service’s instance that rest are woken every day: the app’s scale. glac deploy takes both too, --reset suspend-after-ms and --reset wake-daily-at take them back, and glac cube get shows them. |
glac cube update agent --checkpoint 10 |
Checkpoints of the app’s keyed instances while they are awake, so many seconds apart (1 to 600; on is 10), from which one goes on with its processes when its machine is lost; --reset checkpoint takes them away, and glac deploy takes --checkpoint too. glac cube get shows the setting, and glac sandboxes get how an instance’s checkpoints go. See checkpoints. |
glac cube upgrade api user-42 [--version N] [--when now|asleep] [--keep-days N] [--no-wait], glac cube upgrades api user-42 [UPGRADE] [--wait] |
Moves the instance of a key to another version of the app, in place (the app’s current version unless --version names one, by its number or its id): it keeps its id, its node, its address, its tokens and its own Drives; its disk, its machine and its processes become the new version’s, and its requests are held at the edges while it is switched. Waits for the end and prints the version it is on (--no-wait prints the upgrade’s id); one that failed exits 1 with the upgrade’s code, the instance put back as it was. upgrades lists a key’s upgrades (each one’s kind, the versions it went from and to, how long its requests were held, where it failed), or shows one with what a revert of it needs and until when it is kept, --wait waiting for its end. --when asleep has it wait until the instance sleeps and begin then, so that none of its requests is held; --keep-days (0 to 365, 7) is how long what a revert needs is kept. A version whose services mount other Drives or volumes than the instance’s is refused (upgrade_not_here). glac workers upgrade is the same. |
glac cube upgrades revert api user-42 UPGRADE [--keep-days N] [--no-wait], glac cube upgrades cancel api user-42 UPGRADE |
A revert: the instance back to what an upgrade kept, its disk, its Drives as they were before it and the version it came from, waited for as an upgrade is (rollback_gone where what it goes back to is not kept any more). cancel cancels an upgrade that waits (for its instance to sleep, or for its turn in a batch); one that has begun is refused (upgrade_started). A wait on an upgrade that was cancelled ends, with the code cancelled. |
glac cube upgrades batch api [--version N] [--from-version N]… [--key K]… [--when now|asleep] [--keep-days N] [--concurrency N] [--max-failures N] [--wait], glac cube upgrades batches api [BATCH] [--wait], glac cube upgrades stop api BATCH |
A batch of upgrades of the app’s keys to one version: each once its instance sleeps (or as its turn comes, --when now), 4 at once unless --concurrency says (two on one node), stopped after 5 failures unless --max-failures says. batch prints its id (--wait waits for its end and shows it, exiting 1 unless it ended done with no failure); batches lists them, or shows one with its members; stop cancels its members that wait. An app named like one of these words is named by its id in glac cube upgrades. |
glac cube instances ports open api user-42 5432 --from 2001:db8::/32 |
The ports open at the own public IPv6 address of a key’s instance, wherever it is, by the app and the key: ls; open one to the sources given (IPv6 prefixes or addresses, ::/0 for everybody; 5432/udp for UDP) and print where it is reached; close one. The instance keeps them through sleep and moves; a new instance of the key does not have them. An instance with no address of its own is refused (no_ipv6). See keyed instances. |
glac cube logs api -f |
The app’s log, with --since, --until, --instance, --version, --kinds, --status, --method, --path, --request-id, --event, --stream, --contains. |
glac cube log-usage, log-delete |
What the log counted each day; delete lines before a time. |
glac cube metrics api |
What the machines that serve the app counted of it, a row a minute (--by-hour: an hour; --from, --to): requests, those refused and by the class of their status, p50 and p99, instances awake and stopped, wakes, instances made, CPU and memory. Minutes are kept for 24 hours, hours for 30 days. |
glac cube key-secrets create api, ls, get api ID, rm; glac cube keys sign |
The secrets an app’s keys are signed with: create prints one, the only time it is shown; ls and get show their first characters and when each was made, never a value. See signed keys. |
glac compose up, config, down, ps, logs, restart |
Imports a Compose file into the project, one app a service, with its drives and its network, and waits for the deploy it makes; --remove-orphans deletes the apps of services the file no longer has, --strict refuses what would be ignored, and -f - reads the file from standard input. ps lists its services and how each stands, logs prints their logs together (-f follows), restart deploys each again as it is. COMPOSE_FILE is read from the environment, else from the .env file (of --env-file, or in --project-directory or here), as Docker Compose reads it; --build builds and pushes the images first. See services and Compose. |
glac deploys create api=ghcr.io/acme/api:2 web, ls, get ID [--wait] |
The project’s deploys (/v1/deploys): several services deployed together, in the order of what each waits for, and switched together. create takes SERVICE (as it is) or SERVICE=IMAGE, and -f FILE (JSON: the services by name, each with the fields of a version, or {"services": {…}}); it waits for the deploy (--no-wait does not), follows a deploy that took its place, and exits 1 with the service it failed at when it fails. See deploying a project. |
Sandbox
| Command | Example | What it does |
|---|---|---|
run |
glac run --image python:3.12 -- python3 -c 'print(6*7)' |
Makes a sandbox, runs one command with its output as it comes, deletes it. Ctrl-C ends both. 300 seconds unless you say. glac sandboxes run is the same command. |
create |
glac sandboxes create --name web --env STAGE=dev |
Makes one and prints its id. --image-pull-secret for a private image, --egress for network rules, --drive data:/data for a Drive (data:/snap:dsnap-… for one of its snapshots, read-only; --volume team:/team for a volume), --sleep-notice-ms and --sleep-hold-max-ms for what its programs are told before it sleeps and how long they can keep it awake. A service started when it boots: --start (the image’s own start command) or --start-command LINE, with --ready tcp:PORT, http:PORT/PATH or cmd:COMMAND; --hostname, --stop-signal and --stop-grace-ms for its machine’s name and how its service is stopped; --project-network puts it on the project’s private network from the start; --volume team:/team:copy gives a new volume what the image has at that path. glac run takes these too. --checkpoint 10 (on update too; off takes them away) has it checkpointed while it is awake. |
create --init systemd |
glac sandboxes create --name box --init systemd |
A whole system: the image’s own systemd is PID 1 (without --image, the platform’s Ubuntu with systemd and OpenSSH), so packages, services started with systemctl, cron and the journal work as on a machine, and it has a machine ID of its own, kept through sleeps, wakes and moves. Not with --start, --start-command or --ready, nor with --snapshot. glac run takes it too, and glac sandboxes get shows init. |
ls |
glac sandboxes ls --status running |
Lists, newest first; -q prints ids only. |
get |
glac sandboxes get web |
Its state, why it is awake, its settings and usage, and what its disk has written today against the day’s share at full speed (disk_writes: its checkpoints’ copies among it; past the share, until when its disk is slowed; - on a node that does not copy its disks to an object store). |
update |
glac sandboxes update web --sleep-after-seconds never |
Name, environment, labels, public ports, idle time, the notice before it sleeps and the cap on holds, expiry, network rules. --suspend-after-ms (default: the node’s) and --wake-daily-at HH:MM (none: no wake) on create and update are how long it stays paused before it sleeps for real and the time of day in UTC it is woken every day while it rests; glac sandboxes get shows them, and how its start command runs (start_command: how often it was started again in its machine, how it last ended). --on-expiry delete|sleep|hold is what --expires-at does when it comes (deleted, the default; put to sleep and kept; or the same, held asleep), and --held-asleep yes|no whether a request wakes it while it sleeps (held asleep, its preview address answers 502 sandbox_paused, and a call of the API wakes it); get shows both. |
rm |
glac sandboxes rm web |
Deletes one or more. |
sleep |
glac sandboxes sleep web |
Sleeps now. There is no wake: the next command that needs it wakes it. |
restart |
glac sandboxes restart web |
Boots it again from its disk. |
exec |
glac sandboxes exec web -- ls -la /srv |
Runs a command, output as it comes; --detach only starts it and prints its id. |
ps, logs, kill |
glac sandboxes logs web exe-… --follow |
Its commands; one command’s output; a signal to a command and everything it started. |
shell |
glac sandboxes shell web |
A terminal. Enter, then ~. leaves it running; --join exe-… comes back. |
cp |
glac sandboxes cp -r ./src web:/srv/src |
Copies files either way; - is standard input or output. |
url |
glac sandboxes url web 3000 |
A link to a port. Whoever has the link can open the port. |
tokens |
glac sandboxes tokens revoke web |
Every token handed out for the sandbox so far stops working (401 invalid_token), those in preview links and cookies and those SSH sessions hold too; tokens made after it work. Prints the generation its tokens are at now. With a token after the sandbox (its id, tok_…, or the token itself), that token alone, until it would have run out. Needs the API key: with a sandbox token it is 403 needs_api_key, exit 3. |
snapshots |
glac sandboxes snapshots create web --name before-upgrade |
Saves memory, processes and disk now; also ls, get, rename (--none takes the name away), rm. glac sandboxes create --snapshot starts from one. |
fork |
glac sandboxes fork web --count 3 |
Copies that go on from this moment. |
restore |
glac sandboxes restore web before-upgrade |
Back to a snapshot, in place; the state before is kept as a snapshot. |
ssh-keys, ssh |
glac sandboxes ssh web --gateway ssh.glac.ai |
Registers a public key (never a private one); prints the ssh, scp and sftp command lines for a sandbox. |
ports |
glac sandboxes ports open web 8080 --from 2001:db8::/32 |
The ports open at the sandbox’s own public IPv6 address, where it has one: ls; open one to the sources given (IPv6 prefixes or addresses, ::/0 for everybody; 53/udp for UDP), and print where it is reached; close one. Inbound is closed by default. --inbound PORT[/udp]=FROM[,FROM…] on create and update gives the whole list, and get shows the address and the open ports. See networking. |
How a command is written: one argument is a line for sh -c (glac sandboxes exec web 'ls | wc -l'); several are a program and its arguments, run as they are. Standard input that is not a terminal is passed to glac sandboxes exec (tar c . | glac sbx exec web tar x -C /srv); --no-stdin stops that. The first Ctrl-C goes to the command; a second leaves it running. A command belongs to the sandbox, not to the connection: glac sandboxes exec and glac sandboxes logs --follow pick up where they were after a dropped connection.
Only the last 16 MiB of a command’s output is kept, and a command never waits for a slow reader. When glac sandboxes exec misses part of the output it says how much and exits 125, rather than pass on output with a hole in it. Write large output to a file and glac sandboxes cp it out.
Drive
A Drive is a disk of the project’s that outlives the sandboxes that use it: one sandbox has it at a time, read-write, and what it holds stays for the next sandbox: of its region, or of another whose machines read its home’s object store (glac drives home, below). It is copied into its region’s object store as it is written, so a sandbox on another node mounts it too. Only what is written is billed. Drives are a control plane’s: against a node that stands alone glac drives … gets the node’s 404 (exit 4), and says that its disks are volumes.
| Command | What it does |
|---|---|
glac drives create --name data --size-bytes 10GiB --region eu |
Makes a Drive and prints its id (a vol-…: a Drive is a volume). The size is a whole number of 4 KiB blocks, 16MiB at the least; 64GiB unless you say, or 5GiB on Free. --durability strict: a guest’s fsync returns once the object store has every write before it (standard unless you say, kept for good; see how durable a write is). |
glac drives ls, get data, rename data data-2, rm data |
The Drives, with how much is written to each and the sandbox that has it; one Drive, with the node of its one writer and, for a fork, the Drive it was forked from (parent_drive_id) and the first of its line (root_drive_id), and for a database’s Drive the database (managed_by: its instance alone mounts it read-write, and a rename, a restore or a delete of it here is refused, managed_by_database); another name (--no-name for none); delete (not while a sandbox has it: drive_attached; its snapshots stay, and are billed, until they are deleted too). |
glac drives attach data web:/data, detach data web |
Mounts a Drive in a sandbox that runs, read-write, at once; takes it away (--force while files are open on it). A new sandbox gets one with glac sandboxes create --drive data:/data, an app’s one instance with glac deploy … --drive data:/data, and each key’s instance of a keyed app its own with --key-drive home:/home/app:10GiB. --snapshot dsnap-… mounts one of its snapshots read-only instead, and glac drives detach dsnap-… web takes that away (the Drive’s name or id takes away its read-write mount alone). |
glac drives snapshots create data --name before-upgrade |
Keeps the Drive as it is now and prints the snapshot’s id (dsnap-…): a version of it in the object store, of which nothing is copied. A Drive a running sandbox has is taken with the guest’s writes held for a moment (ten seconds at the most, else unavailable: ask again): its machine paused (consistency paused, the Drive as at a power cut) or, with --fs-consistent, its file system frozen first (frozen; not_frozen where the sandbox’s agent cannot). A Drive no running sandbox has is taken as it is (at_rest). Also ls data (newest first: how each was taken, what the Drive held, what it keeps alone, its version; without a Drive, the project’s snapshots of every Drive, --deleted true those of Drives deleted since alone), get data dsnap-…, rm data dsnap-…. A snapshot outlives its Drive: it is listed, read, forked and mounted by the Drive’s id after the Drive is deleted. A control plane whose nodes copy nothing to an object store has none (not_copied). |
glac drives fork data --name data-try --from-snapshot dsnap-… |
A new Drive whose first version is the snapshot’s (without --from-snapshot, the Drive’s as it is now); prints its id. Nothing is copied: it mounts at once, and its blocks come from the object store as they are read. Held to the plan’s Drives (drive_limit_reached). |
glac drives restore data dsnap-… |
Takes the Drive back to a snapshot: a new version after its newest, with the snapshot’s content. The versions in between stay where a snapshot or a fork keeps them, so restoring to an older snapshot and then to a newer one works; what the Drive holds now stays only where a snapshot keeps it, so take one first to be able to come back. Not while a sandbox has the Drive (drive_attached): detach it first. |
glac drives history data 3600, glac drives versions data [--at TIME], glac drives restore data --at TIME, glac drives fork data --at TIME |
A Drive’s window of versions (slice DB8): how far back it can be restored, or forked, by a time, 3600 to 86400 seconds (none unless given; turned off, what it kept goes). Every 30 seconds in which it was written the window gets a version, the Drive at one moment; what they keep alone is billed as a snapshot’s is. A restore or a fork to a time takes the newest version at or before it, which the versions call with that time names. glac drives create --history SECONDS makes one with it; history DRIVE off turns it off; versions lists them (number, moment, how it was had, what it keeps alone). |
glac drives create --cache-bytes 2GiB, glac drives cache data 512MiB, glac drives cache data all |
A Drive’s cache: how much of it its node keeps on its NVMe at the most: all of it unless given (its size); less, down to 0, and what is past it is in the object store alone, read from there when its guest reads it (the least recently read let go first, and never what the store does not hold yet). The cache is billed by the hour as it is filled, beside what the Drive holds. A smaller one lets go of what is past it once the store holds it (of a Drive a running sandbox mounted with all of it cached, from that sandbox’s next sleep or stop); a larger one keeps what its guest reads from then on. The API calls Drives volumes (/v1/volumes); the clients reach them by /v1/drives, which answers as it did. glac drives get says it (all of it, or how much at the most, and what is there now). |
glac drives home data |
Moves the Drive’s home (slice D9) to the region it is held in now, at once rather than an hour after it got there. A Drive’s home is the region whose object store holds its copy: the region it was made in. A sandbox of another region mounts it too, where that region’s machines read its home’s store (not_on_one_machine where they do not); it is read from its home’s store as its guest reads it, and what its guest writes goes to the store of the region it is in. Its home follows once it has been there for an hour, or at once with this: its machine copies what is left in its home’s store into its own. glac drives get says home, and how far a move is (home_move: when and why it was asked, objects copied and left, the error it stopped at last). Once in six hours at the most (home_moved_recently); a Drive whose home is where it is already is home_here. |
glac volumes create --name team --shared, ls, get, rm, attach team web:/team --read-only, detach |
Volumes, the disks underneath Drives, kept for the transition: shared volumes, and the disks of a node that stands alone. |
glac backups create data --expires-in-days 7 |
Takes a backup of a volume (a Drive too) now and prints its id (bak-…): a copy of it at this instant in the object store, which keeps only the blocks that changed since its backup before, its file system frozen for the copy where a sandbox has it mounted (milliseconds). It is making until the store has all of it, then ready, billed from then by what the store holds of it at the price of what sleeping sandboxes keep, and deleted when it expires (after the volume’s rule’s days, 30 unless set). Also ls [--volume data] (newest first, with why each was taken: manual, daily, before_version, what each is billed for, what deleting it would save and what it shares; those of deleted volumes among them), get, rm. A machine that copies nothing to an object store has none (not_copied), and neither has a node that stands alone: backups are a control plane’s. See backups. |
glac backups restore bak-… --name data-back |
A new volume made from a ready backup, the same as glac volumes create --from-backup bak-…: the size and kind of the volume it was taken of, in the backup’s region, restoring until it holds the backup whole, then ready; nothing attaches it before. Where the machine it was placed on cannot bring it back, it is made once more on another, and glac volumes get says so (restore_attempt 2, with why the first failed). |
A snapshot is mounted read-only by any number of sandboxes at once, on any machine of the Drive’s region, whatever has the Drive and after it is deleted: glac sandboxes create --drive data:/snap:dsnap-… for a new sandbox (--snapshot there is the sandbox snapshot it goes on from, so a Drive’s snapshot rides on --drive, as :ro rides on --volume), glac drives attach data web:/snap --snapshot dsnap-… for one that runs. The guest cannot write it, and a sandbox that has one is not moved to another machine. An app’s version mounts a Drive read-write only.
Billing: a snapshot is billed for what it keeps alone (exclusive_bytes), by the hour, at the Drives’ data price ($0.02 a GB-month). A fork is billed like any Drive, by its used_bytes, its full logical contents: a fork of a 10 GB snapshot is billed as a 10 GB Drive. What a sandbox reads through a read-only mount costs nothing. glac usage --drive data reports what one Drive kept, was written and read cold, and glac usage --snapshot dsnap-… what one snapshot kept.
Domains
| Command | What it does |
|---|---|
glac domains create api.example.com --app api |
Registers a name of your own for an app (--app), or for a port of a sandbox (--sandbox web --port 8080), and prints the record that proves the name is yours: a CNAME, which also leads the name here, or a TXT record. It is pending_verification until DNS shows one, and its certificate is issued then. --proxied false serves it direct (addresses). |
glac domains ls [--app api] [--sandbox web], get, update, rm |
The project’s domains; one, by its name or id (dom-…), with its record while it is not proven; another app, sandbox or port for it, or --proxied; delete. |
Browser
Not open yet. Browser is not open to accounts yet: what follows is the command line as it stands, ahead of its opening.
A session is a hosted Chromium that Playwright, Puppeteer or any other client of the Chrome DevTools Protocol (CDP) drives from outside. It is awake while a client is connected and falls asleep, its pages kept, a few seconds after the last one leaves.
| Command | What it does |
|---|---|
glac browsers create [--name NAME] [--headful | --kind KIND] [--region na|eu|ap] [--sleep-after S] [--connection-idle S] [--delete-after-idle S] [--metadata K=V] [--profile NAME [--save-profile]] [--proxy URL] |
Makes a session, awake, and prints its CDP address and nothing else: what Playwright’s connectOverCDP and Puppeteer’s browserURL take. The credential is in the address. The name of one there is answers that one, woken, with its pages. --profile loads a profile (its cookies, Local Storage, IndexedDB) before the session is answered; --save-profile saves it again when the session is deleted. --kind lightpanda makes a Lightpanda session: no layout engine (its screenshots hold the page’s text alone), no live view, no profile. --proxy http://user:password@host:port: your own HTTP proxy, which takes CONNECT, on Paid: the session’s connections to ports 80 and 443 go out through it, the credentials kept by the platform (your own proxy). One whose sandbox fails before it runs is no session: the create is refused, 503 session_failed. |
glac browsers get SESSION |
The session: why it failed, where it did (failed: its browser stopped and did not come back, in its node’s words), its CDP address, where its page (or a headful one’s screen) is watched live, its profile, its own proxy (its address and user name, never the password) and what went through it both ways, its connections and its times. |
glac browsers ls [--status S] [--kind K] [--name N] |
The project’s sessions, without their addresses (--status awake, asleep, unavailable or failed). |
glac browsers update SESSION …, sleep SESSION, rotate-url SESSION, rm [--no-save-profile] SESSION… |
Changes its times, metadata or proxy (--proxy URL, another of yours; --no-proxy, none: the browser goes on as it is); puts it to sleep now (an open connection stays, and wakes it); new addresses, the new CDP address printed (the old ones are refused, and the connections they let in end); ends sessions (one made with --save-profile saves its profile first, unless --no-save-profile). |
glac browsers live SESSION [--read-only] |
Prints where its page is watched live in a browser, the viewer’s mouse and keyboard reaching it; --read-only, an address of its own where nothing reaches the page, to show people. A viewer keeps the session awake. |
glac browsers save-profile SESSION [PROFILE], profiles ls, profiles rm PROFILE… |
Saves its profile now, as the newest version of PROFILE (or of the one it was made with), kept by the platform for the project: its browser restarts, and a connected client reconnects; the project’s profiles; deletes them. |
CDP=$(glac browsers create --name agent-42)
npx @playwright/mcp --cdp-endpoint "$CDP" # or any CDP clientA session is billed by the Cube resources it uses, as any instance is: its CPU while it computes, its memory while it is awake and its traffic out (pricing and plans). glac usage gives a session’s use beside its sandbox.
Databases
A database is a managed Postgres: a PostgreSQL of its own on a Drive, asleep when nothing asks anything of it and woken by a connection, its sessions kept. The owner’s password is in the API’s answer to a create and to a reset alone, and kept nowhere: so create and reset-password print the connection string with it, and no other command prints it.
| Command | What it does |
|---|---|
glac db create NAME [--version 16|17|18] [--region na|eu|ap] [--database NAME] [--vcpus N] [--memory SIZE] [--storage SIZE] [--durability strict|standard] [--sleep-after S] [--suspend-after S] [--wake-at HH:MM] [--tiering] [--metadata K=V] |
Makes a database, waits for its first start (about two seconds), and prints its connection string with the owner’s password, and nothing else: psql, psycopg and node-postgres take it as it is. The name of one there is prints its string without the password, and says on stderr why. --suspend-after is how long it stays paused, a connection answered in a millisecond or two, before its memory is saved and it sleeps for real (1 to 86400 seconds, 300); --wake-at a time of day in UTC at which it is woken every day while it rests (its pg_cron jobs wake it at their own times anyway). glac db get says both, and glac db update DATABASE --suspend-after SECONDS|default --wake-at HH:MM|none changes them, every branch’s at once (default back to 300, none no wake). On a Free plan they are fixed: --sleep-after 1 (paused a second after its last query) and --suspend-after 300 (asleep five minutes later), as Neon’s Free scales to zero; another value is refused. --tiering turns its tiered storage on (slice DB18: on Paid); glac db update DATABASE --tiering on|off turns it on or off later (off is refused while a branch has partitions tiered), and glac db get says it. |
glac db ls [--name N], glac db get DATABASE |
The project’s databases (version, status, the root branch’s state and endpoint); one, with its connection strings without the password, its size, Drive, app and instance. |
glac db sleep DATABASE [--branch B], glac db wake DATABASE [--branch B] |
Puts a branch (main) to sleep now, its memory saved and its sessions there when it wakes (a connection wakes it too); wakes it now. |
glac db reset-password DATABASE [--role ROLE] |
A new password for its owner, or for another role that logs in (--role, one glac db roles lists): prints that role’s connection string with it, and nothing else. The old one is refused from the next login on; a connection that is open stays. A branch of its own keeps the password it was made with. |
glac db roles DATABASE |
The roles of its root branch that log in, read from PostgreSQL itself: its owner and the roles you made (CREATE ROLE … LOGIN); the platform’s are not among them. The root branch is woken for it. |
glac db rm [--no-final-snapshot] DATABASE… |
Deletes databases with their branches; a snapshot of each one’s Drive is kept seven days unless --no-final-snapshot. |
glac db branches ls DATABASE, glac db branches get DATABASE BRANCH |
Its branches (main first, then its own, the oldest first), and one of them. |
glac db branch create DATABASE BRANCH [--parent B] [--expires-at TIME], glac db branches rm DATABASE BRANCH… |
A branch of its own: its parent (main unless --parent names another) as it is now, nothing copied, with a PostgreSQL, an endpoint and a Drive of its own at DATABASE-BRANCH on the project’s network, deleted by itself at --expires-at where one is given. create waits for its first start and prints its connection string as the API gives it, without a password: its roles and passwords are its parent’s, so the owner logs in with the database’s. rm stops its PostgreSQL and deletes its Drive; not main (it goes with the database), nor a branch others were made of. |
glac db restore DATABASE --at TIME [--exact], glac db update DATABASE --history SECONDS, glac db branches create DATABASE BRANCH --at TIME [--exact], glac db create --history SECONDS |
Its history (slices DB8 and DB5): how far back its root branch can be restored, or branched from, by a time: a day unless given; 0 (none) to 30 days on Paid, a day on Free. A restore takes the root branch back in place: to a whole minute or a version’s own moment, the newest version of its Drive’s window at or before it (one every 30 seconds in which it was written, a day of it at the most); further back, to the second, or with --exact, the moment itself, to the millisecond, by its WAL archive (its WAL replayed to it: seconds to minutes). Its endpoint, its connection strings and its owner’s password stay what they were, its connections drop, and its state before is kept as a branch of its own, main_old_<the restore's moment>; one whose new version does not serve within five minutes is undone (database_restore_failed). A branch of a time is made of that moment instead. A time its history does not have is refused (invalid_history, saying from when the window and the archive reach). A time to the second (or --exact) is the archive’s or refused, never the window’s version before it (invalid_history; database_archive_unavailable, to try again, while the archive’s store refuses its segments), the refusal naming the window’s version at or before the time; one whose blocks the store does not give is refused (drive_unreadable, to try again). glac db get says it (history … s: restored to a time from … on), and each gap of its WAL archive (a gap in its WAL archive from … to …): where an outage of the object store lasted long enough that its WAL was given up so that it stayed up, a time in it is restored from its window alone, not to the second. |
URI=$(glac db create shop) # the owner's password is in it
glac sandboxes create --name client --project-network --image postgres:17-alpine
glac sandboxes exec client -- psql "$URI" -c 'select 1' # on the project's networkA database is reached today on the project’s network, from its sandboxes (--project-network) and services, at its name; its public address comes with the platform’s public entrance, and create prints it instead where the API gives one (--private prints the one on the project’s network whatever there is). --json prints what the API answered: the password is in a create’s and a reset’s answers alone.
Managed Applications
An application of the catalogue (Rivet, say) is installed in the project as its own Cube resources: its apps, Volumes, secrets and buckets, labelled with the installation, changed through it alone, and billed as they are (Managed Applications).
| Command | What it does |
|---|---|
glac catalogue ls |
The catalogue’s applications, each at its newest version: its publisher (verified: packaged by the platform), its licence and what it is. |
glac catalogue get APP [--version V] |
One application: its versions, publisher, licence and outputs; its parameters, each by its dotted name with its type, default and bounds; and what a month of it comes to in Cube’s meters at its calculator’s defaults. |
glac install APP [--name NAME] [--version V] [--region na|eu|ap] [--set KEY=VALUE]… [--parameters JSON] [--requires NAME=INSTALLATION]… [--no-wait] (glac installations create) |
Installs it, waits until it is ready, says how it goes on stderr, and prints it with its outputs (its address, and what to reach it with: the install’s answer has the secret ones). --set gives a parameter, its value as JSON where it reads as JSON (2, true, null) and as text otherwise, a dotted name one of an object’s (--set size.vcpus=2); --parameters gives them as one JSON object (-: standard input), --set over it. One that failed ends the command with 1. |
glac installations ls [--app APP], glac installations get INSTALLATION |
The project’s installations (application, version, status, region); one, with its apps, Volumes and buckets and its outputs, a secret one (hidden) where the key may not manage the project. |
glac installations update INSTALLATION [--version V] [--set KEY=VALUE]… [--parameters JSON] [--no-wait] |
Another version, or its parameters as a merge patch (--set KEY=null takes one back to its default), waited for as an install is. |
glac installations rm INSTALLATION… |
Deletes installations with everything each is made of, and prints what each delete answered (deleted, or deleting while what is left goes). |
glac catalogue get rivet
glac install rivet --set disk_gib=20 --set size.vcpus=2The project: secrets, shared variables, events and the audit log
| Command | What it does |
|---|---|
glac project [--delete-after-idle-days 30|never] |
The key’s project: id, name, home region, private address ranges, and after how many days asleep its sandboxes are deleted, which the option sets first. |
glac webhooks create https://example.com/hook --events sandbox.created,app.deployed |
Sends the project’s events to an address of yours, signed, and prints the webhook and its secret (whsec_…, the one time it is shown); ls (how each last delivery went), get, update (--url, --events, --enabled), rm. Needs a key with the admin scope. |
glac keys create --name ci --scopes read,exec |
Makes an API key of the project’s and prints it, the one time it is shown (--expires-at for a key that runs out; every scope but admin unless you say); ls (its first characters, scopes and last use, never a key), get, rm. Needs a key with the admin scope. |
glac limits [--sandbox web] [--set 50|none] |
The project’s spend limit (or a sandbox’s own), what was spent this calendar month, and whether the limit holds it frozen; --set sets it first, in US dollars a month (the project’s with a key that has the admin scope). |
glac limits request vcpus 64 --why "a nightly batch of builds", glac limits requests [REQUEST] |
Asks for one of the account’s limits raised on request: a cap by its name (instances, vcpus, memory_bytes, sleeping, app_instances, creates_per_minute, creates_per_hour_per_project, app_creates_per_hour), or volumes and volume_bytes (a size: 2TiB), above the number it has now, with what it is for. The operator grants or refuses it, and the account is told by mail and by an event. requests lists them with their answers, or shows one (a key with admin asks). |
glac destinations create NAME --endpoint URL --headers FILE|- |
Where the logs of the project’s apps are exported (OTLP over HTTP; their metrics too with --signals logs,metrics, the spans of their requests with traces among them and --traces-endpoint URL where those go elsewhere: traces), tried at once with one record; ls, get, update, test (one record now; exit 1 when it is not taken), rm. A header’s value is read from a file, standard input (a Name: value line each), or a terminal without echo (--header NAME), never from the command line, and no command prints one. Making, changing, testing and deleting one takes a key with the admin scope. See export to OpenTelemetry. |
glac variables put NAME VALUE, ls, rm |
The project’s shared variables. |
glac secrets put NAME [file] --allowed-host HOST |
Stores a secret, read from a file, standard input (-), or asked for at a terminal without echo; never from the command line. No command shows a value. |
glac secrets hosts NAME [host…], ls, rm |
Where a secret may be sent; list; delete. |
glac events --type topup.failed |
The project’s events, newest first, each in a few words (a browser.failed: the session, its kind and its sandbox’s failure code; a database.history_gap: the database, when the WAL given up began, where in the log, how many segments and what the object store said; a database.history_resumed: after when its archive restores again; a database made, with its region and version, or deleted, with the snapshot of its Drive that is kept; a branch made of its parent, or deleted, and why; the root branch restored to a moment, and where the state before is kept; its WAL not archived, since when, what the object store said and how far a restore reaches meanwhile, and archived again; the others say what they are of: a sandbox, an app, a Drive, a backup and its volume, a destination, a deploy, a key and its instance, a charge, a withdrawal). |
glac audit --limit 50 |
A page of the project’s audit log, newest first: every call that was no reading, a refused one too, with when, who (a key by its name, a sandbox’s token, a user of the console, the platform, an operator), the method, the path, the status, where it came from; and every reading of an app’s log by an operator. Takes a key with the admin scope. |
Account, usage and billing
| Command | What it does |
|---|---|
glac usage --from 7d --group-by day,metadata.team |
Usage by the hour’s books: CPU seconds, memory GiB-seconds, traffic out, requests and what is stored, grouped as you ask (--group-by backup has a row, and a column, for each backup of a volume); --kind backup keeps what the backups of volumes kept, and --backup bak-… what one backup kept. glac usage --here inside a sandbox reads its own meter, without a key. |
glac account |
The account: traffic out this month, its limits (caps), what the key’s project keeps of volumes and Drives by the numbers a create is held to (keeps: how many of how many, how large one may be, how large all of them together, the size of one made with none), where notices go and the language they are written in, what it owes, its billing address and tax id. A line email_verified says the address is not verified yet, and email_undeliverable that mail to it bounced or was marked as unwanted: either way its notices wait. |
glac account email ops@example.com |
Where the account’s notices go. An address that is not verified yet is mailed a link, and the notices wait until it is opened; setting it again, the same one too, mails a new link, or lets mail go to it again after it bounced. none takes it away. See where notices go. |
glac account language de |
The language the account’s notices are written in: en, de or fr; auto follows the billing address again. The acknowledgement of a withdrawal and the confirmation of a purchase are written in it; every other notice is English. |
glac billing |
The plan, each meter’s included, used and left, the balance, the month so far, auto reload and what it may still take this month, the card, the trust level. |
glac billing topup 20 |
Buys $20 of Credits with the card on record; --start-now gives the buyer’s request to have them at once (below). |
glac billing plan paid |
Subscribes to Paid; free ends the subscription at the end of the month paid for. Takes --start-now. |
glac billing auto-reload on --below 5 --reload 20 |
Auto reload; glac billing spend-limit 50 caps what it may charge in a month. on takes --start-now. |
glac billing ledger, charges |
The balance’s ledger; the charges to the card. |
glac billing statement [2026-10] |
A calendar month’s statement (UTC), this month’s unless one is named: each meter’s line, what the plan included of it and what the lines come to, the parts and fees of the month, which Credits paid, what each project used, each database’s own line (what it used comes to at the list prices, its history and its tiered data apart) and what the account held at the month’s end. |
glac billing invoices, notices, withdrawals, withdraw CHARGE --name NAME [--email EMAIL] |
The invoices at Stripe with their PDFs, the mail the account was sent, what it may withdraw from and the withdrawals it made, and the buyer’s own statement of withdrawal, received at once. A consumer in the EEA or the UK may withdraw from a purchase within 14 days: the charge is refunded, a top-up’s Credits that are left are taken back (and auto reload turned off), a plan’s period and the subscription end there, and the acknowledgement goes to EMAIL, or to the account’s address. Withdrawing takes a key with the admin scope. |
Changing billing, secrets, domains and keys needs a key with the admin scope.
Buying at once (--start-now). A consumer in the European Economic Area or the United Kingdom (an account with no tax id that is verified or being verified) may withdraw from a purchase within 14 days, and what it buys is provided at once only at its own express request. --start-now on glac billing topup, glac billing plan (a plan that is bought: from Free, or a move up) and glac billing auto-reload on (for every auto reload while auto reload stays on) carries that request, in the words the console shows beside its box (and GET /v1/billing/withdrawals has, right.start_now):
I ask for this purchase to be provided at once, within the 14 days in which I may withdraw from it. If I withdraw, I pay for what was provided until then. I understand that once all the Credits of a top-up are used, it has been provided in full and I can no longer withdraw from it.
The service starts now; within the 14 days the buyer may still withdraw, and pays for what was provided until then; once it is fully provided (a top-up whose Credits are all used), the right to withdraw is lost. Give it only when the person buying asks for that: glac never sends it unless it is given. Without it, such an account’s purchase is the API’s 400 start_now_required, and nothing is bought. Then, where standard input and standard error are both a terminal, glac shows the words and what they mean and asks Do you ask for this? [y/N]; only y or yes sends the same call again with the request (a top-up under a new idempotency key). Anywhere else (a script, CI, a coding agent), and always with --json, nothing is asked: the API’s error, exit code 1, and one more line that says what --start-now gives. An agent never gives the request for a person: it is theirs to give. An account whose auto reload is on without the request reloads nothing, and is told once a month (the event auto_reload.no_request, which glac events says in words).
Exit codes
| Code | Meaning |
|---|---|
| 0 | Done |
| 1 | Failed: the API refused (a conflict, a wrong request, a purchase without the buyer’s request: start_now_required), a local file could not be read or written, or a deployed version did not come up |
| 2 | The command line is wrong |
| 3 | Not allowed: no key, a wrong key, or a key or user without the right |
| 4 | No such thing |
| 5 | The API cannot be reached, or is not available now |
| 6 | The account owes: until it pays it can only read its bill, pay, and list and delete what it stores |
| 125 | In run, exec, shell: a failure that is not the command’s (1, 3, 4, 5, 6 above, or output that was not all read) |
| Other | In run, exec, shell: the command’s own exit code |