A justfile used by osapi-io projects.
Shared recipes are consumed with import?. Each module is a single recipe file
whose recipes and variables are prefixed with the module name, fetched from this
repo into .just/remote/.
import? '.just/remote/go.just'
import? '.just/remote/md.just'
# Fetch shared justfiles from osapi-justfiles
fetch:
mkdir -p .just/remote
curl -sSfL https://raw.githubusercontent.com/osapi-io/osapi-justfiles/refs/heads/main/go/go.just -o .just/remote/go.just
curl -sSfL https://raw.githubusercontent.com/osapi-io/osapi-justfiles/refs/heads/main/md/md.just -o .just/remote/md.justThen run just fetch to download the shared recipes, and they become available
by their prefixed names:
$ just fetch # Download shared justfiles
$ just go-deps # Install all Go tool dependencies
$ just go-test # Run all Go checks
$ just go-fmt # Auto-format code
$ just md-fmt-check # Check markdown formattingA module ships defaults for anything that varies by repository. To use a
different value, set allow-duplicate-variables and assign it again:
set allow-duplicate-variables
import? '.just/remote/go.just'
go_coverage_target := "99.9"Add .just/ to .gitignore:
.just/
Each recipe installs its own tool dependencies on first use via private
_*-deps recipes. There is no need to run deps before using a recipe — tools
are pulled automatically. go-deps is a convenience that installs all tools
upfront.
Projects define a top-level deps recipe that calls each module's deps:
# Install all dependencies
deps:
just go-deps
go get -tool github.com/golang/mock/mockgengo-docs and go-docs-check use
gomarkdoc to generate one markdown file
per package into JUST_DOCS_DIR, skipping mocks and main packages.
go-docs-check is not included in go-test by default — add it to your
project's test recipe where needed:
test:
just go-test
just go-docs-checkModules are moving into their own directories, each documenting itself:
| Module | Description | Docs |
|---|---|---|
docusaurus |
Docusaurus site build, serve, deploy, formatting | docusaurus/README.md |
go |
Go build, test, coverage gate, format, lint | go/README.md |
md |
Repository markdown formatting (mdformat via uvx) | md/README.md |
just |
Justfile formatting | just/README.md |
react |
React app build, lint, format, SDK codegen (Bun) | react/README.md |
See the Contributing guide for prerequisites, setup, conventions, and the PR workflow.
The MIT License.