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.
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.
# 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
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
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 samplehosts.json.Scope
docs/DESIGN.md.Changes
go.modforgithub.com/KofTwentyTwo/limenand apkgs.buildGoModuleflake package.internal/configforhosts.jsonparsing and validation.internal/stateadvisorystate.jsonloading plus atomic private writes.internal/formatrelative-time strings.main.gothat loads config and state and prints JSON to stdout.docs/DESIGN.mdinconsistencies: reservedlocalhosterror text and GPL-3.0 flake metadata.How to test
Screenshots / asciinema
Not applicable. This milestone intentionally has no TUI.
Checklist
go vet ./...passes.feat:,fix:,docs:...).Closes #1