NEWSRAFT(1)
π NEWSRAFT(1) β General Commands Manual β feed reader for terminal π
okay bestie, welcome to the newsraft manual. itβs giving βtiny terminal app, huge main-character energy,β and weβre gonna get through every single detail together. π
β¨ NAME β¨
newsraft β feed reader for terminal
πΈ SYNOPSIS πΈ
newsraft [-f FILE1] [-c FILE2] [-d FILE3] [-l FILE4] [-e ACTION] [-v] [-h]
π DESCRIPTION π
Newsraft is a small text based program for reading syndication feeds. It obtains content from a given set of sources and lets you browse it all via one streamlined user interface.
π OPTIONS π
-f FILEβ force feeds file to FILE.-c FILEβ force config file to FILE.-d FILEβ force database file to FILE.-l FILEβ write logs to FILE.-e ACTIONβ execute one-time ACTION from this list:convert-opml-to-feeds(takes OPML from standard input)convert-feeds-to-opml(takes feeds from feeds file)reload-allprint-unread-items-countpurge-abandoned
-vβ print version information.-hβ print usage information.
π¦ STARTER GUIDE π¦
To start using Newsraft you have to create a feeds file with the list of links to feeds you want to receive news from. Check out the FEEDS FILE section for file syntax and valid paths.
When feeds file is ready, you can launch Newsraft. There are only 4 menus you will have to deal with: sections, feeds, items and pager. Default binds are listed in the ACTIONS section.
Sections menu consists of section entries which are needed to organize feeds in groups to be able to process them in bulk. They are kind of directories for feeds. If you didnβt specify any section declarations in your feeds file then you will get to the feeds menu straightaway.
Feeds menu consists of feed entries. Every feed entry contains news downloaded from one specific source which you have set in feeds file. To update a single feed you have to select it and press r or R if you want to update all feeds. From feeds menu you can get to the items menu by entering some feed.
Items menu consists of feed item entries (i. e. single pieces of news) which you get when you update feeds in the previous menu. Every feed item entry has two switchable properties β read state and importance state. Keys to change read state: d to mark read, D to mark unread, A to mark everything read. Keys to change importance state: f to flag important, F to flag unimportant. To view itemβs content you have to go to pager menu by entering selected item.
Pager menu will display some details about selected item and render its content if it was provided by feed. Usually feed item entries have a links section with one link pointing to a related web page and several links that were mentioned in the itemβs content. You can copy these links into your clipboard with y key and open them in your web browser with o key. To target a key action to link with a specific index you have to prefix your key with this index. For example, 5y will copy fifth link and 17o will open seventeenth link in the web browser. You can also setup custom command bindings to execute any commands with these links. Consider this config file:
bind m exec mpv "%l"
bind f exec feh "%l"
With this you will be able to open any link in mpv(1) and feh(1) directly from your terminal! Isnβt it awesome? It is freaking amazing! π₯
For both sections menu and feeds menu there is a special explore mode. You can toggle it by pressing the Tab key. Itβs truly miraculous: it reveals all the news in the current context (combines news from all feeds of the current menu into one list). This mode may come in handy when you want to quickly scroll through all the news without switching between sections and feeds back and forth.
And for a dessert, Iβll tell you about the search functionality. You can type / to begin search input β enter the desired query here and press Enter. This will open up an items menu with all the items matching your query in the current context.
π§ CONFIGURATION π§
π FEEDS FILE π
This file contains feed entries that Newsraft will display and process. There are 4 types of lines in feeds file.
Comment lines start with # character. These lines are completely ignored. For example:
# Look closely. The beautiful may be small.
Feed lines start with a URL. After at least one whitespace character, the name of the feed may be specified β it must be enclosed in double quotes. For example:
https://example.org/feed.xml "Lorem Ipsum Blog"
Generator lines start with a command enclosed in $(). These act just like feed lines but instead of fetching resources from a remote server they use the output of the specified command to obtain the content.
$(cat ~/local-feed.xml) "Lorem Ipsum Blog"
Section lines start with @ character. After any number of whitespace characters, the name of the section must be specified. For example:
@ Software Releases
Both feed and section lines allow you to set individual settings and binds for them. The syntax is as follows:
@ Lorem Ipsum < reload-period 1440
http://example.org/feed1.xml "Dolor Sit" < reload-period 60; item-limit 500
http://example.org/feed2.xml "Id Est" < bind b mark-read; exec book.sh "%l"
Settings set for feeds take precedence over the settings specified for sections. Not every setting supports individual assignment β only settings with asterisk (*) on them do (see SETTINGS section).
Search precedence:
$XDG_CONFIG_HOME/newsraft/feeds$HOME/.config/newsraft/feeds$HOME/.newsraft/feeds
πΈ CONFIG FILE πΈ
This file is used to override default settings and bindings of Newsraft. Presence of config file is totally optional and Newsraft will work without it just fine. There are 3 types of lines in config file.
Comment lines start with # character. These lines are completely ignored. For example:
# Good design is as little design as possible.
Setting lines start with a setting name and end with a setting value. Available settings are listed in the SETTINGS and COLOR SETTINGS sections. Here are a couple of examples:
scrolloff 5000
list-entry-date-format "%D"
feeds-menu-paramount-explore true
Binding lines start with the bind word. They define actions that are performed when certain keys are pressed. Complete list of available actions can be found in the ACTIONS section. Hereβs an example:
bind r reload-all
The special exec action makes it possible to run shell commands when the bound key is pressed. Specifiers within the command are replaced with values corresponding to the currently selected entry as per menu-item-entry-format:
bind m exec w3m "%l"
Thereβs also exec-quiet, which does the same but doesnβt update the UI. Useful with commands which are guaranteed not to take over the terminal:
bind m exec-quiet setsid mpv --terminal=no "%l" &
The edit action runs a specified SQL query on the database, so please be careful! @selected specifier is replaced with a condition which identifies the currently selected entry β make sure to include it if you want to target individual item/feed rather than the whole database:
bind w edit UPDATE items SET user_data = json_set(IFNULL(user_data, '{}'), '$.toWatch', 1) WHERE @selected
bind W edit UPDATE items SET user_data = json_set(IFNULL(user_data, '{}'), '$.toWatch', 0) WHERE @selected
Use the find action to retrieve items based on a specified SQL condition in the current context. For instance, to search for items marked as toWatch (as shown in the previous example), one can use the bindings like the following:
bind f find user_data LIKE '%"toWatch":1%'
bind f find json_extract(user_data, '$.toWatch') = 1
Binding lines can fit multiple actions in a single key. These actions will be executed in the order in which they are specified. Assigned actions must be separated with semicolon (;) characters, for example:
bind key action; exec command; action; edit query; action
In case you want to disable some binding which was set in Newsraft by default, you can use a line according to this format:
unbind key
Search precedence:
$XDG_CONFIG_HOME/newsraft/config$HOME/.config/newsraft/config$HOME/.newsraft/config
π DATABASE FILE π
This file stores everything you download from feeds in sqlite3(1) format. Although you now know the format in which the data is stored, it is highly recommended to avoid modifying the database manually β things will break and it will be very sad. π
Search precedence:
$XDG_DATA_HOME/newsraft/newsraft.sqlite3$HOME/.local/share/newsraft/newsraft.sqlite3$HOME/.newsraft/newsraft.sqlite3
π SETTINGS π
Settings with asterisk (*) on them can be set for individual feeds and sections.
π reload-period (*) π
Default: 0. Feed auto reload period in minutes. If set to 0, no auto reloads will be run.
π suppress-errors (*) π
Default: false. If true, feed update error indication in the menu will be disabled. Itβs recommended to set this setting only for specific feeds that are expected to fail frequently and you are tired of seeing their errors.
π item-rule (*) π
Default: "". Item search condition when accessing database. This can be very useful in managing feeds with a heavy spam flow: you set a condition based on some parameters and only those entries that meet this condition will be shown in the feed. Itβs specified in SQL format. It probably only makes sense to set this setting for individual feeds, and not globally (see FEEDS FILE section to understand how).
Available parameters: bestie, these are the fields you can use β type check matters, so hereβs every one π
guid(string) β Globally unique identifier of the article which is expected to be unique within the originating feedtitle(string) β Title of the articlelink(string) β URL of the articlecontent(string) β Content of the article which is stored exactly as it appears in the feed, with all original HTML preservedattachments(string) β Serialized string of all attachments with URL links, MIME types and byte sizespersons(string) β Serialized string of all people related to the article with names and email addressesdownload_date(integer) β Timestamp of download date in seconds since 1970publication_date(integer) β Timestamp of publication date in seconds since 1970update_date(integer) β Timestamp of update date in seconds since 1970user_data(string) β User-defined data for the item. It can be modified using the edit action (see CONFIG FILE section)
Here are some examples of correct setting values β and yes, they ate β¨
title NOT LIKE '%Rust%'
persons LIKE '%PHARMACIST%' OR persons LIKE '%OFFL1NX%'
attachments LIKE '%audio/mp3%' OR attachments LIKE '%video/mp4%'
CAST(strftime('%Y', publication_date, 'unixepoch') AS INTEGER) >=
2024
NOT (title REGEXP '.+:.+\".+\".+by' OR title LIKE '%(ultra slowed)%'
OR title LIKE '%(1 hour version)%')
The REGEXP operator uses POSIX Extended Regular Expression syntax, see regex(7).
item-limit(*) β Default:0. Maximum number of items stored in a feed. If set to0, no limit will be set.item-limit-unread(*) β Default:true. Iftrue,item-limitsetting will also cap unread items.item-limit-important(*) β Default:false. Iftrue,item-limitsetting will also cap important items.scrolloffβ Default:0. Minimal number of list menu entries to keep above and below the selected entry. If you set it to a very large value the selected entry will always be in the middle of the list menu (except for start and end of the list menu).scrollwrapβ Default:false. Iftrue, moving down while on the last item in a list will wrap around to the top and vice versa.pager-width(*) β Default:100. Pager width in characters. If set to0, the pager will take up all available space.pager-centering(*) β Default:true. Iftrueandpager-widthis not0, pager will center its content horizontally.close-pager-on-toggle-read(*) β Default:false. Iftrue, pager will close on toggle-read action.close-pager-on-toggle-important(*) β Default:false. Iftrue, pager will close on toggle-important action.menu-item-sortingβ Default:time-desc. Sorting order for the items menu. Available values:time-desc,time-asc,time-download-desc,time-download-asc,time-publication-desc,time-publication-asc,time-update-desc,time-update-asc,rowid-desc,rowid-asc,unread-desc,unread-asc,important-desc,important-asc,alphabet-desc,alphabet-asc.menu-feed-sortingβ Default:none. Sorting order for the feeds menu. Available values:unread-desc,unread-asc,alphabet-desc,alphabet-asc.menu-section-sortingβ Default:none. Sorting order for the sections menu. Available values:unread-desc,unread-asc,alphabet-desc,alphabet-asc.menu-responsivenessβ Default:true. Iftrue, update menu contents as soon as possible. Iffalse, the menu will be updated only when you re-open it.open-in-browser-command(*) β Default:auto. Shell command for open-in-browser action. If set toauto, most operating systems will get${BROWSER:-xdg-open} "%l"while macOS users have it set toopen "%l".copy-to-clipboard-commandβ Default:auto. Shell command for copying text to clipboard. All copied data is piped into the standard input of the specified command. If set toauto, Newsraft will determine the appropriate command based on the user environment:"wl-copy"if environment variableWAYLAND_DISPLAYis set"xclip -selection clipboard"if environment variableDISPLAYis set"pbcopy"if Newsraft was built for macOS operating system"newsraft-osc-52"otherwise
"newsraft-osc-52" is a special value that doesnβt run an external command but instead triggers the OSC 52 escape sequence, instructing the terminal to copy data directly to the system clipboard. This behavior is especially useful when running Newsraft over ssh(1), as it allows clipboard operations to affect the local system rather than the remote one.
notification-command(*) β Default:auto. Shell command for invoking system notifications about new news received. If set toauto, Newsraft will determine the appropriate command based on the user environment:"notify-send 'Newsraft brought %q news!'"ifWAYLAND_DISPLAYorDISPLAYis set in environment"osascript -e 'display notification "Newsraft brought %q news!"'"if Newsraft was built for macOS operating system"printf '\e]9;Newsraft brought %q news!\a'"(OSC 9 escape sequence) otherwise
proxy(*) β Default:"". Sets the proxy to use for the network requests. It must be either a hostname or dotted numerical IPv4 address. To specify IPv6 address you have to enclose it within square brackets. Port number can be set by appending:PORTto the end of setting value. By default proxy protocol is considered HTTP, but you can set a different one by prependingSCHEME://to the setting value.proxy-user(*) β Default:"". User for authentication with the proxy server.proxy-password(*) β Default:"". Password for authentication with the proxy server.global-section-nameβ Default:Global. Name of the section that contains all feeds.global-section-hideβ Default:false. Iftrue, global section will not be shown.status-show-menu-pathβ Default:true. Iftrue, print menu path in the status bar.status-placeholderβ Default:r:reload R:reload-all tab:explore d:read D:unread f:important F:unimportant n:next-unread N:prev-unread p:next-important P:prev-important. Placeholder which is put in the status bar if itβs empty.item-content-format(*) β Default:<b>Feed</b>: %f<br>|<b>Title</b>: %t<br>|<b>Date</b>: %d<br>|<br>%c<br>|<br><hr>%L. Sets the HTML format according to which the itemβs content will be generated. Fields are separated by|character and ONLY one specifier can be placed in each field. If an item doesnβt have a value corresponding to the specifier in the field, then the entire field will not be shown. Specifiers are as follows:fβ feed title if set, feed link otherwise;tβ item title;lβ item link;dβ item date;aβ item authors;cβ item content;Lβ item links list.
item-content-date-format(*) β Default:%a, %d %b %Y %H:%M:%S %z. Date format in the itemβs content. Specifier values correspond to thestrftime(3)format.item-content-link-format(*) β Default:<b>[%i]</b>: %l<br>. Link format in the links list of itemβs content.%iand%lwill be replaced by link index and link address respectively.list-entry-date-formatβ Default:%b %d. Date format of the list entries. Specifier values correspond to thestrftime(3)format.menu-section-entry-formatβ Default:%5.0u @ %t. Format of the section list entries. Specifiers are as follows:iβ index number;uβ unread items count;tβ section title.
menu-feed-entry-formatβ Default:%5.0u β %t. Format of the feed list entries. Specifiers are as follows:iβ index number;uβ unread items count;nβ total items count;lβ feed link;tβ feed name if set, feed link otherwise.
menu-item-entry-formatβ Default:" %u β %d β %o". Format of the item list entries. Specifiers are as follows:iβ index number;uβ"N"if item is unread," "otherwise;dβ update date formatted according tolist-entry-date-format;Dβ publication date formatted according tolist-entry-date-format;lβ item link;tβ item title;oβ item title if set, item link otherwise;Lβ feed link;Tβ feed title;Oβ feed title if set, feed link otherwise.
menu-explore-item-entry-formatβ Default:" %u β %d β %-28O β %o". Format of the item list entries in explore mode. Specifiers are the same as inmenu-item-entry-format.sections-ignore-toggle-readβ Default:false. Iftrue, read and unread actions on sections are ignored.sections-menu-paramount-exploreβ Default:false. Enables explore mode in sections menu by default.feeds-menu-paramount-exploreβ Default:false. Enables explore mode in feeds menu by default.read-on-arrival(*) β Default:false. Mark new items as read automatically.mark-item-unread-on-change(*) β Default:false. Mark every item that changes on a feed update as unread.mark-item-read-on-hover(*) β Default:false. Mark every item that gets selected as read.hide-read-feedsβ Default:false. Iftrue, only feeds with unread items will be shown.hide-read-itemsβ Default:false. Iftrue, only unread items will be shown.database-batch-transactionsβ Default:true. Apply all changes to the database file in one big transaction after all feed updates have finished instead of using a separate transaction for each feed update. This improves update performance a lot with the downside that fetched content will not be saved if you quit Newsraft before update finishes.database-analyze-on-startupβ Default:true. Run"ANALYZE"SQLite command on the database every time you start Newsraft. It gathers statistics about database and uses it to optimize some queries making runtime faster.database-clean-on-startupβ Default:false. Run"VACUUM"SQLite command on the database every time you start Newsraft. It rebuilds the database file by packing it into a minimal amount of disk space. This can significantly increase startup time.download-timeout(*) β Default:20. Maximum time in seconds that you allow Newsraft to download one feed. Setting to0disables the timeout.download-speed-limit(*) β Default:0. Maximum download speed in kilobytes per second (kB/s). Setting to0disables the limit.
download-max-connections π₯
Default: 500. This is the max number of connections Newsraft is allowed to have open at once, total. Set it to 0 and there's literally no limit. You can bump this up or even go full 0 if you wanna squeeze out every last drop of performance β but bestie, be aware that stuff can start breaking at high values. The most obvious example? getaddrinfo() starts choking when a huge pile of simultaneous requests are all trying to resolve domain names. π
download-max-host-connections
Default: 0. Max number of simultaneously open connections Newsraft can hold to a single host. 0 means no limit. π
user-agent (*)
Default: auto. This is the User-Agent header sent along with download requests. If it's set to auto, Newsraft generates it like this:
"newsraft/" + NEWSRAFT_VERSION + " (" + OS_NAME + ")"
OS_NAME shouldn't be a privacy concern, because on most systems it contains nothing more than stuff like "Linux" or "Darwin". If you wanna be 100% sure, check the Newsraft log to see how the user-agent is set at startup. π
If you set it to "", the User-Agent header will not be sent at all.
respect-ttl-element (*)
Default: true. Keeps some feeds from updating too often. The limit is set by the feed creators to save traffic and resources for feeds that update very rarely. Disabling this is strongly discouraged. π
ββοΈ
respect-expires-header (*)
Default: true. Holds off on feed updates until the expiration date of the previously downloaded info, so traffic and resources get saved. Disabling it is strongly discouraged.
send-if-none-match-header (*)
Default: true. Sends an entity tag matching the previously downloaded info. If the server you're pulling the feed from has info with the same tag, it rejects the download request β saving traffic and resources, slay. Disabling it is strongly discouraged.
send-if-modified-since-header (*)
Default: true. Sends a date matching the last modification of the previously downloaded info. If the server has info with the same modification date, it rejects the download request to save traffic and resources. Disabling it is strongly discouraged.
ignore-no-color
Default: false. If true, Newsraft uses colors regardless of whether the NO_COLOR environment variable is present or not. π
π¨ COLOR SETTINGS π¨
Color settings are the same settings as above, except they take two color words (foreground and background) plus optional attribute words. Available colors are default, black, red, green, yellow, blue, magenta, cyan, white and colorN (where N can be a number from 0 to 255). Available attributes are bold, italic and underlined. β¨
color-statusβ default value:green default boldcolor-status-infoβ default value:cyan default boldcolor-status-failβ default value:red default boldcolor-list-itemβ default value:default defaultcolor-list-item-selectedβ default value: (not set)color-list-item-unreadβ default value:yellow defaultcolor-list-item-importantβ default value:magenta defaultcolor-list-feedβ default value:default defaultcolor-list-feed-selectedβ default value: (not set)color-list-feed-unreadβ default value:yellow defaultcolor-list-feed-failedβ default value:red defaultcolor-list-sectionβ default value:default defaultcolor-list-section-selectedβ default value: (not set)color-list-section-unreadβ default value:yellow defaultcolor-list-section-failedβ default value:red default
πΉοΈ ACTIONS πΉοΈ
Okay bestie, here's the whole keybind menu. Every action, every key, no cap:
select-nextβj,KEY_DOWN,^Eselect-prevβk,KEY_UP,^Yselect-next-pageβspace,^F,KEY_NPAGEselect-next-page-halfβ^Dselect-prev-pageβ^B,KEY_PPAGEselect-prev-page-halfβ^Uselect-firstβg,KEY_HOMEselect-lastβG,KEY_ENDjump-to-nextβJjump-to-prevβKjump-to-next-unreadβnjump-to-prev-unreadβNjump-to-next-importantβpjump-to-prev-importantβPnext-errorβeprev-errorβEgoto-feedβ*shift-westβ,shift-eastβ.shift-resetβ<sort-by-timeβtsort-by-time-downloadβ (not set)sort-by-time-publicationβ (not set)sort-by-time-updateβ (not set)sort-by-rowidβwsort-by-unreadβusort-by-initialβzsort-by-alphabetβasort-by-importantβienterβenter,l,KEY_ENTER,KEY_RIGHTreloadβrreload-allβR,^Rmark-read; jump-to-nextβdmark-unread; jump-to-nextβDmark-read-allβAmark-unread-allβ (not set)mark-importantβfmark-unimportantβFtoggle-readβ (not set)toggle-importantβ (not set)toggle-explore-modeβtabtoggle-read-menuβHview-errorsβvopen-in-browserβocopy-to-clipboardβy,cstart-search-inputβ/clean-statusβ`navigate-backβh,backspace,KEY_LEFTquitβqquit-hardβQexec man newsraftβ?
You can also bind the escape key, but this can potentially lead to incomplete processing of escape sequences in the terminal on a very fast input. This is because the escape character has a special role under the hood of terminals. Your mileage may vary. π
π¦ FORMATS SUPPORT π¦
These are the data formats of feeds that Newsraft recognizes. Not the whole functionality of these formats gets implemented β only the functionality most likely to carry the most essential info. π
- RSS 2.0, 1.1, 1.0, 0.94, 0.93, 0.92, 0.91, 0.9
- Atom 1.0
- RSS Content Module
- Media RSS
- DublinCore 1.1 Elements
- JSON Feed
π± ENVIRONMENT π±
Newsraft's behavior depends on the environment variables that are set β but not all environment variables affect Newsraft directly, because many of them affect the libraries Newsraft is built on. For example, libcurl(3) recognizes a whole bunch of different environment variables, and you can learn more about those in libcurl-env(3). β¨
XDG_CONFIG_HOMEβ directory where user-specific configuration files are stored.XDG_DATA_HOMEβ directory where user-specific data files are stored.HOMEβ user home directory.BROWSERβ user web browser.WAYLAND_DISPLAYβ identifier of the Wayland graphics display.DISPLAYβ identifier of the X graphics display.NO_COLORβ makes the interface monochrome when present.
π SEE ALSO π
mpv(1), feh(1), sqlite3(1), regex(7), ssh(1), strftime(3), libcurl(3), libcurl-env(3)
π BUGS π
Don't be ridiculous...
π AUTHORS π
Grigory Kirillov and contributors
That's the whole page, bestie β you made it to the end, which is iconic behavior honestly. π«Ά This little masterpiece is dated 2026-10-01 and lives under the name NEWSRAFT(1). Go read some feeds, you earned it. π
ππ¦
π¦ where this page comes from
- alpine 3.24: newsraft-doc 0.38-r0 Β· ISC
- nixpkgs unstable: newsraft 0.38
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms