You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Remove direct golang.org/x/term usage, update CLAUDE.md
Tidy go.mod (x/term kept as indirect dep of bubbletea).
Update CLAUDE.md to reflect multi-file Charm architecture.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: CLAUDE.md
+28-13Lines changed: 28 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,27 +14,42 @@ Releases are handled by GoReleaser via GitHub Actions on version tags (`v*`). Th
14
14
15
15
## Architecture
16
16
17
-
This is a single-file Go CLI (`main.go`, no external dependencies) that fetches changelogs for AI coding assistants from the GitHub Releases API.
17
+
Go CLI split across multiple files, using the Charm ecosystem (lipgloss, bubbletea, glamour) for terminal UI. Fetches changelogs for AI coding assistants from the GitHub Releases API.
18
18
19
-
### Core Data Model
19
+
### File Structure
20
20
21
-
-**`Source`** — defines a tracked tool (display name, GitHub owner/repo, binary names for local detection, version args). All sources are registered in the `sources` map.
22
-
-**`ChangelogEntry`** — a parsed release with version, date, sectioned changes, and ungrouped changes.
23
-
-**`Section`** — a named group of changes within a release (parsed from markdown headers in release bodies).
21
+
| File | Purpose |
22
+
|------|---------|
23
+
|`main.go`| Entry point, arg parsing, `printUsage()`|
-**`fetchGitHubReleases(owner, repo)`** — single GitHub API integration point; all sources use this.
28
-
-**`parseReleaseBody(body)`** — converts markdown release notes into structured `Section`/changes. Skips "What's Changed" headers and `@`-prefixed lines (contributor mentions).
29
-
-**`Source.DetectInstalled(ctx)`** — checks if a tool is locally installed via `exec.LookPath` + version command with 3s timeout.
34
+
-**Lipgloss** (`lipgloss/table`) — styled status table in `status.go`
35
+
-**Glamour** — markdown rendering for changelogs in `output.go` (`outputRendered`). Auto-detects TTY; falls back to plain text when piped.
36
+
-**Bubbletea** — interactive config picker in `config.go` (Model/Update/View pattern)
37
+
38
+
### Key Data Flow
39
+
40
+
- All sources use `fetchGitHubReleases(owner, repo)` → GitHub Releases API
41
+
-`ChangelogEntry.RawBody` stores the raw markdown for glamour rendering (excluded from JSON via `json:"-"`)
42
+
-`parseReleaseBody()` creates structured `Sections`/`Changes` for JSON output
43
+
- User config at `~/.config/aic/config.json` (XDG-aware) stores disabled sources
30
44
31
45
### Commands
32
46
33
-
The CLI uses manual arg parsing (no framework). Three command paths:
47
+
Manual arg parsing (no framework). Four command paths:
34
48
1.**`aic <source> [flags]`** — fetch changelog for a specific source
35
-
2.**`aic latest`** — all releases from last 24h across all sources (concurrent fetching)
36
-
3.**`aic status`** — table view with versions, recency, installed status, release frequency (concurrent fetching + detection)
49
+
2.**`aic latest`** — all releases from last 24h across enabled sources (concurrent)
50
+
3.**`aic status`** — table view with versions, recency, installed status, release frequency
51
+
4.**`aic config`** — interactive picker to enable/disable sources
37
52
38
53
### Adding a New Source
39
54
40
-
Add an entry to the `sources` map in `main.go`. All sources use the same `fetchGitHubReleases` path, so only the GitHub owner/repo and binary detection info are needed. Update `printUsage()`to include the new source.
55
+
Add an entry to the `sources` map in `sources.go`. All sources use `fetchGitHubReleases`, so only GitHub owner/repo and binary detection info are needed. Update `printUsage()`in `main.go` and the README table.
0 commit comments