This file is a working guide for agents modifying the `go_port` implementation of `climax`.
This file is a working guide for agents modifying `climax`.
## Mission
Maintain the Go port as a CLI-compatible implementation of the Python `climax` app, while preserving behavior and output expectations validated in this workspace.
Maintain `climax` as a stable CLI app, while preserving behavior and output expectations validated in this workspace.
## Scope Constraints
- Port target is `src/climax` behavior.
- Do not reintroduce removed features:
-`gui` command
-`crash` command
-`--show-completion` flag
-`--install-completion` flag
- Do not port Python-only files previously excluded from porting:
-`gui.py`
-`eggs.py`
## CLI Compatibility Rules
- Keep command names and options compatible with existing Go implementation and prior Python behavior.
- Keep command names and options compatible with existing behavior.
- Keep `templates-list` and `static-list` output as plain line-by-line paths (no table reformat).
-`bundles-list`, `bundles-add`, and `bundles-remove` must keep the same output style.
-`info` and `projects` are expected to render styled tables (unless JSON mode is explicitly selected).
@@ -57,9 +53,27 @@ Maintain the Go port as a CLI-compatible implementation of the Python `climax` a
2.`CLIMAX_LANG`
3.`LANG`
4. fallback to `fr`
- Any new user-facing string in `main.go` should go through `T("...")` with keys in `i18n.go`.
- Any new user-facing string in Go source should go through `T("...")` with keys in `i18n.go`.
- Keep command outputs stable while localizing.
## Go Source Layout
- The Go CLI is split by concern rather than kept in one large `main.go`:
-`main.go`: shared constants, shared data shapes, and startup.
-`cli.go`: Cobra command construction.
-`commands.go`: command implementations for ordinary CLI actions.
-`config.go`: MaX config parsing, release lookup, and version helpers.
-`projects.go`: project registry and project validation/loading helpers.
-`sync.go`: MaX instance creation/sync and bundle sync.
-`java.go`: Java runtime discovery and BaseX command construction.