Skip to content

Latest commit

 

History

History
147 lines (120 loc) · 3.16 KB

codex.md

File metadata and controls

147 lines (120 loc) · 3.16 KB

codex

Instant, easy, and predictable development environments

Getting Started

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

Scripts are custom commands that can be run using this project's environment. This project has the following scripts:

Environment

GOENV="off"
PATH="$PATH:$PWD/dist"

Shell Init Hook

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

Packages

Script Details

codex run build

Build codex for the current platform

go build -o dist/codex ./cmd/codex

codex run build-all

codex run build-darwin-amd64
codex run build-darwin-arm64
codex run build-linux-amd64
codex run build-linux-arm64

codex run build-darwin-amd64

GOOS=darwin GOARCH=amd64 go build -o dist/codex-darwin-amd64 ./cmd/codex

codex run build-darwin-arm64

GOOS=darwin GOARCH=arm64 go build -o dist/codex-darwin-arm64 ./cmd/codex

codex run build-linux-amd64

GOOS=linux GOARCH=amd64 go build -o dist/codex-linux-amd64 ./cmd/codex

codex run build-linux-arm64

GOOS=linux GOARCH=arm64 go build -o dist/codex-linux-arm64 ./cmd/codex

codex run code

Open VSCode

code .

codex run fmt

scripts/gofumpt.sh

codex run lint

golangci-lint run --timeout 5m && scripts/gofumpt.sh

codex run test

go test -race -cover ./...

codex run tidy

go mod tidy

codex run update-examples

codex run build && go run testscripts/testrunner/updater/main.go