all repos — llm_aggregator @ 715e67108f4989876184fa73e7dcadecc63d59af

A CLI tool to aggregate RSS feeds and summarise them with LLMs

CHANGELOG.md (view raw)

  1# Changelog
  2
  3All notable changes to this project will be documented in this file.
  4
  5The format is based on [Keep a
  6Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to
  7[Semantic Versioning](https://semver.org/spec/v2.0.0.html).
  8
  9## [0.7.0] - 2026-04-22
 10
 11### Added
 12
 13- **`--dry-run` option**: Validate configuration and preview what would happen
 14  without making any LLM API calls. Useful for validating feeds file and
 15  configuration, checking article counts and filtering results and anything
 16  else that can be done "offline".
 17- **Styled terminal output using `lipgloss`**: All CLI output now uses ANSI
 18  colour codes for better readability:
 19- **`$NO_COLOR` environment variable support**: Respects the ["no
 20color"](https://no-color.org/) standard. When `NO_COLOR` is set, all styling is
 21disabled and plain text is output instead.
 22
 23### Changed
 24
 25- API key validation now only occurs when not using `--dry-run` mode
 26
 27## [0.6.0] - 2026-04-22
 28
 29### Added
 30
 31- **Comprehensive unit test suite**, including CLI argument tests
 32  (`--feeds-file`, `--prompt`, `--api-key`, `--model`, `--base-url`),
 33  configuration tests, aggregator tests, output formatter tests, processor
 34  tests and defaults tests.
 35- **`--base-url` CLI option**: configure custom API endpoints for different LLM
 36  providers. Should support any OpenAI-compatible provider.
 37  - Environment variable: `LLM_AGGREGATOR_BASE_URL`
 38- `internal/defaults` package
 39- `docs/TESTING.md` which contains a comprehensive testing guide with test
 40  descriptions
 41
 42### Changed
 43
 44- **Configuration defaults**: All packages now use `defaults.Default*` constants
 45  - `internal/config`: Uses `defaults.Default*` for default values
 46  - `internal/runtime`: Uses `defaults.Default*` for runtime defaults
 47  - `internal/llm`: Uses `defaults.Default*` for LLM client defaults
 48
 49### Fixed
 50
 51- `nil` pointer safety in aggregator
 52  - Added nil checks for `progressCtx` across all log statements
 53  - `FeedAggregator` now works correctly when progress context is nil
 54  - Tests use `NewFeedAggregatorWithProgress` with explicit progress context
 55
 56## [0.5.0] - 2026-04-22
 57
 58### Added
 59
 60- **Accurate token counting with tiktoken**
 61  - New `internal/tokeniser` package using OpenAI's tiktoken-go library
 62  - BPE tokenisation for accurate token counting vs rough character estimation
 63  - Encoding caching to avoid repeated initialisation overhead
 64  - Model-aware encoding selection (cl100k_base, o200k_base, etc.)
 65  - `CountTokens()` and `CountMessagesTokens()` functions
 66  - Fallback to rough estimation when tiktoken initialisation fails
 67- **Concurrent feed fetching**: Feeds are now fetched concurrently using
 68  `golang.org/x/sync/errgroup`
 69  - Semaphore limits concurrent requests to 10 to avoid server overload
 70  - Mutex-protected shared state for thread-safe article collection
 71  - Partial failures don't stop other feeds from being processed
 72- **Scrollable summary in TUI**
 73  - Bubble Tea viewport component for browsing long summaries
 74  - Keyboard navigation: j/k or arrows (scroll), Space/B (page), g/G
 75  (start/end)
 76  - Mouse wheel scrolling support
 77  - Scroll progress indicator showing position and total lines
 78
 79### Changed
 80
 81- **Streamlined configuration management**: Viper now uses global instance with
 82automatic precedence handling. Simplified configuration flow: Parse → GetViper
 83→ BindCLIArgs → ViperToRuntime
 84- **TUI colour scheme**: All hex colour codes replaced with ANSI 256-colour
 85  palette
 86
 87### Fixed
 88
 89- Viewport now properly handles scroll events via `Update()`. Summary content
 90  pre-wrapped to viewport width before display
 91- Fixed string literal colour names to use actual variables
 92
 93## [0.4.0] - 2026-04-21
 94
 95### Changed 
 96
 97- **TUI is now fully functional and production-ready**: Replaced the
 98work-in-progress TUI implementation with a robust Bubble Tea command pattern:
 99  - Runtime execution now uses native `tea.Cmd` instead of manual goroutine
100  orchestration.
101  - Added real-time progress updates via `progress.Progress` interface with
102  stage, substage, and article count messages.
103  - TUI displays a spinner, elapsed time, and final summary inline.
104  - Removed signal handling and channel synchronisation in favour of Bubble
105  Tea's built-in lifecycle.
106  - `TUIProgress` now only sends messages to an existing program, simplifying
107  integration.
108  - Both verbose mode (`SimpleLogger`) and TUI mode share the same
109  `progress.Progress` interface.
110
111## [0.3.0] - 2026-04-21
112
113### Added
114
115- **Configuration file support via TOML** (XDG-compliant and cross-platform)
116  - Load settings from `~/.config/llm_aggregator/config.toml`
117  - Supports all aggregation, API, and output options
118  - Example configuration file at `configs/config.example.toml`
119- **Environment variable support with `LLM_AGGREGATOR_` prefix**
120  - All configuration options can be set via environment variables
121  - Precedence order: CLI arguments > environment variables > config file >
122  built‑in defaults
123- New `internal/config` package with Viper integration
124  - `Load()` and `Save()` methods for configuration management
125  - `GetConfigPath()` for XDG‑compliant config file location
126  - `ConfigExists()` to check for existing configuration
127- Comprehensive unit tests for configuration loading, saving, and environment
128  variable precedence (`internal/config/config_test.go`)
129
130### Changed
131
132- **Environment variable renamed:** `DEEPSEEK_API_KEY`133  `LLM_AGGREGATOR_API_KEY`
134- **CLI help text** now reflects the new API key environment variable and
135  general configuration options
136- **Command‑line argument precedence** implemented in `cmd/llm_aggregator.go`
137via `applyConfiguration()`
138- Updated all help text, documentation, and code references
139- `README.md` completely revised with a new "Configuration" section
140
141### Removed
142
143- Global `QuietMode` and `VerboseMode` variables from
144`internal/config/config.go`. Replaced by runtime‑specific configuration in
145`runtime.Runtime` and CLI arguments
146- Hardcoded system prompt in `runtime.NewRuntime()`. Now left empty, allowing
147configuration or client default to be used
148- CLI flags now correctly override config file and environment variables
149
150## [0.2.0] - 2026-04-21
151
152### Changed
153
154- Moved all progress and status messages behind `-v/--verbose` flag
155- Default CLI mode is now silent except for final output and errors
156- Components (aggregator, processor, LLM client) use logger interface
157controlled by verbose flag
158
159## [0.1.0] - 2026-04-21
160
161### Added
162
163- Complete translation from Python prototype to Go implementation
164- RSS/Atom feed parsing using `gofeed` library
165- DeepSeek API integration via `openai-go` client, configured for `/chat/completions` endpoint
166- Content filtering and processing with keyword‑based include/exclude, date filtering, and sorting
167- Command‑line interface using `go‑arg` with automatic help and version flags
168- Multiple output formats: plain text, GitHub‑flavoured markdown, and JSON
169- Terminal user interface (TUI) built with `bubbletea` featuring:
170  - Animated progress bar with gradient colours (`#FF7CCB` to `#FDFF8C`)
171  - Live article counters (aggregated/processed)
172  - Elapsed time display
173  - Coloured status indicators using `lipgloss` styling
174  - Keyboard controls (q/Ctrl+C to quit)
175- Web content extraction fallback using `goquery` when feed descriptions are minimal
176- Configurable limits: articles per feed, maximum age, total articles
177- Token estimation and API usage logging
178- Environment variable support (`LLM_AGGREGATOR_API_KEY`) for authentication
179- Example feeds file with technology, programming, and free software sources
180
181### Changed
182
183- Program structure organised into standard Go layout: `cmd/`, `internal/`, `pkg/`
184- English spelling conventions maintained throughout (colour, initialise, summarise)
185- Error handling improved with specific messages for common API failures (invalid key, rate limits, etc.)
186- Progress reporting unified through a `ProgressContext` interface for both TUI and CLI modes
187
188### Fixed
189
190- Initial API endpoint mismatch (using `/responses` instead of `/chat/completions`)
191- Nil pointer dereferences when handling optional feed metadata (author, dates)
192- String repetition syntax errors in Go (replaced `"="*80` with `strings.Repeat`)
193- CLI help/version flag handling to show information without requiring other arguments
194- Type compatibility issues with `openai-go` v3 API (message parameters, token usage fields)