explaingit

iremi/birdmarks_bm

0TypeScriptAudience · developerComplexity · 3/5ActiveSetup · moderate

TLDR

Fork of the birdmarks CLI that exports Twitter and X bookmarks to markdown files with YAML frontmatter. Adds support for X Premium bookmark folders and tags each saved tweet with its folder.

Mindmap

mindmap
  root((birdmarks))
    Inputs
      Browser cookies
      Twitter bookmarks
      CLI flags
    Outputs
      Markdown files
      YAML frontmatter
      Downloaded media
      Article exports
    Use Cases
      Archive X bookmarks
      Organize by folder
      Backfill thread replies
    Tech Stack
      TypeScript
      Bun
      Markdown
      YAML

Things people build with this

USE CASE 1

Archive your X bookmarks as markdown files organized by Premium folder

USE CASE 2

Export full reply threads and quoted tweets up to a configurable depth

USE CASE 3

Backfill missing YAML headers or replies on a previously exported library

USE CASE 4

Resume a paginated export after hitting X rate limits

Tech stack

TypeScriptBunMarkdownYAML

Getting it running

Difficulty · moderate Time to first run · 30min

Folder support only ships in the source build, so you need Bun 1.0 or newer and a browser logged into X to read the auth cookies.

In plain English

This repo is a command line tool called birdmarks that exports your Twitter and X bookmarks to plain markdown files on your computer. It is a fork of an upstream project of the same name, with one main addition: support for the bookmark folders that X Premium users can create, so each saved tweet gets tagged with the folder it lives in. Without the new flags, the tool behaves the same as the original. For each bookmarked tweet, the tool writes a markdown file containing the tweet text and a YAML metadata block at the top with fields like the author, date, URL, thread length, hashtags, quoted tweet IDs, and resolved link metadata for any GitHub repos or web articles linked in the tweet. It also follows the author's reply chain to capture full threads, optionally pulls in top level replies from other users, and recursively expands quoted tweets up to a configurable depth, defaulting to three levels deep. Media handling is built in. Images attached to bookmarks are downloaded into a local assets folder, and Twitter's own long form articles are extracted into a separate articles folder with proper markdown formatting. Shortened t.co URLs are expanded, page titles are fetched, and a 7 day cache stops the tool from re fetching the same link metadata over and over. The author warns that X rate limits kick in quickly when replies, media, and nested quote tweets are involved, sometimes after only about 100 bookmarks, so the tool saves a pagination cursor and can be resumed by running it again. Authentication is done by reading login cookies from a local browser, so the user must be signed in to Twitter or X in Chrome, Safari, or Firefox. There are pre built binaries for macOS on both Apple Silicon and Intel, Linux, and Windows on the upstream releases page, but those upstream binaries do not include folder support, so anyone who wants the new flags has to build from source using the Bun JavaScript runtime, version 1.0 or newer. The command line offers a long list of flags for things like choosing the output directory, processing a single tweet by ID, limiting how many pages are fetched per run, organising files into year and month subfolders, rebuilding from scratch, backfilling missing replies or YAML headers on existing exports, and re tagging folder names without re fetching the tweets. The repo has zero stars and is a personal fork rather than a polished product.

Copy-paste prompts

Prompt 1
Walk me through building this fork from source with Bun on macOS Apple Silicon.
Prompt 2
Help me schedule a daily run with launchd that resumes from the saved pagination cursor.
Prompt 3
Show me how the folder-tag flag changes the YAML frontmatter compared to the upstream output.
Prompt 4
Add a flag that exports each folder into its own subdirectory instead of tagging in frontmatter.
Prompt 5
Modify the quoted-tweet recursion to stop expanding when a tweet has more than five replies.
Open on GitHub → Explain another repo

Generated 2026-05-22 · Model: sonnet-4-6 · Verify against the repo before relying on details.