CLI Workflows
Common pair-cli workflows for managing documentation and configuration assets.
This guide covers common pair-cli workflows for managing documentation and configuration assets.
For complete command documentation with all options, see:
- CLI Commands Reference — Full command syntax and options
- CLI Help Examples — 20+ copy-paste ready examples
Common Workflows
1. Project Onboarding
When joining a new pair-enabled project:
2. Updating Assets
Keep your project's pair assets up to date:
3. Custom Installation Paths
Install assets to non-standard locations:
4. Inspecting Assets
Before installation, inspect what will be installed:
5. Link Validation and Updates
After installation or project changes, validate and update KB links:
Common Scenarios:
- After project restructure:
pair-cli update-linkto fix broken links - Link health check:
pair-cli update-link --dry-run --log-level debugto inspect
See the Link Update Guide for comprehensive documentation.
6. Package Distribution and Verification
Create and verify KB packages for distribution:
Complete Distribution Workflow:
Verification Before Installation:
Interactive Package Creation:
Interactive mode resolves smart defaults from package.json, git config, and saved preferences (~/.pair/preferences.json). Each field can be accepted or overridden. A preview is shown before confirmation.
Organizational KB Packaging:
Inspect Package Metadata:
Common Scenarios:
- Pre-distribution check: Always run
pair kb-verifybefore publishing packages - Post-download validation: Verify downloaded packages with
kb-verifybefore installation - CI/CD integration: Use
--jsonflag for automated verification in pipelines - Security audit: Checksum verification detects tampering or corruption
- Interactive packaging: Use
--interactivefor guided metadata entry with smart defaults - Org packaging: Use
--orgwith--org-namefor organizational metadata in manifest - Package inspection: Use
pair kb-info <path>to view package metadata without extracting
Quick Command Reference
For complete documentation, see the CLI Commands Reference.
Most Common Commands
For 20+ complete examples, see the CLI Help Examples.
Monorepo Usage
When pair-cli is a dependency of a package inside a monorepo, use pnpm --filter from the monorepo root:
The CLI reads INIT_CWD (set by pnpm to the invoking directory) so registry output targets the monorepo root, not the filtered package directory.
Working with Temporary Directories
For testing or exploration, use temporary directories:
Integration with Development Workflow
CI/CD Integration
Add to your CI pipeline:
Local Development Setup
In your project's setup script:
Complete Maintenance Workflow
Typical workflow for keeping KB content updated:
Troubleshooting
If commands fail, check:
- Node.js version:
node --version(should be 18+) - pnpm availability:
pnpm --version - Permissions: Try with
sudoif installing globally - Network: For offline installs, use manual download
See the Troubleshooting Guide for detailed solutions.