4kr is the primary client for Forkr. It talks to forkr-api over HTTP and WebSocket, so every command here maps to a documented API route. Use the CLI for day-to-day work; reach for the API when you need to drive Forkr from your own tooling.
Install
4kr to ~/.local/bin. Once a deployment is configured, keep the CLI current with the version your API serves:
Select a target
The CLI needs a base URL and a bearer token to reach the API. Both resolve from the selected profile, so most commands take no connection flags:FORKR_PROFILE=<name> or the global --profile <name> flag to target a different deployment for a single command. See target selection and profiles for the full resolution order.
Global flags
These flags work on every command:| Flag | Description |
|---|---|
--profile <name> | Target a specific profile instead of the selected default. |
--url <url> | Override the API base URL. |
--token <token> | Override the bearer token. |
--ip <ip> | Override the connection IP, keeping the Host header for TLS/SNI. |
--secure / --insecure | Force-enable or disable TLS verification. |
-h, --help | Print help. Add --help (not -h) for the long form with examples. |
Box refs
Most commands target a box by its ref. The common forms:| Form | Meaning |
|---|---|
name | Box name in the resolved project. |
project:name | Explicit project. |
- | An ephemeral box (auto-created, auto-deleted). |
Command groups
Boxes
Create, list, update, stop, resume, delete, publish, and inject.
Exec and console
Run commands, attach terminals, tail logs, and wait on ports.
Files
Copy files into and out of a box filesystem.
Services and compose
Run long-lived services, publish them, and deploy previews.
Data, snapshots, and bases
Manage data volumes, root checkpoints, and base templates.
Auth and access
Sign in, manage auth policy, GitHub grants, and project users.
Setup and config
Deploy an environment, manage profiles, and check health.