Pactpact

CLI Overview

Complete reference for all Pact CLI commands

CLI Overview

The Pact CLI is a Go-based command-line tool for managing your development environment configurations.

Command Summary

CommandDescription
pactInteractive status with quick actions
pact initAuthenticate with GitHub and setup pact repo
pact edit [path]Edit pact files locally or in web editor
pact sync [module]Pull and apply configurations
pact pushCommit and push changes to GitHub
pact statusShow status (non-interactive)
pact secretManage secrets in OS keychain
pact resetRemove all symlinks (keeps .pact/)
pact nukeFull cleanup (symlinks + .pact/ + token)

Interactive Mode

Running pact without arguments launches an interactive TUI:

$ pact

╭─ Pact Status ─────────────────────────────────────────╮

 Connected    Version: 1.0.0

  Modules:
 shell        synced
 editor       synced
 git          not configured

  Press 's' to sync, 'e' to edit, 'q' to quit

╰────────────────────────────────────────────────────────╯

Key Bindings:

KeyAction
sRun pact sync
eRun pact edit
q or Ctrl+CQuit

Getting Help

Every command supports the --help flag:

pact --help
pact init --help
pact sync --help

Environment Variables

VariablePurposeDefault
GITHUB_CLIENT_IDOAuth app client IDBuilt-in default
PACT_WEB_URLWeb editor URLhttps://pact-ckn.pages.dev
EDITORPreferred text editorvaries
VISUALFallback text editorvaries

Technical Details

The CLI is built with:

TechnologyPurpose
GoCore language
CobraCommand-line parsing
BubbleteaTUI framework
Lip GlossTUI styling
go-gitGit operations
go-keyringOS keychain access

The CLI stores your GitHub token securely in your OS keychain, not in any configuration file.

On this page