◆ docs

The rickub CLI

rickub is a command-line client for rickub — create repositories, open merge requests, watch CI, and script anything the API can do.

Install

Build the CLI from source (it's a single Go binary):

cd cli
go build -o rickub .
# then move it onto your PATH, e.g.
sudo mv rickub /usr/local/bin/

Log in

Authenticate once with a personal access token. The host and token are stored in ~/.config/rickub/config.yaml.

rickub auth login --host https://rickub.com
# or non-interactively:
echo $RICKUB_TOKEN | rickub auth login --with-token --host https://rickub.com

rickub auth status   # verify the stored token

Common commands

Commands are grouped by area, much like gh:

# Repositories
rickub repo create my-project --private
rickub repo view your-handle/my-project
rickub repo clone your-handle/my-project

# Merge requests
rickub pr create --title "Fix login" --base main
rickub pr list
rickub pr view 12
rickub pr merge 12

# CI runs
rickub run list
rickub run view 34
rickub run logs 34
rickub run rerun 34
rickub run cancel 34

# Organizations
rickub org view your-org
rickub org members your-org
rickub org teams your-org

# Search
rickub search repos "portal gun"

# Low-level API escape hatch
rickub api GET /api/v1/user
Tip

Run rickub <command> --help at any level to see subcommands and flags.

Note

The CLI calls them pr for short; they're the same merge requests you see in the web UI and the API.