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

haxe-forum-cli

v0.1.0

Published

CLI to search and read the Haxe community forum (community.haxe.org)

Readme

haxe-forum-cli (hxf)

A small command-line tool to search and read the Haxe community forum right from your terminal.

The forum runs on Discourse, which exposes a public read-only JSON API — so this tool needs no login, no API key, and no scraping.

Install

npm install -g haxe-forum-cli

Then use the hxf command anywhere. Requires Node.js 18+ (uses the built-in fetch).

You can also run it without installing:

npx haxe-forum-cli search "build macro"

From source

git clone https://github.com/GeTechG/haxe-forum-cli
cd haxe-forum-cli
npm install        # install dependencies
npm run build      # compile TypeScript -> dist/
npm link           # make the `hxf` command available globally

Without npm link you can run it via node dist/cli.js <command> or npm run dev -- <command>.

Usage

hxf search <query...>      # search topics
hxf read <topicId>         # read a topic and its replies
hxf latest                 # newest topics
hxf category [slugOrId]    # list categories, or topics in a category

Examples

hxf search build macro              # search for "build macro"
hxf search "abstract enum" -l 5     # limit to 5 results
hxf read 3556                       # read topic #3556 (first 20 posts)
hxf read 3556 --all                 # read the whole thread
hxf read 3556 --page 2              # read the next page of posts
hxf latest -l 20                    # 20 most recent topics
hxf category                        # list all categories
hxf category haxe                   # topics in the "haxe" category

Common options

| Option | Commands | Meaning | | ----------------- | ---------------------- | ---------------------------------------- | | -l, --limit <n> | search/latest/category | max results to show | | -p, --page <n> | search/read | page of results / thread | | --all | read | fetch every post in the thread | | --json | all | normalized, compact JSON (for scripting) | | --md | all | clean Markdown output |

Agent / scripting friendly

The tool is designed to be consumed by LLM agents and scripts, not just humans:

  • --json emits a normalized, compact schema (only the useful fields, with resolved urls and string tags) — not the raw, noisy Discourse dump. Post bodies come back as Markdown, not HTML.
  • --md prints clean Markdown with real ```haxe code fences — ideal to paste straight into an LLM context.
  • No color or decorative hints when piped. Output auto-detects a TTY (honors NO_COLOR); footers like "Read a topic with: …" are shown only to interactive users, so piped output stays clean.
  • Errors are structured. With --json, failures print {"error": "..."} and exit non-zero, so callers can branch on it.
hxf search macros --json | jq -r '.results[] | "\(.id)\t\(.title)"'
hxf read 3556 --json | jq -r '.posts[] | select(.accepted_answer) | .content'
hxf read 3556 --md          # full thread as Markdown for an LLM

JSON shapes

// hxf search <q> --json
{ "query": "macros", "count": 2,
  "results": [ { "id": 3556, "title": "...", "url": "...", "posts_count": 2,
                 "likes": 0, "views": 387, "created_at": "...",
                 "last_posted_at": "...", "tags": ["macro"], "blurb": "..." } ] }

// hxf read <id> --json
{ "id": 3556, "title": "...", "url": "...", "posts_count": 2, "views": 387,
  "tags": ["macro"], "created_by": "Geokureli",
  "posts_shown": 2, "total_posts": 2,
  "posts": [ { "number": 1, "username": "Geokureli", "created_at": "...",
               "likes": 0, "accepted_answer": false, "content": "<markdown>" } ] }

Configuration

By default the tool targets https://community.haxe.org. Point it at another Discourse instance with an environment variable:

HAXE_FORUM_URL=https://meta.discourse.org hxf latest

How it works

| Feature | Endpoint | | --------- | --------------------------------- | | search | GET /search.json?q=... | | read | GET /t/{id}.json | | latest | GET /latest.json | | category | GET /categories.json, /c/{slug}.json |

Post bodies (Discourse "cooked" HTML) are rendered to colored terminal text, preserving code blocks, quotes, lists, and links.

Project layout

src/
  api.ts      # Discourse JSON API client
  render.ts   # HTML -> colored terminal text
  format.ts   # dates, tags, headings
  cli.ts      # commander commands & output

License

MIT