Contributing
Set up the repository
The repository contribution guide requires a Linear account and API key. Its setup commands are:
git clone https://github.com/enolalab/linear-cli.git
cd linear-cli
go mod tidy
make build
export LINEAR_API_KEY=lin_api_your_key_here
./linear-cli --help
The module currently declares Go 1.26.2; use that declaration when choosing the local toolchain even though the older contribution guide says Go 1.23+.
Make focused changes
Command definitions live in cmd/; the GraphQL HTTP client is in internal/api/client.go; configuration, typed errors, and JSON formatting are separate internal packages. New commands should define Cobra Long and Example text, obtain the client through getAPIClient(), use output.PrintSuccess() for success, return typed CLIError values for failures, register through cmd/root.go, and update the public command reference.
Preserve the project design rules: JSON by default, no interactive prompts, meaningful exit codes, detailed help, and predictable behavior. Keep credentials out of source, tests, documentation, and logs.
Checks and review
Run the required checks before opening a pull request:
make test
make build
The linter configuration enables errcheck, govet, staticcheck, and unused on top of the standard golangci-lint set. Use Conventional Commit prefixes such as feat:, fix:, docs:, refactor:, test:, ci:, and chore:. Open a focused feature branch and include behavior, tests, and relevant output in the pull request.