Skip to content

Latest commit

 

History

History
96 lines (68 loc) · 2.29 KB

File metadata and controls

96 lines (68 loc) · 2.29 KB

Contributing to Basecamp CLI

Development Setup

git clone https://github.com/basecamp/basecamp-cli
cd basecamp-cli
bin/setup             # Install toolchain and dev tools
make build            # Build
bin/ci                # Verify everything passes

SDK Development

When developing against a local copy of basecamp-sdk, use Go workspaces instead of replace directives in go.mod:

# Set up workspace (one-time)
go work init .
go work use ../basecamp-sdk/go

# Now basecamp will use your local SDK automatically
go build ./...

The go.work file is gitignored - your local setup won't affect the repo.

Requirements

Pull Request Process

  1. Run CI locally before pushing:

    bin/ci

    This runs formatting, vetting, linting, unit tests, e2e tests, naming checks, CLI surface checks, provenance checks, and tidy checks. Fix anything that fails before pushing.

  2. Add tests for new functionality

  3. Update documentation if adding commands or changing behavior

  4. Keep commits focused - one logical change per commit

Code Style

Project Structure

basecamp-cli/
├── cmd/basecamp/     # Main entrypoint
├── internal/
│   ├── auth/         # OAuth authentication
│   ├── commands/     # CLI command implementations
│   ├── config/       # Configuration management
│   ├── output/       # Output formatting
│   └── sdk/          # Basecamp SDK wrapper
└── e2e/              # BATS end-to-end tests

Testing

Unit Tests (Go)

make test

End-to-End Tests (BATS)

Requires bats-core:

brew install bats-core  # macOS
make test-e2e

Running Against Go Binary

BASECAMP_BIN=./bin/basecamp bats e2e/

Questions?

Open an issue for questions about contributing.