aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
blob: 0cb6689ea472b4d04ee8bc5f32f4a6abebd733d3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
<pre style="font-family: menlo, courier, monospace;">
                     ██
                     ██
                     ██
 ██░████    ░████▒   ██  ▓██▒   ░████░
 ███████▓  ░██████▒  ██ ▓██▒   ░██████░
 ███  ▒██  ██▒  ▒██  ██▒██▒    ███  ███
 ██    ██  ████████  ████▓     ██░  ░██
 ██    ██  ████████  █████     ██    ██
 ██    ██  ██        ██░███    ██░  ░██
 ██    ██  ███░  ▒█  ██  ██▒   ███  ███
 ██    ██  ░███████  ██  ▒██   ░██████░
 ██    ██   ░█████▒  ██   ███   ░████░

             v0.3 manual
            February 2026
</pre>

<!-- markdown-toc start - Don't edit this section. Run M-x markdown-toc-generate-toc again -->

- [Neko](#neko)
  - [Features](#features)
  - [Screenshots](#screenshots)
- [Installation](#installation)
  - [Requirements](#requirements)
  - [Building](#building)
    - [Docker](#docker)
    - [Build from Source](#build-from-source)
    - [Development and Testing](#development-and-testing)
- [Configuration](#configuration)
  - [Storage](#storage)
- [Usage](#usage)
  - [Web Interface](#web-interface)
  - [Sidebar Variants](#sidebar-variants)
  - [Add Feed](#add-feed)
  - [Crawl Feeds](#crawl-feeds)
  - [Export](#export)
- [All Command Line Options](#all-command-line-options)
- [Configuration File](#configuration-file)
- [History](#history)
  - [Early 2017](#early-2017)
  - [July 2018 -- v0.2](#july-2018----v02)
  - [February 2026 -- v.03 -- Vibe-code Modernization](#february-2026----v03----vibe-code-modernization)
- [Feedback](#feedback)

<!-- markdown-toc end -->


# Neko

`neko` is a self-hosted, rss reader focused on simplicity and efficiency.

Backend is written in `Go` and there is a modern `React/Vite` SPA frontend.

*note: the cat ears are in your mind*

*note: as of Feb 2026, this project is now mostly rewritten by AI as an experiment, so if you want the old original version git checkout back to 39ed5fcfe9327ab4eb81c4863d9e6353f08f6c07 from a few years ago*

## Features

   * limited features (#1 feature)
   * keyboard shortcuts
      * **j** - next item
      * **k** - previous item
      * that's all you should ever need
   * automatically marks items read in an infinite stream of never-ending content (until you run out of content and it ends)
   * full text search
   * scrapes full text of pages on demand
   * collapsible sidebar sections for Feeds and Tags

## Screenshots

![Screenshot 1](screenshot/neko.jpg?raw=true "Screenshot 1")

![Screenshot 2](screenshot/neko2.jpg?raw=true "Screenshot 2")

# Installation

## Requirements

If you are using a binary, no dependencies!

(I don't actually provide the binaries though.)

 
## Building

### Docker

The easiest way to run Neko is using Docker and Docker Compose.

1. **Build and Start**:
   ```bash
   docker-compose up -d
   ```

2. **Access**:
   The web interface will be available at `http://localhost:8080`.

Data is persisted in a Docker volume named `neko-data` (mapping to `/app/data/neko.db` inside the container).

### Build from Source

Neko is designed for easy building. Static assets for the frontends are pre-built and checked into the repository in the `web/dist/` directory, so a standard Go build is all that's required for most users.

1. **Standard Build**:
   ```bash
   # Uses existing assets in web/dist/ and web/static/ via Go embed
   make build
   ```
   A `neko` binary will be created in the root directory.

2. **Full Rebuild (including UI)**:
   If you modify the React or Vanilla frontends, you'll need to rebuild them. This requires Node.js.
   ```bash
   # Rebuilds everything: cleans, builds UIs, and builds binary
   make all
   ```

3. **Updating UI Assets Only**:
   If you want to update the frontends without a full clean:
   ```bash
   make ui           # Rebuild React frontend
   make build        # Build final binary
   ```


# Configuration

Everything can handled with a few command line flags. You shouldn't need to change the defaults most of the time.

You can also set options using a configuration file [`yaml`](http://yaml.org), described at the end of this README (but you probably don't need to.)

## Storage

By default `neko` will create the file `neko.db` in the current directory for storage.

You can override the location of this database file with the `--database` command line option or `-d` short option.

    $ neko --database=/var/db/neko.db --add=http://trenchant.org/rss.xml

which is equivalent to --

    $ neko -d /var/db/neko.db --add=http://trenchant.org/rss.xml

For expert users -- this is a [SQLite](https://sqlite.org/) database and can be manipulated with standard sqlite commands --

    $ sqlite3 neko.db .schema
    
-- will print out the database schema.

# Usage

## Web Interface

You can do most of what you need to do with `neko` from the web interface, which is what `neko` does by default.

    $ neko
    
`neko` web interface is available by default at `127.0.0.1:4994`.

Neko currently bundles three versions of the web interface for different preferences:

*   **v2 (Modern React)**: Available at `/` (default) and `/v2/`. This is the primary modern interface.
*   **v3 (Performance Vanilla)**: Available at `/v3/`. A high-performance, zero-dependency version built for speed and simplicity. 
*   **v1 (Legacy Backbone)**: Available at `/v1/`. The original classic interface.

You can specify a different port using the `--http` option.

    $ neko --http=9001

If you are hosting on a publicly available server instead of a personal computer, you can protect the interface with a password flag --

    $ neko --password=rssisveryimportant
    
## Sidebar Variants

Neko now supports several UI variants for the sidebar that can be toggled via URL parameters (and are persisted in local storage):

- `?sidebar=glass`: (Default) Modern translucent glassmorphism
- `?sidebar=minimal`: The clean v1-inspired look
- `?sidebar=type`: Bold, Swiss-inspired typography
- `?sidebar=banana`: Playful, "pop" aesthetic

Example: `http://localhost:4994/?sidebar=type`
## Add Feed

You can add feeds directly from the command line for convenience --

    $ neko --add=http://trenchant.org/rss.xml

## Crawl Feeds

By default, when running the web server (`neko`), a background crawler runs every **60 minutes** to fetch new items.

You can customize this interval using the `--minutes` flag:

    $ neko --minutes=30    # Crawl every 30 minutes

To **disable** background crawling, set minutes to 0:

    $ neko --minutes=0     # Run web server only, no background crawling

### Manual Update

You can manually trigger a feed update from the command line without starting the server:

    $ neko --update

This will fetch, download, parse, and store in the database your feeds once and then exit.

## Export

Export de facto RSS feed standard OPML from the command line with --

    $ neko --export=opml

Change `opml` to `text` for a simple list of feed URLs, or `json` for JSON formatted output.

Export is also available in the web interface.

Import of OPML and other things is available via the web interface.

## Purge Items

You can delete old items to free up database space. By default, only **read** items are deleted.

    $ neko --purge=30      # Delete read items older than 30 days

To include **unread** items in the purge:

    $ neko --purge=30 --purge-unread

**Note:** Starred items are never deleted.

# All Command Line Options

View all command line options with `-h` or `--help`

    $ neko -h

Usage of neko:
  -a, --add http://example.com/rss.xml
    	add the feed at URL http://example.com/rss.xml
  -c, --config string
    	read configuration from file
  -d, --database string
    	sqlite database file
  -x, --export string
    	export feed. format required: text, json or opml
  -h, --help
    	print usage information
  -s, --http int
        HTTP port to serve on
  -i, --imageproxy
    	rewrite and proxy all image requests for privacy (experimental)
  -m, --minutes int
    	minutes between crawling feeds (default -1, uses 60 if unset)
  -p, --password string
    	password to access web interface
  --purge int
        purge read items older than N days
  --purge-unread
        when purging, also include unread items
  --secure-cookies
    	set Secure flag on cookies (requires HTTPS)
  -u, --update
    	fetch feeds and store new items
  -v, --verbose
    	verbose output

These are POSIX style flags so --

    $ neko --minutes=120

is equivalent to

    $ neko -m 120

# Configuration File

For convenience, you can specify options in a configuration file.

    $ neko -c /etc/neko.conf

A subset of the command line options are supported in the configuration file, with the same semantics --

   * database
   * http
   * imageproxy
   * minutes
   * password
   * secure_cookies

For example --

```
database: /var/db/neko.db
http: 9001
imageproxy: true
minutes: 90
password: VeryLongRandomStringBecauseSecurityIsFun
# secure_cookies: true  # Set to true when using HTTPS in production

```

# History

## Early 2017

I decided I didn't like the [original version of this that was python and mongo](https://github.com/adammathes/neko_v1) so rewrote it. I wanted to learn some Go. So assume the code is not great since I don't know what I'm doing even more so than normal.

The Javascript frontend stayed still the same, I kept saying I will rewrite that too since it's old backbone.js code but it still seems to mostly work. It's not very pretty though.

## July 2018 -- v0.2

Significant changes to simplify setup, configuration, usage. The goal was typing `neko` should be all you need to do to get started and use the software.

   * removed MySQL requirement (eliminating a ton of configuration and complexity)
   * added SQLite support (easier!)
   * auto-initialization of database file with embedded schema
   * removed json-formatted config file -- all options are command line options
   * `neko` runs web server by default
   * `neko` server crawls feeds regularly rather than requiring cron

## February 2026 -- v.03 -- Vibe-code Modernization

*WELCOME TO THE GEMINI ERA*

The project underwent a significant modernization phase with the help of Google Antigravity, Gemini, and Claude:

   * **Architecture**: Refactored backend into a clean REST API.
   * **Frontend**: Completely rewrote the legacy Backbone.js frontend in React/Vite as a modern Single Page Application (SPA).
   * **Performance**: Implemented robust Gzip compression and optimized asset delivery.
   * **Stability**: Added a comprehensive test suite with high coverage across both backend and frontend.
   * **Modern Standards**: Fully adopted Go modules and modern JavaScript build tooling.


# Development and Testing

Utility scripts and test wrappers are located in the `scripts/` directory:
- `scripts/clean_test_env.sh`: Resets the test database and kills stray processes.
- `scripts/run_e2e_safe.sh`: A safe wrapper for running Playwright E2E tests.
- `scripts/run_e2e.sh`: Standard E2E test runner.


## Development with Containers

If you don't have Go or Node installed locally, or prefer an isolated environment, you can use the provided `docker-compose.dev.yaml`. This avoids manual setup and works around some issues with VS Code Dev Containers in certain environments (like Antigravity + Colima).

1. **Start the development environment**:
   ```bash
   docker compose -f docker-compose.dev.yaml up -d --build
   ```

2. **Run tests inside the container**:
   ```bash
   docker compose -f docker-compose.dev.yaml exec neko-dev bash -c "go test ./... && cd frontend && npm install && npm test"
   ```

3. **Get an interactive shell**:
   ```bash
   docker compose -f docker-compose.dev.yaml exec neko-dev bash
   ```

4. **Stop the environment**:
   ```bash
   docker compose -f docker-compose.dev.yaml down
   ```