docs/llm_aggregator.5 (view raw)
1.\" Man page for llm_aggregator configuration file
2.TH LLM_AGGREGATOR 5 "22 April 2026" "1.0.0" "File Formats"
3.SH NAME
4llm_aggregator.conf \- configuration file for llm_aggregator
5.SH DESCRIPTION
6The
7.B llm_aggregator
8configuration file is a TOML file that allows users to set default values
9for all command\-line options. This eliminates the need to specify common
10options on every invocation.
11.PP
12The configuration file is read from:
13.PP
14.RS 4
15~/.config/llm_aggregator/config.toml
16.RE
17.PP
18If the file does not exist, default values are used for all options.
19Configuration options can still be overridden by environment variables and
20command\-line arguments.
21.SH FILE STRUCTURE
22The configuration file is a TOML file with the following sections and
23options:
24.SH "[feed_aggregation]"
25Options controlling how feeds are fetched and processed.
26.TP
27.B max_articles_per_feed = \fIinteger\fR
28Maximum number of articles to fetch from each feed.
29.br
30Default: 10
31.TP
32.B max_days_old = \fIinteger\fR
33Only include articles from the last N days. Set to 0 to include all articles
34regardless of age.
35.br
36Default: 7
37.TP
38.B max_total_articles = \fIinteger\fR
39Maximum total number of articles to process across all feeds.
40.br
41Default: 20
42.SH "[filtering]"
43Options for filtering article content by keywords.
44.TP
45.B include_keywords = \fI"string"\fR
46Comma\-separated list of keywords to include. Only articles containing at
47least one of these keywords (case\-insensitive) will be processed.
48.br
49Example: include_keywords = "linux,opensource"
50.TP
51.B exclude_keywords = \fI"string"\fR
52Comma\-separated list of keywords to exclude. Any article containing one of
53these keywords (case\-insensitive) will be filtered out.
54.br
55Example: exclude_keywords = "windows,microsoft"
56.SH "[llm_api]"
57Options for the LLM API connection and behaviour.
58.TP
59.B api_key = \fI"string"\fR
60OpenAI\-compatible API key. Can also be set via the
61.B LLM_AGGREGATOR_API_KEY
62environment variable.
63.br
64Note: It is generally safer to set this via the environment variable rather
65than in the configuration file.
66.TP
67.B base_url = \fI"string"\fR
68API base URL for the LLM service.
69.br
70Default: "https://api.deepseek.com"
71.br
72Example for local Ollama: "http://localhost:11434/v1"
73.TP
74.B model = \fI"string"\fR
75LLM model to use for summarisation.
76.br
77Default: "deepseek-chat"
78.br
79Common models: deepseek-chat, deepseek-reasoner, gpt-4o, llama3
80.TP
81.B max_tokens = \fIinteger\fR
82Maximum number of tokens in the LLM response.
83.br
84Default: 4000
85.TP
86.B temperature = \fIfloat\fR
87Sampling temperature for the LLM. Must be between 0.0 and 1.0.
88.br
89Lower values produce more deterministic output, higher values produce more
90creative output.
91.br
92Default: 0.7
93.SH "[system]"
94Options related to the LLM system prompt.
95.TP
96.B system_prompt = \fI"string"\fR
97Custom system prompt for the LLM. The system prompt instructs the AI on
98how to behave and what format to use in its responses.
99.br
100.br
101Default:
102.br
103.nf
104 "You are an expert analyst and summariser.
105 You analyse content from multiple sources and provide
106 concise, insightful summaries based on user requests.
107 Focus on key points, trends, and important information."
108.fi
109.br
110.br
111The system prompt can span multiple lines using TOML's multi\-line string
112syntax (triple quotes).
113.SH "[output]"
114Options for controlling output format and destination.
115.TP
116.B output = \fI"string"\fR
117Output format. Must be one of: "text", "json", or "markdown".
118.br
119Default: "text"
120.TP
121.B output_file = \fI"string"\fR
122Optional file path to write output to. If not specified, output is written
123to stdout.
124.br
125Example: output_file = "/tmp/summary.txt"
126.TP
127.B include_articles = \fIboolean\fR
128Include the original articles in JSON output. Only applicable when
129.B output
130is set to "json".
131.br
132Default: false
133.SH EXAMPLE CONFIGURATION
134Below is a complete example configuration file:
135.PP
136.RS 4
137.nf
138# llm_aggregator configuration file
139# Location: ~/.config/llm_aggregator/config.toml
140
141# Feed aggregation options
142max_articles_per_feed = 10
143max_days_old = 7
144max_total_articles = 20
145
146# Content filtering (comma-separated keywords)
147# include_keywords = "linux,opensource"
148# exclude_keywords = "windows,microsoft"
149
150# LLM API options
151# api_key = "your_api_key_here" # Can also be set via LLM_AGGREGATOR_API_KEY env var
152model = "deepseek-chat"
153max_tokens = 4000
154temperature = 0.7
155
156# System prompt for LLM API
157system_prompt = """You are an expert analyst and summariser.
158You analyse content from multiple sources and provide
159concise, insightful summaries based on user requests.
160Focus on key points, trends, and important information."""
161
162# Output options
163output = "text" # Options: text, json, markdown
164# output_file = "" # Optional output file path
165include_articles = false
166.fi
167.RE
168.PP
169A more feature\-rich example with filtering and custom API settings:
170.PP
171.RS 4
172.nf
173# Feed aggregation options
174max_articles_per_feed = 15
175max_days_old = 3
176max_total_articles = 30
177
178# Content filtering
179include_keywords = "linux,kernel,open source,AI"
180exclude_keywords = "windows, proprietary"
181
182# LLM API options
183# api_key = "sk-..." # Use env var in production
184base_url = "https://api.deepseek.com"
185model = "deepseek-chat"
186max_tokens = 6000
187temperature = 0.5
188
189# Custom system prompt for technical content analysis
190system_prompt = """You are a technical analyst specialising in
191open source software and cybersecurity. Provide detailed,
192accurate summaries focusing on technical implications
193and practical applications."""
194
195# Output options
196output = "markdown"
197include_articles = true
198.fi
199.RE
200.SH CONFIGURATION PRECEDENCE
201Configuration options are resolved in the following order (highest to lowest):
202.TP 2
2031.
204Command\-line arguments (e.g., \-\-model, \-\-output)
205.TP 2
2062.
207Environment variables (e.g., LLM_AGGREGATOR_MODEL, LLM_AGGREGATOR_OUTPUT)
208.TP 2
2093.
210Configuration file (~/.config/llm_aggregator/config.toml)
211.TP 2
2124.
213Built\-in defaults
214.PP
215This means any option specified on the command line will override both the
216environment variable and the configuration file for that invocation.
217.SH ENVIRONMENT VARIABLES
218The following environment variables can be used to set configuration options.
219They take precedence over the configuration file but not over command\-line
220arguments.
221.TP
222.B LLM_AGGREGATOR_API_KEY
223API key for the LLM service.
224.TP
225.B LLM_AGGREGATOR_BASE_URL
226API base URL.
227.TP
228.B LLM_AGGREGATOR_MODEL
229Model name.
230.TP
231.B LLM_AGGREGATOR_MAX_TOKENS
232Maximum tokens in response.
233.TP
234.B LLM_AGGREGATOR_TEMPERATURE
235Sampling temperature.
236.TP
237.B LLM_AGGREGATOR_SYSTEM_PROMPT
238Custom system prompt.
239.TP
240.B LLM_AGGREGATOR_MAX_ARTICLES_PER_FEED
241Maximum articles per feed.
242.TP
243.B LLM_AGGREGATOR_MAX_DAYS_OLD
244Maximum article age in days.
245.TP
246.B LLM_AGGREGATOR_MAX_TOTAL_ARTICLES
247Maximum total articles.
248.TP
249.B LLM_AGGREGATOR_INCLUDE_KEYWORDS
250Comma\-separated include keywords.
251.TP
252.B LLM_AGGREGATOR_EXCLUDE_KEYWORDS
253Comma\-separated exclude keywords.
254.TP
255.B LLM_AGGREGATOR_OUTPUT
256Output format (text/json/markdown).
257.TP
258.B LLM_AGGREGATOR_OUTPUT_FILE
259Output file path.
260.TP
261.B LLM_AGGREGATOR_INCLUDE_ARTICLES
262Include articles in JSON output (true/false).
263.SH SECURITY CONSIDERATIONS
264.TP 2
265\(bu
266Avoid storing API keys in the configuration file. Use the
267.B LLM_AGGREGATOR_API_KEY
268environment variable instead.
269.TP 2
270\(bu
271The configuration file should have restrictive permissions (mode 600) to
272prevent other users from reading your API key if it is stored in the file.
273.TP 2
274\(bu
275Command\-line arguments may be visible to other users via process listings.
276Use environment variables for sensitive data in shared environments.
277.SH FILES
278.TP
279.B ~/.config/llm_aggregator/config.toml
280Primary configuration file location.
281.TP
282.B /etc/llm_aggregator/config.toml
283System\-wide configuration (if applicable).
284.SH SEE ALSO
285.BR llm_aggregator (1)
286.SH AUTHOR
287Written by Maxwell Jensen.
288.SH REPORTING BUGS
289Report bugs at: https://codeberg.org/maxwelljensen/llm_aggregator/issues
290.SH COPYRIGHT
291Copyright \(co 2026 Maxwell Jensen.
292.br
293Licensed under the European Union Public Licence 1.2 (EUPL\-1.2).
294.br
295See
296.BR LICENCE.txt
297for full licence details.