Skip to content

Dev Setup

github-actions[bot] edited this page Apr 26, 2026 · 2 revisions

Dev Setup

Set up a local development environment for the ɳSelf CLI.

Prerequisites

Tool Minimum Version Install
Go 1.21 go.dev/dl
Docker 24.0 docs.docker.com
Make 3.81 brew install make (macOS) or system package
golangci-lint 1.57 brew install golangci-lint

Clone and Build

git clone https://github.com/nself-org/cli.git
cd cli

# Build the binary
make build

# Verify
./nself version

Common Make Targets

Target Description
make build Build binary for current platform
make test Run all tests
make lint Run golangci-lint
make fmt Run gofmt on all files
make cross Cross-compile for Linux/macOS/Windows (arm64 + amd64)
make dist Full release build + archives
make clean Remove build artifacts

Development Loop

# Edit source files
# Then rebuild and test
make build && ./nself {command}

# Run tests for a specific package
go test ./internal/sanitize/...

# Run all tests with verbose output
make test VERBOSE=1

Running Tests

make test          # all tests
go test ./...      # equivalent

# With race detector
go test -race ./...

Tests must pass before submitting a PR. New features require test coverage.

Linting

golangci-lint run          # must return zero issues
golangci-lint run ./...    # equivalent

The .golangci.yml config at the repo root defines enabled linters.

Cross-Compilation

make cross
# Outputs: dist/nself-linux-amd64, dist/nself-linux-arm64,
#          dist/nself-darwin-amd64, dist/nself-darwin-arm64,
#          dist/nself-windows-amd64.exe

See Also


Home | _Sidebar

Home


Getting Started


Commands


Features


Configuration


Plugins (87 + 10 monitoring)

Free (25)
Pro (62)
Planned (26)
  • plugin-audit
  • plugin-blog
  • plugin-checkout
  • plugin-commerce
  • plugin-drm
  • plugin-export
  • plugin-flow
  • plugin-import
  • plugin-ldap
  • plugin-mailgun
  • plugin-media
  • plugin-oauth-providers
  • plugin-pages
  • plugin-postmark
  • plugin-rate-limit
  • plugin-reports
  • plugin-saml
  • plugin-scheduler
  • plugin-sendgrid
  • plugin-sso
  • plugin-subscription
  • plugin-thumb
  • plugin-transcoder
  • plugin-twilio
  • plugin-waf
  • plugin-watermark

Guides


Architecture


Reference


Licensing


Security


Brand


Operations


Contributing


Admin


Changelog

Clone this wiki locally