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

xhoard

v1.1.1

Published

Archive Twitter/X bookmarks to markdown with link expansion, content extraction, and AI-powered categorization

Readme

Xhoard

Archive your Twitter/X bookmarks (and likes, optionally) to markdown. Automatically.

Xhoard fetches bookmarks via Twitter's GraphQL API directly (no external CLI required), extracts content from linked pages, and uses OpenCode to categorize and file them.

Quick Start

git clone https://github.com/TudorAndrei/xhoard
cd xhoard
bun install
bun src/cli.js setup

The setup wizard collects your Twitter cookies, tests them, writes xhoard.config.json, and fetches a first batch.

Or run without installing (GitHub Actions, etc.):

AUTH_TOKEN=xxx CT0=xxx bunx xhoard fetch

Twitter Credentials

Xhoard needs two session cookies:

  1. Open Twitter/X, then DevTools → Application → Cookies
  2. Copy auth_token and ct0
  3. Either paste into the setup wizard or edit xhoard.config.json:
{
  "twitter": {
    "authToken": "your_auth_token",
    "ct0": "your_ct0"
  }
}

xhoard.config.json is gitignored.

What It Does

  1. Fetches bookmarks (or likes, or both) from Twitter/X
  2. Expands t.co links, pulls content from linked pages (articles, GitHub READMEs, X long-form articles, quoted/reply context)
  3. Invokes OpenCode to categorize each item
  4. Writes one markdown file per bookmark under bookmarks/YYYY-MM-DD/, plus knowledge files under knowledge/tools/ and knowledge/articles/

Commands

bun src/cli.js fetch              # Fetch 20 latest
bun src/cli.js fetch 50           # Fetch 50
bun src/cli.js fetch --all        # Paginate all bookmarks
bun src/cli.js fetch --source likes
bun src/cli.js fetch --source both
bun src/cli.js run                # Fetch + process with OpenCode
bun src/cli.js run --limit 50 -t  # Batch + token tracking
bun src/cli.js status

Automation

PM2 (recommended):

pm2 start "bun src/cli.js run --quiet" --cron "*/30 * * * *" --name xhoard
pm2 save

Cron:

*/30 * * * * cd /path/to/xhoard && bun src/cli.js run >> xhoard.log 2>&1

GitHub Actions: copy .github/workflows/archive-bookmarks.yml and add TWITTER_AUTH_TOKEN / TWITTER_CT0 secrets.

Configuration

See xhoard.config.example.json for the full shape. Common options:

| Option | Default | Description | | --- | --- | --- | | source | bookmarks | bookmarks, likes, or both | | archiveDir | ./bookmarks | Where per-bookmark files are written | | folders | {} | Map bookmark-folder IDs to tag names | | categories | (defaults) | Routing rules for linked content | | includeMedia | false | Experimental: include photos/videos/GIFs | | autoInvokeOpencode | true | Run OpenCode after fetching | | opencodeModel | opencode/glm-4.7-free | Model to use | | webhookUrl | null | Discord/Slack notifications |

Env vars work too: AUTH_TOKEN, CT0, SOURCE, INCLUDE_MEDIA, ARCHIVE_DIR, TIMEZONE, OPENCODE_MODEL.

Bookmark folders

If you organize bookmarks into folders on Twitter, map the folder ID (from x.com/i/bookmarks/<id>) to a tag name:

{
  "folders": {
    "1234567890": "ai-tools",
    "0987654321": "articles-to-read"
  }
}

Each bookmark gets tagged with its folder name in the output.

Troubleshooting

  • 401/403 when fetching: your Twitter cookies expired. Grab fresh auth_token / ct0 from DevTools.
  • "No new bookmarks": everything fetched already exists in bookmarks/. To reset: rm -rf .state/ bookmarks/ knowledge/.
  • Processing is slow: pick a faster opencodeModel, or batch with run --limit N.

Credits

License

MIT