v0.2.0

Configuration

Last updated


This page lists every configuration source in go-rss-reader: two environment variables, the database file location, and the API key stored in the database.

Environment Variables


VariableRequiredDescription
RSS_DB_PATHNoFull path to the SQLite database file; when set, all automatic resolution is skipped and the parent directory must already exist
GO_ENVNodevelopment treats the run as development and creates the database in the current working directory

There is no config file, and .env is not read.

Database Location


database.NewSQLite() resolves the path of rss.db in this order:
OrderConditionPath
1RSS_DB_PATH is setThat value
2go.mod exists in the current working directory, or GO_ENV=development<working dir>/rss.db
3The executable's directory is writable (tested by creating and removing .write_test)<executable dir>/rss.db
4Otherwise~/.rss-reader/rss.db, creating the directory with 0755 if missing

If database initialization fails, the program exits with Failed to init SQLite before the interface opens.

API Key


ItemBehavior
How to setType apikey <API_KEY> in the Command pane
Storagedata table under key apikey, stored in plain text
When loadedEach time full-text extraction finishes and a digest is about to be generated
DisplayThe config command shows the key in plain text in Preview, or Not set when missing; with no feeds it shows only No RSS feeds available. and no key

The key is not read from the environment. Without a key the digest request is still sent, and the 401 error message from OpenAI appears in the Summary pane.

Fixed Parameters


These values are hard-coded and have no setting:
ItemValueLocation
Auto-check interval5 minutesinternal/app/app.go New()
News window72 hoursinternal/util/collector.go GetNews()
HTTP timeout (RSS, full text)30 secondsNewCollector()/NewExtractor()
Extraction interval500msloadContent()
Digest modelgpt-4o-miniinternal/api/llm.go
中文