alexknowshtml/smaug
A Node.js CLI that turns X bookmarks and likes into an AI-curated Markdown archive
Automated SPDX check for reference only — not legal advice. Disclaimer
GitHub Star History
Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.
Evidence-Backed Technical Brief
AI Deep ReviewArchitecture & Core Mechanics
Smaug is a JavaScript CLI for Node.js 20+. Its smaug entry point separates fetch from process, while run combines them. Bird handles authenticated collection from X; Smaug expands t.co URLs and enriches the collected records with linked content. The default pending and state files live under .state/, and dayjs is the only declared runtime package dependency. Bird and the AI CLI are separate executables.
Processing delegates analysis and filing to Claude Code by default or to a configured OpenCode backend. The Claude workflow is defined in .claude/commands/process-bookmarks.md. Output goes to a date-organized bookmarks.md index and, where configured, separate notes under knowledge/. Category rules are the main extension point: users can match links and set a filing action, destination, and template rather than add a new service.
Key Capabilities & Differentiators
Smaug collects bookmarks, likes, or both. It expands shortened links and can capture GitHub metadata and READMEs, external article text, and context from quoted posts or reply threads. For native X articles it tries the original post, then searches for the author's post if needed, and falls back to basic metadata. Configured bookmark folders are fetched independently because bulk results lack folder membership; their mapped tags appear in the archive and note frontmatter.
Claude Code supports Sonnet, Haiku, and Opus settings, while OpenCode exposes a broader choice of models. The Claude workflow defaults to parallel Haiku subagents from eight items per batch. The -t flag reports Claude token usage, cache reads and writes, and estimated costs by model. Media metadata is experimental and depends on a Bird build with media support; the transcribe action only flags items and does not perform transcription.
Trade-offs & Limitations
Compared with a plain bookmark export, Smaug trades predictable output and a smaller dependency chain for richer context, summaries, and a portable Markdown library. Separating fetch from processing makes it easier to inspect inputs and bound model spend. Large batches with long articles or repository READMEs can still be expensive, and filing quality varies by model. Collection also depends on a valid X session and a compatible Bird build, so scheduled runs need monitoring.
The main trust boundary is between untrusted posts or linked pages and the AI CLI that processes them. The example Claude configuration allows Bash as well as file-writing tools. For unattended runs, narrow permissions to what filing needs, restrict workspace and credential access, and confirm what text the selected provider receives. A local Markdown archive does not make inference local or the workflow offline.
Hardware & Deployment Guide
Install Node.js 20+, Bird, and either Claude Code or OpenCode. From a checkout, run npm install, then npx smaug setup to prepare directories and configuration. Bird needs valid X session credentials (auth_token and ct0); the local config is gitignored, and AUTH_TOKEN and CT0 are available as environment variables. Verify a small fetch and processing run before scheduling larger batches with cron or PM2. The archive runs on your host, but fetching requires network access and inference may run with a hosted provider.
Version 0.3.0 added folder support and Claude token accounting. Version 0.3.1 fixed parsing of Bird v0.6.0 paginated JSON, replaced curl with native fetch for Windows compatibility, and added a setup warning for credentials. Treat pagination support as a separate compatibility check: the fetch --all instructions call for a Git build of Bird, so do not assume that the parser fix makes every published Bird build suitable for backfills.
dayjs as its only declared runtime package dependency; Bird and the AI CLI are separate prerequisites.t.co links and gathers GitHub repository metadata and READMEs, article text, and quote or reply context.bookmarks.md index links to Markdown notes under knowledge/tools/ and knowledge/articles/; pending work and state use JSON files.-t reports Claude token usage, cache activity, and estimated cost; v0.3.1 adds native fetch for Windows compatibility and fixes Bird v0.6.0 paginated JSON handling.Individuals or small teams that routinely save links on X and want searchable, editable Markdown notes with source context and configurable filing.
You only need a repeatable list of URLs, cannot share bookmark content with the chosen inference backend, or need a fully offline workflow or built-in media transcription.
Quick Start & Installation
# 1. Install bird CLI (Twitter API wrapper) # See https://github.com/steipete/bird for installation # 2. Clone and install Smaug git clone https://github.com/alexknowshtml/smaug cd smaug npm install # 3. Run the setup wizard npx smaug setup # 4. Run the full job (fetch + process with Claude) npx smaug run
Comparison vs. Top Agents & Frameworks Alternatives
Full comparison →| Repository | Stars | 7d Trend | Stack | License | Core Positioning |
|---|---|---|---|---|---|
| smaug ★ | 956 | +3 | JavaScript | MIT | A Node.js CLI that turns X bookmarks and likes into an AI-curated Markdown archi |
| hermes-agent | 268.1k | +1.5k | Python | MIT | Self-hosted Python agent with persistent memory and automation across chat and C |
| n8n | 213.1k | +787 | TypeScript | — | Visual Node.js platform for self-hosted workflows and multi-step AI agents |
| TradingAgents | 124.7k | +709 | TypeScript | Apache-2.0 | A multi-agent CLI for source-cited financial research and reporting |
AI Context Briefing (for Claude / Cursor / Windsurf)
Standardized architecture summary & quickstart commands ready to paste into coding agents.
curl -sL https://repoforai.com/repo/alexknowshtml/smaug.md
Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).
Frequently Asked Questions about smaug
Can I separate collection from AI processing?
npx smaug fetch 20 collects a small batch into the pending JSON file, and npx smaug process handles already-fetched items. The fetch step is useful for inspecting what Bird returns before invoking a model. Processing uses Claude Code by default; set cliTool to opencode to use OpenCode.Do I need a GPU or a fixed amount of VRAM?
Can a company self-host Smaug under the MIT license?
When is Smaug preferable to a basic bookmark export?
Upstream README & Documentation
This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.
Top 10 Breakout Open-Source AI Repos, Every Thursday
Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.
Zero spam · 1-click unsubscribe · Privacy Policy