Development

May 16, 2026 · View on GitHub

Build and test the Nylas CLI.

Quick Links: README | Commands | Architecture

This is the authoritative source for make targets. Other files reference this document.


Prerequisites

  • Go 1.26+ (check with go version)
  • Make

Make Targets

Essential Commands

TargetDescriptionWhen to Use
make ci-fullComplete CI pipeline (quality + tests + cleanup)Before PRs, releases
make ciQuality checks only (no integration tests)Quick pre-commit
make buildBuild binary to ./bin/nylasDevelopment
make cleanRemove build artifactsClean workspace

Testing Commands

TargetDescription
make test-unitRun unit tests
make test-raceRun tests with race detector
make test-integrationRun CLI integration tests
make test-air-integrationRun Air web UI integration tests
make test-coverageGenerate coverage report
make test-cleanupClean up test resources

Quality Commands

TargetDescription
make lintRun golangci-lint
make securityRun security scan (gosec)
make vulnRun vulnerability check (govulncheck)

Run make help for all available targets.

Docker

docker build -t nylas-cli:dev .
docker run --rm nylas-cli:dev --version

See Docker for credential and release-image guidance.


Integration Tests

export NYLAS_API_KEY="your-api-key"
export NYLAS_GRANT_ID="your-grant-id"

make test-integration

CRITICAL: Air tests create real resources. Always use make ci-full for automatic cleanup.


Project Structure

cmd/nylas/main.go           # Entry point
internal/
  ├── domain/               # Domain models
  ├── ports/                # Interfaces
  ├── adapters/             # Implementations
  ├── cli/                  # Commands (incl. setup/ for nylas init)
  └── ...

Detailed Guides

For contributors, comprehensive guides are available:


Quick reference: See CLAUDE.md for project overview and AI assistant guidelines.