Fork a briq or a whole stack
briq_forkBranch before you try something you might want to undo: a migration, a destructive test, a second approach next to the first. Pass briq to fork one briq, or stack to fork every briq of a stack into a new stack (names kept, so the forked app talks to the forked database). Each fork starts from a copy of its source's disk as it is now, keeps the same credentials, and gets its own address; the source keeps running and never sees what the fork does. Processes in a fork start fresh on the copied disk, like after a power cut (a database replays its log); memory is not copied. A briq without a volume gets its config and boot files; what it wrote to its own disk stays with the source. Returns outputs pointing at the fork. Keep the fork, or briq_destroy it to throw the attempt away.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| briq | No | briq id (bq_…) to fork | |
| into | No | Stack fork only: name of the new stack (default "<stack>-fork") | |
| name | No | Single fork only: name of the fork (default "<name>-fork") | |
| wait | No | Wait until the forks are ready (default true) | |
| sleep | No | When it goes to sleep: after this long without use, as a string: "30m", "3h", "7d", or "never" (always on, Pro plan and above). Never a number. Use means your calls on it (exec, files, logs, expose), on any briq of its stack, and visits to its stack's URLs. A sleeping briq keeps its disk, costs nothing, and the next call or visit wakes it. A command started with briq_exec async is use while it runs. Other work briq cannot see (a worker, a bot that only makes outgoing connections) needs a window longer than that work, or "never". Default: the source's. A window longer than your key allows is refused: send a shorter one. | |
| stack | No | With `briq`: the stack to create the fork in (default: the same). Without: the stack to fork whole. | |
| expose | No | Stack fork only: reach the fork from outside briq (a laptop, a sandbox). Database ports get TLS endpoints, front doors a URL in this mode; outputs use them. Leave it out when only briqs of the stack use the fork. |