Skip to main content
caractrl is the command-line interface for Caravanserai. Use it to inspect nodes, manage projects, apply manifests, and forward ports from a running container to your local machine.

Global flags

Global flags control how caractrl connects to cara-server and formats its output. They must appear before the subcommand:
string
default:"http://localhost:8080"
URL of the cara-server control plane. Override this when cara-server is not running on localhost.
string
default:"table"
Output format for command results. Accepted values: table, json, yaml.
Use --output json when you want to pipe caractrl output into tools like jq for scripting or automation:

Output format examples

Subcommands

version

Print the build version, commit hash, and build timestamp.

get nodes

List all nodes or inspect a single node.
Examples

get projects

List all projects or inspect a single project. Filter the list by lifecycle phase with --phase.
Flags Examples

apply

Create or update a resource from a YAML or JSON manifest. The kind field in the manifest determines which resource type is applied. Supported kinds: Node, Project.
Flags Examples

delete node

Remove a node from the control plane by name.
Example

delete project

Delete a project by name. The agent on the assigned node tears down all containers belonging to the project. If deletion is already in progress, the command reports that the project is being deleted.
Example

port-forward

Forward a local TCP port to a container port on a remote node via the agent’s WebSocket tunnel. This works similarly to kubectl port-forward.
Arguments Flags Examples
Press Ctrl+C to stop forwarding and close the tunnel.
Automatic agent resolution requires the project to be in Running or Scheduled phase so that a nodeRef is set. If the project has not been scheduled yet, use --node to specify the agent address directly.