Skip to content

Latest commit

 

History

History
108 lines (76 loc) · 2.61 KB

File metadata and controls

108 lines (76 loc) · 2.61 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

Nix

As an alternative to bin/setup, contributors with Nix can enter the development environment with:

nix develop

The development shell provides Go and the tools required by bin/ci.

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

  • Go 1.26.7+
  • bats-core for integration tests
  • golangci-lint for linting
  • jq for CLI surface checks
  • Ruby 3.3 for the skill-eval pattern check, which compiles those patterns under the same engine the eval runner uses

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.