### Install and Start NewsBlur Source: https://github.com/samuelclay/newsblur/blob/main/README.md Clone the repository and initialize the application using the provided Makefile. ```bash git clone https://github.com/samuelclay/NewsBlur.git cd NewsBlur make ``` -------------------------------- ### Install and Log in to NewsBlur CLI Source: https://github.com/samuelclay/newsblur/blob/main/blog/_posts/2026-04-01-mcp-server-and-cli.md Install the newsblur-cli package and log in to your NewsBlur account using the CLI tool. This is the initial setup step for using the command-line interface. ```bash uv pip install newsblur-cli newsblur auth login ``` -------------------------------- ### Install Docker Dependency Source: https://github.com/samuelclay/newsblur/blob/main/ansible/roles/letsencrypt/README.md Example playbook configuration to ensure Docker is installed using the angstwad.docker_ubuntu role. ```yaml --- - name: Setup server hosts: server become: true roles: - { role: angstwad.docker_ubuntu } ``` -------------------------------- ### Install and Authenticate NewsBlur CLI Source: https://github.com/samuelclay/newsblur/blob/main/skills/newsblur-cli/SKILL.md Install the CLI and perform initial OAuth authentication. ```bash uv pip install newsblur-cli newsblur auth login ``` ```bash newsblur --server https://my-newsblur.example.com auth login ``` -------------------------------- ### Install NewsBlur CLI Source: https://github.com/samuelclay/newsblur/blob/main/newsblur_mcp/README.md Install the package using pip. ```bash pip install newsblur-cli ``` -------------------------------- ### Quick Start Commands Source: https://github.com/samuelclay/newsblur/blob/main/newsblur_mcp/README.md Common commands for authentication, briefing, and story management. ```bash # Log in (opens your browser for OAuth) newsblur auth login # Get your daily briefing newsblur briefing # List your feeds newsblur feeds list # Read stories from a feed newsblur stories river --feed 42 # Search stories newsblur stories search "machine learning" # Save a story newsblur save # Mark stories as read newsblur read ``` -------------------------------- ### Copy Secrets Example Source: https://github.com/samuelclay/newsblur/blob/main/ansible/roles/sentry/vars/README.md Use this command to copy the example secrets file to a new file for your actual secrets. ```bash cp secrets.yml.example secrets.yml ``` -------------------------------- ### Start Redis Server Source: https://github.com/samuelclay/newsblur/blob/main/Maintenance.md Use this command to start the Redis server if it is down. Ensure you are on the correct server. ```bash sudo /etc/init.d/redis start ``` -------------------------------- ### Start MongoDB Server Source: https://github.com/samuelclay/newsblur/blob/main/Maintenance.md Use this command to start the MongoDB server if it is down. This is typically for hardware failure scenarios. ```bash sudo /etc/init.d/mongodb start ``` -------------------------------- ### Build and Install Android Application Source: https://github.com/samuelclay/newsblur/blob/main/AGENTS.md Commands for building and installing the Android application, requiring an explicit JAVA_HOME path to avoid JDK version conflicts. ```bash env JAVA_HOME="/Applications/Android Studio.app/Contents/jbr/Contents/Home" ./gradlew :app:installDebug ``` ```bash env JAVA_HOME="/Applications/Android Studio.app/Contents/jbr/Contents/Home" ./gradlew :app:compileDebugJavaWithJavac --rerun-tasks ``` -------------------------------- ### Install Dependencies and Migrate Django 1.7 Source: https://github.com/samuelclay/newsblur/blob/main/UPGRADING.md Use pip to install requirements and then run Django migrations. Uninstall South before migrating. ```bash pip install -r requirements.txt pip uninstall south ./manage.py migrate ``` -------------------------------- ### Install Dependencies and Migrate Django 1.8 Source: https://github.com/samuelclay/newsblur/blob/main/UPGRADING.md Install project dependencies using pip and then apply Django database migrations. ```bash pip install -r requirements.txt ./manage.py migrate ``` -------------------------------- ### Install Dependencies and Fake Migrate Django 1.9 Source: https://github.com/samuelclay/newsblur/blob/main/UPGRADING.md Install requirements, perform a fake migration for a specific app, and then run all migrations. ```bash pip install -r requirements.txt ./manage.py migrate oauth2_provider 0001 --fake ./manage.py migrate ``` -------------------------------- ### Start NewsBlur MCP server with Docker Source: https://github.com/samuelclay/newsblur/blob/main/README.md Use this command to launch the MCP server container when self-hosting. ```bash docker compose up newsblur_mcp ``` -------------------------------- ### ContextCompat Source: https://github.com/samuelclay/newsblur/blob/main/clients/android/NewsBlur/app/src/main/baseline-prof.txt Provides backward-compatible access to framework features, including starting activities and accessing external storage. ```APIDOC ## ContextCompat ### Description Offers backward-compatible access to various Android framework features. ### Methods - `()` - `getColor(Context, int)` - `getDrawable(Context, int)` - `getExternalCacheDirs(Context)` - `startActivity(Context, Intent, Bundle)` ### Inner Classes/Impls - `Api16Impl` - `startActivity(Context, Intent, Bundle)` - `Api19Impl` - `getExternalCacheDirs(Context)` - `Api21Impl` - `getDrawable(Context, int)` - `Api23Impl` - `getColor(Context, int)` ``` -------------------------------- ### Configure LetsEncrypt Playbook Source: https://github.com/samuelclay/newsblur/blob/main/ansible/roles/letsencrypt/README.md Example of integrating the auxilincom.letsencrypt role into a playbook with Cloudflare DNS plugin configuration. ```yaml --- - name: Setup server hosts: server become: true roles: - role: auxilincom.letsencrypt use_dns_plugin: yes certbot_version: v0.26.1 dns_plugin: cloudflare email: ship@test.com domains_list: - "*.ship.com" dns_email: ship_dns@test.com dns_api_key: 0123456789abcdef0123456789abcdef01234567 ``` -------------------------------- ### Setup Hosts on All Machines Source: https://github.com/samuelclay/newsblur/blob/main/Maintenance.md This command copies the updated hosts file to all machines in the NewsBlur deployment. It's used after changing server configurations. ```bash fab all setup_hosts ``` -------------------------------- ### Fast Startup (Legacy) Source: https://github.com/samuelclay/newsblur/blob/main/AGENTS.md Provides a fast startup without rebuilding images. The `make` command is recommended instead. ```bash make nb ``` -------------------------------- ### Perform Network Requests with AFNetworking Source: https://github.com/samuelclay/newsblur/blob/main/clients/ios/CLAUDE.md Examples of performing GET and POST requests via the NewsBlurAppDelegate. ```objc [appDelegate GET:@"/reader/feeds" parameters:nil success:^(...) {...} failure:^(...) {...}]; [appDelegate POST:@"/reader/mark_story_as_read" parameters:params success:^(...) {...} failure:^(...) {...}]; ``` -------------------------------- ### Boot a simulator Source: https://github.com/samuelclay/newsblur/blob/main/clients/ios/CLAUDE.md Boots a specific simulator instance using its UDID. ```bash xcrun simctl boot ``` -------------------------------- ### Example MongoDB Log Entry: Drop Database Command Source: https://github.com/samuelclay/newsblur/blob/main/blog/_posts/2021-06-28-story-of-a-hacking.md This log entry records the execution of a `dropDatabase` command on the 'config' database. It indicates the start of the operation and the number of collections being dropped. ```log 2021-06-24T01:34:08.018+0000 I COMMAND [conn63456637] dropDatabase config - starting ``` -------------------------------- ### Build Project from Command Line Source: https://github.com/samuelclay/newsblur/blob/main/clients/ios/CLAUDE.md Builds the project using the NewsBlur scheme for the iPhone 16e simulator. ```bash xcodebuild -project NewsBlur.xcodeproj -scheme "NewsBlur" -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 16e' build ``` -------------------------------- ### Open Xcode project Source: https://github.com/samuelclay/newsblur/blob/main/clients/safari-extension/README.md Launch the project in Xcode to configure signing and perform the final build. ```bash open "NewsBlur Archive.xcodeproj" ``` -------------------------------- ### Switch to New PostgreSQL Server Source: https://github.com/samuelclay/newsblur/blob/main/Maintenance.md Steps to migrate Newsblur's PostgreSQL database to a new server. This includes starting a backup on the old server, syncing data using rsync, and promoting the new server. Ensure 'openssh-client' and 'rsync' are installed on the new server. ```bash # Old docker exec -it -u postgres postgres psql -c "SELECT pg_start_backup('label', true)" # New ## Install `openssh-client` and `rsync` docker stop postgres rsync -Pav --stats --progress db-postgres.service.consul:/srv/newsblur/docker/volumes/postgres/data /srv/newsblur/docker/volumes/postgres/ --exclude postmaster.pid docker start postgres # New docker exec -it -u postgres postgres /usr/lib/postgresql/13/bin/pg_ctl -D /var/lib/postgresql/data promote # Old docker exec -it -u postgres postgres psql -c "SELECT pg_stop_backup()" ``` -------------------------------- ### Install Docker CE Ansible Role Source: https://github.com/samuelclay/newsblur/blob/main/ansible/roles/docker/README.md Use this command to install the Docker CE Ansible role from Ansible Galaxy. Ensure you have Ansible installed. ```bash $ ansible-galaxy install zaxos.docker-ce-ansible-role ``` -------------------------------- ### Initialize NewsBlur Database Source: https://github.com/samuelclay/newsblur/blob/main/docker/README.md Run database migrations and load initial data into the NewsBlur Docker container. ```bash docker-compose run newsblur ./manage.py migrate ``` ```bash docker-compose run newsblur ./manage.py loaddata docker/data.json ``` -------------------------------- ### List available simulators Source: https://github.com/samuelclay/newsblur/blob/main/clients/ios/CLAUDE.md Displays all available simulators and their respective UDIDs. ```bash python3 run_ios.py list ``` -------------------------------- ### GET /rss_feeds/statistics/{feed_id} Source: https://context7.com/samuelclay/newsblur/llms.txt Get detailed statistics about a feed including update frequency and fetch history. ```APIDOC ## GET /rss_feeds/statistics/{feed_id} ### Description Get detailed statistics about a feed including update frequency, fetch history, and subscriber count. ### Method GET ### Endpoint https://newsblur.com/rss_feeds/statistics/{feed_id} ### Parameters #### Path Parameters - **feed_id** (integer) - Required - The ID of the feed. ### Response #### Success Response (200) - **stories_last_month** (integer) - Count of stories in the last month. - **average_stories_per_month** (integer) - Average monthly story count. - **last_update** (string) - Timestamp of the last update. - **next_update** (string) - Timestamp of the next scheduled update. - **feed_fetch_history** (array) - List of recent fetch attempts. ``` -------------------------------- ### Deploy Web Servers Source: https://github.com/samuelclay/newsblur/blob/main/Maintenance.md Run this command to deploy changes to the web servers. This is part of the process after updating host configurations. ```bash fab web deploy ``` -------------------------------- ### Install Debug APK on Android Emulator Source: https://github.com/samuelclay/newsblur/blob/main/CLAUDE.md Use this command to install the debug version of the Android app. It preserves the existing app state, including login sessions. ```bash env JAVA_HOME="/Applications/Android Studio.app/Contents/jbr/Contents/Home" ./gradlew :app:installDebug ``` -------------------------------- ### Get Daily Briefing with NewsBlur CLI Source: https://github.com/samuelclay/newsblur/blob/main/blog/_posts/2026-04-01-mcp-server-and-cli.md Obtain a daily briefing with AI-curated summaries using the 'newsblur briefing' command. You can limit the number of summaries or get structured JSON output. ```bash newsblur briefing # today's briefing ``` ```bash newsblur briefing --limit 1 # just the latest ``` ```bash newsblur briefing --json # structured output ``` -------------------------------- ### Example Feed Data Structure Source: https://github.com/samuelclay/newsblur/blob/main/blog/_site/2011/04/26/make-your-own-feed-reader-with-newsblurs-new-api/index.html An example JSON structure representing data for a feed, including feed title, favicon information, and an ID. This is typically returned by API endpoints related to feed management. ```json { "feed_link": "http://blog.louisgray.com/", "favicon_fetching": false, "feed_title": "louisgray.com", "favicon": "[FAVICON GOES HERE]", "favicon_color": "f96402", "id": 172, "result": "ok" } ``` -------------------------------- ### Example Classifier Data Structure Source: https://github.com/samuelclay/newsblur/blob/main/blog/_site/2011/04/26/make-your-own-feed-reader-with-newsblurs-new-api/index.html An example JSON structure for classifier data associated with a feed, detailing story counts, feed tags, author information, and tag classifications. This data is useful for understanding content trends and training classifiers. ```json [{ "stories_last_month": 24, "feed_id": 172, "feed_tags": [["android", 13.0], ["google", 12.0], ["apple", 12.0], ["iphone", 9.0], ["twitter", 7.0], ["facebook", 5.0], ["sxsw", 5.0], ["media", 5.0], ["spotify", 4.0], ["itunes", 4.0], ["ipad", 4.0], ["silicon valley", 4.0], ["personal", 3.0], ["apple tv", 3.0], ["quora", 3.0], ["social networking", 3.0], ["yobongo", 3.0], ["entertainment", 3.0], ["seesmic", 3.0], ["search", 3.0], ["music", 3.0], ["beluga", 3.0], ["work", 3.0], ["chat", 3.0], ["samsung", 3.0]], "classifiers": { "authors": {}, "feeds": {}, "titles": {}, "tags": { "personal": 1, "android": -1, "facebook": -1, "twitter": 1, "rss": 1 } }, "feed_authors": [["louisgray@gmail.com (Louis Gray)", 62]] }] ``` -------------------------------- ### Retrieve Daily Briefing Source: https://github.com/samuelclay/newsblur/blob/main/skills/newsblur-cli/SKILL.md Get an AI-curated briefing of top stories. ```bash newsblur briefing newsblur briefing --limit 1 newsblur briefing --json ```