feat: add milestone 1 foundations #5

Merged
KofTwentyTwo merged 1 commits from feature/GH-1-foundations into develop 2026-05-26 20:02:35 +00:00
KofTwentyTwo commented 2026-05-26 19:53:29 +00:00 (Migrated from github.com)

Summary

Adds Milestone 1 foundations for limen: the Go module, Nix package, non-UI config/state/format packages, and a JSON-printing CLI that can be exercised with a sample hosts.json.

Scope

  • This PR matches a behavior described in docs/DESIGN.md.
  • If the PR changes intended behavior, the design doc is updated in this PR (or a preceding one).
  • If the PR adds a non-trivial dependency, the rationale is in the summary above.

Changes

  • Adds go.mod for github.com/KofTwentyTwo/limen and a pkgs.buildGoModule flake package.
  • Implements internal/config for hosts.json parsing and validation.
  • Implements internal/state advisory state.json loading plus atomic private writes.
  • Implements internal/format relative-time strings.
  • Adds a no-UI main.go that loads config and state and prints JSON to stdout.
  • Clarifies two docs/DESIGN.md inconsistencies: reserved localhost error text and GPL-3.0 flake metadata.

How to test

go test -race -count=1 ./...
go vet ./...
go build ./...
go test -cover -count=1 ./...
go run . --config testdata/hosts.json --state /private/tmp/limen-smoke-state.json
nix flake check
nix build .#packages.aarch64-darwin.default

Screenshots / asciinema

Not applicable. This milestone intentionally has no TUI.

Checklist

  • Tests added or updated, where appropriate.
  • go vet ./... passes.
  • No new TODOs that aren't tracked in an issue.
  • Commit messages follow Conventional Commits (feat:, fix:, docs: ...).

Closes #1

# Summary Adds Milestone 1 foundations for `limen`: the Go module, Nix package, non-UI config/state/format packages, and a JSON-printing CLI that can be exercised with a sample `hosts.json`. ## Scope - [x] This PR matches a behavior described in [`docs/DESIGN.md`](../docs/DESIGN.md). - [x] If the PR changes intended behavior, the design doc is updated in this PR (or a preceding one). - [x] If the PR adds a non-trivial dependency, the rationale is in the summary above. ## Changes - Adds `go.mod` for `github.com/KofTwentyTwo/limen` and a `pkgs.buildGoModule` flake package. - Implements `internal/config` for `hosts.json` parsing and validation. - Implements `internal/state` advisory `state.json` loading plus atomic private writes. - Implements `internal/format` relative-time strings. - Adds a no-UI `main.go` that loads config and state and prints JSON to stdout. - Clarifies two `docs/DESIGN.md` inconsistencies: reserved `localhost` error text and GPL-3.0 flake metadata. ## How to test ```sh go test -race -count=1 ./... go vet ./... go build ./... go test -cover -count=1 ./... go run . --config testdata/hosts.json --state /private/tmp/limen-smoke-state.json nix flake check nix build .#packages.aarch64-darwin.default ``` ## Screenshots / asciinema Not applicable. This milestone intentionally has no TUI. ## Checklist - [x] Tests added or updated, where appropriate. - [x] `go vet ./...` passes. - [x] No new TODOs that aren't tracked in an issue. - [x] Commit messages follow Conventional Commits (`feat:`, `fix:`, `docs:` ...). Closes #1
Sign in to join this conversation.