Instant, easy, and predictable development environments
This project uses codex to manage its development environment.
Install codex:
curl -fsSL https://raw.githubusercontent.com/khulnasoft/CodeX/master/codex | bash
Start the codex shell:
codex shell
Run a script in the codex environment:
codex run <script>
Scripts are custom commands that can be run using this project's environment. This project has the following scripts:
GOENV="off"
PATH="$PATH:$PWD/dist"
The Shell Init Hook is a script that runs whenever the codex environment is instantiated. It runs
on codex shell
and on codex run
.
test -z $FISH_VERSION && unset CGO_ENABLED GO111MODULE GOARCH GOFLAGS GOMOD GOOS GOROOT GOTOOLCHAIN GOWORK
Build codex for the current platform
go build -o dist/codex ./cmd/codex
codex run build-darwin-amd64
codex run build-darwin-arm64
codex run build-linux-amd64
codex run build-linux-arm64
GOOS=darwin GOARCH=amd64 go build -o dist/codex-darwin-amd64 ./cmd/codex
GOOS=darwin GOARCH=arm64 go build -o dist/codex-darwin-arm64 ./cmd/codex
GOOS=linux GOARCH=amd64 go build -o dist/codex-linux-amd64 ./cmd/codex
GOOS=linux GOARCH=arm64 go build -o dist/codex-linux-arm64 ./cmd/codex
Open VSCode
code .
scripts/gofumpt.sh
golangci-lint run --timeout 5m && scripts/gofumpt.sh
go test -race -cover ./...
go mod tidy
codex run build && go run testscripts/testrunner/updater/main.go