Skip to main content
While the Web UI is excellent for monitoring and visual exploration, the CLI (pullbasectl) is the preferred tool for:
  • Automation: Scripting repetitive tasks or CI/CD pipelines.
  • Initial Setup: Bootstrapping the first admin and setting up environments.
  • Power Users: Rapidly executing commands without navigating menus.
This guide focuses on practical, workflow-oriented usage. For a complete list of flags, see the CLI Reference.

Running the CLI

You can run pullbasectl in three ways depending on your environment. The easiest way to run the CLI is using the binary already inside your running central-server container.
Alias Tip: Add this to your shell profile to run pb instead of the long command: alias pb='docker compose exec central-server pullbasectl'

2. via Go

If you have Go installed and the repository cloned, you can run directly from source:

3. Native Binary

For frequent usage on your host machine, build the binary:

Authentication

1. Bootstrap First Admin

When you first install Pullbase, no users exist. You must “bootstrap” the first admin using a secret file generated by the server.
1

Get the bootstrap secret

The server writes this secret to /app/secrets/bootstrap.secret.
2

Run the bootstrap command

Use the secret to create your admin account.

2. Login & Token Reuse

Instead of passing credentials with every command, login once and export the token.
Now you can run commands without auth flags:

Common Workflows

Create an Environment

Environments group servers and link them to a Git repository configuration.

Register Server & Install Agent

The standard flow to add a new server:
1

Register the server

2

Create an agent token

Save the token output starting with pbt_.
3

Generate install script (Optional)

You can generate a one-liner to run on the target server:

Create/List/Delete Users

Manage access for your team.
User deletion is blocked if you attempt to delete the last active admin or your own account.

Validate Config Locally

Validate your config.yaml before pushing to Git to prevent errors.

Troubleshooting

Host vs. Container URLs

  • From Host: Access the API via http://localhost:8080.
  • From Container: If running pullbasectl inside another container in the same network, use the service name: http://central-server:8080.

TLS Errors

If you are using self-signed certificates (default in development):
  • Production: Always trust the CA.
  • Development Only: Skip verification (insecure).

401 Unauthorized

If you receive a 401 error, your token has likely expired (default 24h).
  1. Run auth login again to get a new token.
  2. Update your PULLBASE_ADMIN_TOKEN variable.