The Go engine is the first implementation of the CSVX specification. It is intentionally specification-first: the engine must conform to CSVX behavior, but its internal architecture does not define the format.
The initial package provides the Phase 1 foundation:
- CSVX ZIP package loading
- Manifest and workbook loading
- UTF-8 CSV sheet loading
- Optional
.meta.jsonsheet metadata - Typed metadata structures for columns, formulas, caches, styles, and validation
- Sparse cell metadata addressed by A1 coordinates
- Duplicate and unsafe ZIP entry rejection
- Package and extract CLI commands for developer workflows
Formula parsing, calculation, import/export, and full CLI operations will be added behind the same canonical workbook model. Package writing and extract/package round-trip support are now available for developer workflows.
Each capability follows this sequence:
Specify → create conformance fixtures → implement → run tests
The specification repository is the authority:
../csvx-spec/
workbook, err := csvx.Open("report.csvx")
if err != nil {
return err
}
fmt.Println(workbook.Sheets[0].Records)CSV is the canonical sheet data layer. Metadata that CSV cannot represent is stored in the matching
.meta.json sidecar.
Run commands from the repository root:
gofmt -w .Formats all Go source files before committing.
go build ./...Builds every package in the module.
To build the CLI once it is added:
go build -o bin/csvx ./cmd/csvxgo test ./...Runs all unit and package tests.
Run tests with the race detector:
go test -race ./...Run a specific test:
go test -run TestLoadCSVBackedWorkbook ./...go test -cover ./...
go test -coverprofile=coverage.out ./...
go tool cover -html=coverage.outgo vet ./...Build the current CLI:
go build -o bin/csvx ./cmd/csvxThe currently supported commands are:
csvx --help
csvx version
csvx inspect report.csvx
csvx inspect ../csvx-spec/examples/minimal.csvx
csvx validate report.csvx
csvx validate ../csvx-spec/examples/minimal.csvx
csvx validate --json ../csvx-spec/examples/minimal.csvx
csvx package ../csvx-spec/examples/minimal.csvx --output minimal.csvx
csvx extract minimal.csvx --output minimal-extracted
csvx xlsx-inspect ../csvx-spec/examples/example.xlsx
csvx xlsx-inspect --json ../csvx-spec/examples/example.xlsxBoth .csvx ZIP files and unpacked CSVX package directories are accepted. The following commands
are planned but not implemented yet:
csvx recalc report.csvx
csvx convert report.xlsx report.csvx
csvx convert report.csvx report.xlsx
csvx convert report.csvx report.csvgo mod tidy
go list -m all
go versiongo mod tidy should be run when imports change. Review its changes before committing.
- Update the relevant specification in
../csvx-spec/. - Add or update a conformance fixture.
- Implement the behavior in the engine.
- Run
gofmt,go vet, andgo test ./.... - Document any intentionally unsupported behavior.
- Confirm that CSV data and metadata sidecars remain round-trip safe.
Do not treat engine behavior as a specification change without updating the specification repository.