cmd/warpshift/contains the application entrypoint, signal handling, version injection, and CLI dispatch.internal/cli/implements the command surface; keep command dependencies injectable through options so tests avoid live network behavior.internal/config/loads and validates TOML settings fromconfigs/warpshift.example.tomland local overrides.internal/tui/,internal/proxy/,internal/tunnel/, andinternal/warp/hold the Bubble Tea UI, SOCKS5/HTTP proxy, userspace WireGuard helpers, and WARP domain logic.configs/contains the annotated example config only; local configs, identity JSON, and generated WireGuard profiles are git-ignored secrets.build/,dist/, andcoverage.outare generated outputs and should not be committed.
go mod download: Download Go module dependencies after clone.cp configs/warpshift.example.toml configs/warpshift.local.toml: Create a local config; customize it without committing it.make build: Build./cmd/warpshiftintobuild/warpshiftorbuild/warpshift.exe../build/warpshift tui: Run the interactive TUI after building../build/warpshift config validate --config configs/warpshift.example.toml: Validate the checked-in example config.make test: Run all Go tests with race detection viago test -race -count=1 ./....go test -race -count=1 ./internal/warp -run TestName: Run one package/test; replace package path and test name as needed.make vet: Rungo vet ./....make lint: Rungolangci-lint run ./...; requires a localgolangci-lintinstall.make cover: Generatecoverage.outand open an HTML coverage report.make build-all: Cross-compile release binaries intodist/for Linux, macOS, and Windows.make docker: Build the local Docker image; usedocker compose buildanddocker compose upfor interactive Compose usage.- No separate typecheck or dev-server target is defined;
make buildandmake testprovide compile/type verification.
- Use Go 1.24+ and the module path
github.com/RecursiveDev/WarpShift-TUI. - Format Go code with
gofmt/goimports; keepgo vet ./...andgolangci-lint run ./...clean. - Keep packages focused on the existing
internal/*boundaries; do not bypassinternal/clifor user-facing command behavior. - Prefer dependency injection and functional options for network probes, TUI launchers, dialers, and tick sources, following
internal/cli/cli.goandinternal/warp/rotator.go. - Return errors instead of exiting in library/internal packages; only
cmd/warpshift/main.goshould callos.Exit. - Preserve local-first, secret-safe behavior: do not add telemetry or live account/network operations without the existing explicit safety consent gates.
- Tests live beside code as
*_test.goundercmd/andinternal/; benchmarks use*_benchmark_test.gonames in the same packages. - Use injected fakes for network, tunnel, timing, and TUI dependencies; existing tests avoid live probes by default.
- Before submitting code changes, run at least the focused
go test -race -count=1 <package> -run <TestName>that covers the edit, then the broader relevant check (make test,make vet,make build, ormake lint). - CI runs
go vet ./...,go test -race -coverprofile=coverage.out -covermode=atomic ./..., golangci-lint, cross-platform builds, Docker build verification, and CodeQL. - For config changes, include
./build/warpshift config validate --config configs/warpshift.example.tomlafter rebuilding.
- Preserve unrelated user changes; inspect
git status --shortbefore editing and avoid files outside the requested scope. - Keep this
AGENTS.mddynamic and minimal; update it with concise, evidence-based guidance when major repository changes make existing instructions obsolete. - Use strict Conventional Commits 1.0.0 with no emojis, matching scopes such as
tui,cli,config,proxy,tunnel,warp,build,ci, anddocs. - Split unrelated logical concerns into multiple atomic commits by default; use one commit only when the full diff is one logical unit or the user explicitly approves a mixed-concern commit.
- Do not edit generated outputs, vendored code, lock files such as
go.sum, migrations, or environment/local-secret files unless the task explicitly requires it. - Never commit
configs/warpshift.local.toml, WARP identity JSON, WireGuard profiles,.env*, logs, or coverage/build artifacts. - Keep advanced workflows consent-gated: account automation, WARP+ license actions, DPI evasion, and streaming rotation require paired feature and consent flags in config.
- Start with
README.md,CONTRIBUTING.md,Makefile,.github/workflows/ci.yml, andconfigs/warpshift.example.tomlfor repository-specific behavior. - The binary name is
warpshift; version strings are injected through the Makefile linker flag intomain.version. - Docker and Compose are intended for local interactive use, not production server deployment.
- Public-facing config and CLI behavior should stay documented in
README.mdand reflected inconfigs/warpshift.example.toml.