ToolsCli

CLI

The drok command. A Rust binary faster than gh for every equivalent operation.

The drok CLI is a compiled Rust binary. It is not a script. It is not interpreted. It does not require a runtime. It starts in milliseconds and executes operations with the performance characteristics of native code — because it is native code.

Installation

See Installation for platform-specific instructions.

Verify the installation:

drok --version

Authentication

drok auth login

This opens your browser for OAuth authentication. The CLI receives a token and stores it in your system keychain (macOS Keychain, Windows Credential Manager, or Linux secret service).

Token-Based Authentication

For CI/CD environments and scripts:

export Drok_TOKEN=your-token

Or pass the token directly:

drok --token your-token repo list

Status

drok auth status

Core Commands

Repositories

# Create a repository
drok repo create my-repo --private
 
# Clone a repository
drok repo clone my-org/my-repo
 
# List repositories
drok repo list
drok repo list --org my-org
 
# View repository details
drok repo view my-org/my-repo
 
# Edit repository settings
drok repo edit my-repo --description "New description"
 
# Delete a repository
drok repo delete my-repo --confirm
 
# Fork a repository
drok repo fork other-org/their-repo
 
# Archive/unarchive
drok repo archive my-repo
drok repo unarchive my-repo

Merge Requests

# Create a merge request
drok mr create --title "Add feature" --target main
 
# List merge requests
drok mr list
drok mr list --state open --author @me
 
# View a merge request
drok mr view 42
 
# Review a merge request
drok mr review 42 --approve
drok mr review 42 --request-changes --comment "Needs tests"
 
# Merge a merge request
drok mr merge 42
drok mr merge 42 --squash
drok mr merge 42 --rebase
 
# Check out a merge request locally
drok mr checkout 42

Issues

# Create an issue
drok issue create --title "Bug report" --label bug
 
# List issues
drok issue list
drok issue list --label bug --assignee @me
 
# View an issue
drok issue view 15
 
# Close an issue
drok issue close 15
 
# Assign an issue
drok issue edit 15 --assignee @alice

Pipelines

# View pipeline status
drok pipeline status
 
# List recent pipeline runs
drok pipeline list
 
# View a specific run
drok pipeline view 123
 
# Trigger a pipeline manually
drok pipeline run --branch main
 
# View pipeline logs
drok pipeline logs 123
drok pipeline logs 123 --step "Unit tests"
 
# Cancel a running pipeline
drok pipeline cancel 123
# Search code
drok search "fn refresh_token" --lang rust
 
# Search with regex
drok search --regex "fn\s+\w+_token"
 
# Search issues
drok search --type issue "authentication bug"

Organization

# List organizations
drok org list
 
# View organization details
drok org view my-org
 
# List teams
drok team list my-org
 
# Manage members
drok org add-member my-org @alice --role member
drok org remove-member my-org @alice

Configuration

Configuration is stored at ~/.config/drok/config.toml:

[core]
editor = "vim"
default_branch = "main"
protocol = "ssh"
pager = "less -FRX"
 
[aliases]
co = "mr checkout"
ls = "repo list"
ci = "pipeline status"
 
[output]
format = "table"  # table, json, yaml, plain
color = "auto"    # auto, always, never

Setting Configuration

drok config set editor vim
drok config set protocol ssh
drok config set output.format json

Aliases

Create command shortcuts:

drok alias set co "mr checkout"
drok alias set ls "repo list"
drok alias set ci "pipeline status"

Use aliases like regular commands:

drok co 42        # equivalent to: drok mr checkout 42
drok ls           # equivalent to: drok repo list

Output Formats

All commands support multiple output formats:

# Table (default for humans)
drok repo list
 
# JSON (for scripts and piping)
drok repo list --format json
 
# YAML
drok repo list --format yaml
 
# Plain (for grep-friendly output)
drok repo list --format plain

Completion

Generate shell completions:

# Bash
drok completion bash > /etc/bash_completion.d/drok
 
# Zsh
drok completion zsh > ~/.zfunc/_drok
 
# Fish
drok completion fish > ~/.config/fish/completions/drok.fish
 
# PowerShell
drok completion powershell > $PROFILE.d/drok.ps1

Performance

The drok CLI is compiled to a native binary with no runtime dependencies. Representative benchmarks against gh (GitHub CLI):

OperationdrokghSpeedup
repo list45ms380ms8.4x
mr list38ms290ms7.6x
issue create52ms410ms7.9x
search28ms240ms8.6x
CLI startup3ms85ms28x

These are not synthetic benchmarks. They are measured wall-clock times for equivalent operations against production servers over the same network connection.