npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

newsfeed-grok

v0.1.1

Published

CLI tool that generates structured Super Grok prompts for newsfeed-style research updates

Readme

newsfeed-grok

CI

Small tool with two personalities:

  • No args in a real terminal → interactive TUI that copies a Super Grok prompt to your clipboard
  • CLI subcommands → non-interactive mode for scripts and coding agents

It reads topic definitions from JSON files, builds a structured X/Twitter search prompt, and writes data to stdout.

Quick Start

npm install
npm run dev              # interactive TUI
npm run dev -- list      # non-interactive list

Build the compiled CLI:

npm run build
npm start -- list

Run the package-style integration tests:

npm test

Release helpers are also available:

npm run release:patch   # or release:minor / release:major
npm run release:push
npm run release:publish

Or link it globally:

npm link
newsfeed

Commands

newsfeed
newsfeed list [--json]
newsfeed show <slug>
newsfeed prompt <slug> [--json]
newsfeed create <slug> \
  --name "Rust Async" \
  --description "Rust async ecosystem" \
  --keywords "tokio,async-std,futures" \
  --accounts "@tokio_rs,@withoutboats" \
  --horizon 7d \
  [--extra "Focus on runtime performance"] \
  [--dir user|bundled] \
  [--force]
newsfeed delete <slug> [--yes]

Command behavior

| Command | Behavior | |---|---| | newsfeed | Launch the TUI when stdin/stdout are TTYs | | newsfeed list | Print topic slug<TAB>name pairs | | newsfeed list --json | Print [{"slug":"...","name":"..."}] | | newsfeed show <slug> | Print the topic JSON | | newsfeed prompt <slug> | Print the Grok prompt | | newsfeed prompt <slug> --json | Print { "prompt": "..." } | | newsfeed create <slug> ... | Create or overwrite a topic file and echo the resulting topic JSON | | newsfeed delete <slug> | Delete the currently visible topic file; prompts unless --yes is set |

Notes for scripts

  • show already emits JSON
  • create already emits JSON
  • --json matters for the commands that otherwise have a text mode: list and prompt
  • create --force overwrites the destination file without asking
  • Broken pipes are treated as normal CLI behavior, so newsfeed prompt ... | head does not dump an EPIPE stack trace like a clown show

Output rules

  • stdout is data only
  • stderr is for errors
  • Exit codes:
    • 0 success
    • 1 runtime failure (missing topic, create collision without --force, aborted delete, invalid topic file)
    • 2 usage error (bad flags, missing args, trying to launch the TUI without a TTY)

Topics

Topics are loaded from two places:

  • ~/.config/newsfeed/ — user topics
  • topics/ — bundled topics shipped with the project

Each topic is a JSON file named <slug>.json.

If the same slug exists in both places, the user topic wins. That is the sane default: local config should override bundled defaults.

See what is available:

newsfeed list
newsfeed list --json

Creating Topics

From the TUI

Choose “➕ Create new topic” and answer the prompts.

The interactive save picker now puts ~/.config/newsfeed/ first, because defaulting to writing into bundled repo files is backwards.

From the CLI

newsfeed create rust-async \
  --name "Rust Async" \
  --description "Rust async ecosystem" \
  --keywords "tokio,async-std,futures" \
  --accounts "@tokio_rs,@withoutboats" \
  --horizon 7d \
  --extra "Focus on runtime performance"

By default, create writes to ~/.config/newsfeed/.

Use --dir bundled to write into topics/ instead.

Use --force to overwrite an existing file at the chosen destination:

newsfeed create rust-async \
  --name "Rust Async" \
  --description "Rust async ecosystem" \
  --keywords "tokio,async-std,futures" \
  --accounts "@tokio_rs,@withoutboats" \
  --horizon 7d \
  --force

Topic schema

{
  "name": "Anthropic Third Party Ban",
  "description": "Latest progress on Anthropic banning subscription access of third party access",
  "keywords": ["Anthropic", "LLM", "Model"],
  "xAccounts": ["@steipete", "@badlogicgames"],
  "horizon": "24h",
  "extraInstructions": "Suggest to me the people I should follow later"
}

The filename without .json is the topic slug.

Examples

newsfeed list
newsfeed list --json
newsfeed show anthropic-third-party-ban
newsfeed prompt anthropic-third-party-ban
newsfeed prompt anthropic-third-party-ban --json
newsfeed create rust-async \
  --name "Rust Async" \
  --description "Rust async ecosystem" \
  --keywords "tokio,async-std,futures" \
  --accounts "@tokio_rs,@withoutboats" \
  --horizon 7d
newsfeed create rust-async \
  --name "Rust Async" \
  --description "Rust async ecosystem" \
  --keywords "tokio,async-std,futures" \
  --accounts "@tokio_rs,@withoutboats" \
  --horizon 7d \
  --force
newsfeed delete rust-async --yes

Testing

The package now has a real npm test path using Node's built-in test runner. A GitHub Actions workflow runs that same test command on every push and pull request.

What it covers:

  • create, list, show, and prompt
  • overwrite behavior with create --force
  • user-topic precedence over bundled topics
  • non-TTY error handling for delete and no-arg invocation
  • invalid topic file errors
  • prompt output surviving a broken pipe

Tests run against the compiled CLI in dist/ and isolate HOME in a temp directory so they do not depend on or mutate your real ~/.config/newsfeed/.

Releasing

Recommended flow:

npm test
npm run release:patch   # or release:minor / release:major
npm run release:push
npm run release:publish

release:patch|minor|major bumps the version, creates the git commit, and creates the tag. release:push pushes the release commit and tag. release:publish publishes to npm, and prepublishOnly rebuilds first.

Requirements

  • Node.js ≥ 18
  • Clipboard support for TUI prompt copy:
    • pbcopy on macOS
    • xclip on Linux
    • clip on Windows