Quick start
Install Goalchemy first. This walkthrough uses Python 3.10+ and Node.js 22.6+ for the corresponding run commands.
Create a Go program
Section titled “Create a Go program”mkdir hello && cd hellogo mod init example.com/hellogo mod edit -go=1.25go get github.com/eugenioenko/goalchemy@latestCreate main.go:
package main
func main() { println("Hello from Goalchemy")}The source runs with ordinary Go:
go run .Check and run across languages
Section titled “Check and run across languages”goalchemy check .goalchemy run -target python .goalchemy run -target typescript .Each run prints Hello from Goalchemy. Go’s print and println builtins write to standard error. run compiles into a temporary directory, invokes the target runner, and removes the directory afterward. Add -keep to retain it for inspection.
Generate source you can inspect
Section titled “Generate source you can inspect”goalchemy compile -target python -out out/python .python3 out/python/main.pyThe output includes generated source, runtime files, a README.md, line mappings, and goalchemy.manifest.json. Private generated names are readable by default. The commands and output guide explains each target’s layout.
Build several targets together
Section titled “Build several targets together”Create goalchemy.yaml beside main.go:
schema_version: 1packages: [.]gate: sequentialtargets: go: {out: out/go} typescript: {out: out/typescript} python: {out: out/python}goalchemy buildbuild emits all configured targets; it does not execute them. Run TypeScript with node out/typescript/main.ts, Python with python3 out/python/main.py, or Go from its output directory with go run ..
Continue with project configuration, portable source, or building an SDK.