with one click
build
// Build and run onepixel binaries, generate Swagger docs when needed, and produce cross-platform release artifacts.
// Build and run onepixel binaries, generate Swagger docs when needed, and produce cross-platform release artifacts.
Reference for all onepixel API endpoints, their HTTP methods, paths, auth requirements, and behavior.
Understand onepixel database topology by environment, data ownership across app/events stores, and initialization/migration behavior.
Understand onepixel runtime architecture, host-based app dispatch, and redirect analytics flow before changing behavior across routes/controllers/db.
Apply onepixel repository conventions for env loading, DB backend selection, auth locals, error payloads, and shortcode semantics.
Run onepixel unit and e2e tests with correct env setup, coverage artifacts, and troubleshooting guidance for GeoIP/network-related failures.
| name | build |
| description | Build and run onepixel binaries, generate Swagger docs when needed, and produce cross-platform release artifacts. |
Use this skill when you need to compile, run, or package the onepixel backend.
make build DOCS=falsemake build DOCS=false ARGS="-v"make build_all DOCS=false ARGS="-v"make run DOCS=falsemake docsDefined in Makefile at repo root:
docs
swag init --pd -g server/server.go -d src --md src/docs -o src/docssrc/docs/build
bin/onepixelsrc/main.godocs (unless DOCS=false)build_all
bin/onepixel-linux-amd64bin/onepixel-darwin-amd64bin/onepixel-darwin-arm64bin/onepixel-windows-amd64.exerun
build, then executes ./bin/onepixelclean
go clean and remove bin/*The Makefile normalizes platform values:
darwin, Linux → linux, otherwise windowsx86_64 → amd64, i386 → 386You can still override by exporting GOOS/GOARCH before running make.
go.mod and CI workflow)swag CLI only if docs generation is needed:
go install github.com/swaggo/swag/cmd/swag@latestgo install github.com/air-verse/air@latestmake build DOCS=false.bin/onepixel.make docs if endpoint annotations or Swagger comments changed.src/docs/.make executes the first target (docs) and fails if swag is missing.run also triggers docs unless DOCS=false is passed.GOOS/GOARCH are set in the shell, builds may target an unexpected platform.ADMIN_SITE_HOST, MAIN_SITE_HOST).make build DOCS=false for normal agent loops.make DOCS=false is not the intended default in this repo because plain make resolves to the first Makefile target; use the explicit build target.