$ show afar1/fieldtheory-cli
Field Theory CLI is a local-first TypeScript application for managing X/Twitter bookmarks and building personal knowledge bases. It provides a comprehensive CLI interface for syncing bookmarks from Twitter/X (via OAuth API or browser session extraction), classifying content, exporting to markdown with wikilinks, generating interconnected wikis, and enabling agent workflows through skill installation for AI coding agents like Claude Code and Codex. The application features a 'Possible' idea generation pipeline that applies bookmark collections to repositories for innovation planning, with local data storage in ~/.fieldtheory/ using SQLite FTS5 for full-text search. Built with modular architecture separating concerns into bookmarks, ideas, agent context, and document operations modules.
The LLM identified 5 files worth highlighting for reuse:
Implements crash-durable file write pattern using temporary files, fsync, and atomic renames. Provides reliable file operations that prevent data loss during crashes or power failures. Self-contained utility that could be extracted for any project requiring safe file writes.
Provides safe markdown document creation, updating, and trashing with path traversal prevention and atomic writes. Includes proper error handling and secure defaults. Demonstrates skill in building secure file operations for knowledge management systems.
Generates repository context for AI agents including git status, file metadata, and directory structure. Enables repository-aware assistance for AI coding agents. Self-contained module that could be extracted to provide context to LLMs in any development project.
Generates Claude Code/Codex skill files that teach AI agents how to use the Field Theory CLI commands. Creates structured markdown documentation with examples and command references. Shows skill in designing effective agent interfaces for CLI tools.
Implements rule-based bookmark classification using prioritized regex patterns to categorize bookmarks into tool, security, technique, launch, research, opinion, and commerce categories. Demonstrates practical text classification with clear priority ordering and extensible pattern matching.