| name | mf |
| description | Use mf (metafunctor) to manage papers, projects, and content for the Hugo static site. Invoke for paper processing, project syncing, content linking, database queries, and backup operations. |
mf - Metafunctor Site Management
A CLI toolkit for managing the metafunctor.com Hugo static site. Syncs external sources (LaTeX papers, GitHub projects) to Hugo content.
Quick Reference
mf papers process path/to/paper.tex
mf papers sync
mf papers list
mf papers generate
mf papers fields
mf papers set <slug> <field> <value>
mf papers feature <slug>
mf papers tag <slug> --add <tag>
mf projects import --user queelius
mf projects refresh
mf projects generate
mf projects list
mf projects fields
mf projects set <slug> <field> <value>
mf projects feature <slug>
mf projects hide <slug>
mf projects tag <slug> --add <tag>
mf content match-projects
mf content about <project>
mf content list-projects
mf series list
mf series show stepanov
mf series sync stepanov
mf series sync stepanov --push
mf series add stepanov content/post/
mf series remove stepanov content/post
mf series scan
mf series fields
mf series set <slug> <field> <value>
mf series feature <slug>
mf series tag <slug> --add <tag>
mf backup list
mf backup status
mf backup rollback paper_db
mf config show
mf config set <key> <value>
mf analytics summary
mf analytics projects
mf analytics gaps
mf analytics tags
mf analytics timeline
mf analytics suggestions
mf integrity check
mf integrity fix --dry-run
mf integrity orphans
mf content audit --list-checks
mf content audit --extended
mf content audit --check required_fields,stale_drafts
Command Groups
| Command | Purpose |
|---|
mf papers | LaTeX paper processing and Hugo page generation |
mf projects | GitHub project import, metadata caching, content generation |
mf series | Content series management and sync with external repos |
mf content | Link Hugo content to projects via linked_project taxonomy |
mf analytics | Content analytics, insights, and relationship discovery |
mf integrity | Database consistency checking and repair |
mf backup | Database backup management and rollback |
mf config | Configuration management |
mf init | Initialize .mf/ directory structure |
mf claude | Manage this Claude Code skill |
Global Options
-v, --verbose - Enable verbose output
-n, --dry-run - Preview changes without making them
Project Structure
mf uses .mf/ directory for its data:
.mf/
paper_db.json # Paper metadata database
projects_db.json # Project overrides and settings
series_db.json # Series metadata and sync state
config.yaml # Configuration
cache/
projects.json # GitHub API cache (gitignored)
backups/
papers/ # Paper database backups
projects/ # Projects database backups
series/ # Series database backups
Key Concepts
Paper Database
Papers are tracked in paper_db.json with metadata like title, abstract, authors, tags, and source tracking (for LaTeX processing).
Project Database
Projects have two layers:
- Cache (
cache/projects.json) - GitHub API data, auto-refreshed
- Overrides (
projects_db.json) - Manual metadata like featured, hide, rich_project
Rich Projects
Projects marked rich_project: true get branch bundles with subsections:
content/projects/<slug>/_index.md (main page)
content/projects/<slug>/docs/_index.md
content/projects/<slug>/tutorials/_index.md
- etc.
Series Database
Series are thematic collections of posts tracked in series_db.json. Series can:
- Sync posts from external source repositories
- Track associations to papers, media, and external links
- Have landing pages in
content/series/<slug>/_index.md
Series with source_dir configured can sync posts bidirectionally:
mf series sync stepanov
mf series sync stepanov --push
Content Linking
Use linked_project taxonomy (NOT projects) to link posts to projects:
linked_project:
- "likelihood.model"
- "algebraic.mle"
Use series field to add posts to a series:
series:
- "stepanov"
- "the-long-echo"
Analytics & Insights
The analytics commands help understand content-project relationships:
mf analytics summary - Get a complete overview of your site's content relationships
mf analytics gaps - Find projects that need more content coverage
mf analytics suggestions - Discover content that mentions projects but doesn't link to them
Use analytics when you want to:
- Identify projects that lack documentation/posts
- Find opportunities to link existing content to projects
- Understand tag usage patterns and content velocity
Database Integrity
The integrity commands ensure database consistency:
mf integrity check - Validates all databases for consistency issues
mf integrity fix - Auto-fixes safe issues (stale cache, orphaned sync state)
mf integrity orphans - Finds database entries without content files
Run mf integrity check periodically (e.g., weekly) to catch issues early. Common issues:
- Cache entries for deleted projects
- Sync state referencing removed posts
- Missing content files for database entries
Extended Content Audit
The extended audit system provides pluggable content quality checks:
mf content audit --list-checks
mf content audit --extended
mf content audit --check required_fields --severity error
Available checks include:
required_fields - Validates required front matter
date_format - Checks date field formats
stale_drafts - Finds drafts older than threshold
- And more (use
--list-checks to see all)
Tips
- Always use
--dry-run first to preview changes
- Run
mf backup status to check backup health
- Run
mf integrity check periodically to catch database issues
- Use
mf analytics gaps to find content opportunities
- Use slugs not paths in taxonomy fields
- Validate before committing:
hugo --gc --minify
Additional Resources