Skip to main content
All commands are available in the devenv shell. Run devenv shell to enter the development environment.

Code Quality Commands

fmt

Format all code (Go, TypeScript, and Nix) and stage changes.
fmt
What it does:
  • Runs goimports on all Go code
  • Runs golangci-lint fmt on services
  • Runs biome format --write on frontend TypeScript/React code
  • Runs treefmt on Nix files
  • Automatically stages formatted files with git add -u
When to use: Before committing code to ensure consistent formatting across the project.

lint

Lint all code without making changes.
lint
What it does:
  • Runs golangci-lint run on Go services
  • Runs biome check on frontend TypeScript/React code
  • Reports style violations and potential issues
When to use: To check code quality before pushing or as part of CI validation.

Protobuf & gRPC Commands

buf-check

Validate protobuf definitions for linting and breaking changes.
buf-check
What it does:
  • Runs buf lint on proto files
  • Checks for breaking changes against the main branch using buf breaking
  • Skips breaking check if proto baseline doesn’t exist on main yet
When to use: Before modifying proto files to ensure backward compatibility.

debug-grpc

Test local gRPC service connectivity.
debug-grpc
What it does:
  • Uses grpcurl to list available gRPC services on greeter (localhost:8080)
  • Uses grpcurl to list available gRPC services on gateway (localhost:8082)
When to use: To verify gRPC services are running and accessible locally.

Kubernetes Commands

gen-manifests

Regenerate Kubernetes manifests from nixidy modules.
gen-manifests
What it does:
  • Executes scripts/gen-manifests.sh
  • Evaluates Nix expressions in deploy/ and generates YAML manifests
  • Outputs manifests to deploy/manifests/
When to use: After modifying nixidy modules in the deploy/ directory.

load-microservice-images

Build and load all microservice container images into kind cluster.
load-microservice-images
What it does:
  • Executes scripts/load-microservice-images.sh
  • Builds container images for all microservices
  • Loads images into the local kind Kubernetes cluster
When to use: After code changes to update running services in the local cluster.

watch-manifests

Automatically regenerate and apply manifests on nixidy changes.
watch-manifests
What it does:
  • Watches all .nix files for changes using watchexec
  • Automatically runs gen-manifests when changes are detected
  • Applies updated manifests with kubectl apply -f deploy/manifests/
When to use: During active development of Kubernetes configurations for fast iteration.

fix-chart-hash

Automatically fix empty chartHash values in nixidy modules.
fix-chart-hash
What it does:
  • Executes scripts/fix-chart-hash.sh
  • Scans nixidy modules for missing or empty chartHash fields
  • Updates hash values to match current Helm chart versions
When to use: When adding new Helm charts or updating chart versions.

debug-k8s

Display Kubernetes pod status and recent events.
debug-k8s
What it does:
  • Runs kubectl get pods -A to show all pod statuses
  • Displays the 10 most recent events sorted by timestamp
When to use: To quickly diagnose pod failures or cluster issues.

Testing Commands

test-smoke

Run smoke tests for health and RPC endpoints.
test-smoke
What it does:
  • Executes scripts/smoke-test.sh
  • Tests health endpoints for all services
  • Validates basic RPC functionality
When to use: After deployment to verify services are operational.

Nix Commands

nix-check

Fast sanity check for Nix expressions.
nix-check
What it does:
  • Evaluates the nixidy environment package
  • Verifies Nix expressions are syntactically valid
  • Reports success or failure without building
When to use: To quickly validate Nix changes before running full builds.

Service Scaffolding

new-service

Scaffold a new microservice from templates.
new-service <type> <name> [port]
Arguments:
  • type: Service type (go or custom)
  • name: Service name (e.g., payment-service)
  • port: Optional port number (defaults to next available)
What it does:
  • Executes scripts/new-service.sh
  • Creates service directory structure
  • Generates boilerplate code based on service type
  • Updates configuration files
Examples:
# Create a new Go service on default port
new-service go payment-service

# Create a custom service on port 8090
new-service custom notification-service 8090
When to use: When adding a new microservice to the project.

Available Tools

The devenv shell includes these additional tools:
  • buf - Protobuf tooling (lint, breaking, generate)
  • grpcurl - gRPC CLI debugger
  • tilt - Local Kubernetes development environment
  • skopeo - Container image operations
  • kind - Kubernetes in Docker
  • kubectl - Kubernetes CLI
  • helm - Kubernetes package manager

Build docs developers (and LLMs) love