All posts
Guide

The SearchFit Content CLI: From Scaffold to Sitemap

Walk through the SearchFit Content CLI end-to-end: scaffold, generate ideas, run AI content jobs, monitor status, and export sitemaps for answer engine

KKevin10 minutes read

Your brand can be invisible on ChatGPT, Perplexity, Gemini, and Claude while competitors get cited. Zero percent AI visibility isn't a future threat, it's today's traffic leak. The searchfit content cli gives operators a direct line from terminal to answer engine rankings. No dashboards, no point-and-click, just five commands that take you from an empty repo to a published, AI-visible sitemap.

This walkthrough assumes you're an SEO engineer or technical content lead who already tracks AI citation gaps. You've seen domains with thinner content appear in ChatGPT responses while your deeper guides sit on page two of Google. The fix isn't more word count, it's content shaped for the retrieval and ranking models that power generative engines. SearchFit's CLI automates that shaping at scale, using the same multi-agent architecture that powers the platform's parallel content generation. We'll go end-to-end with c:init, c:ideas, c:run, c:status, and c:sitemap.

SearchFit Prerequisites

You need three things before running the first command:

  1. A SearchFit account with an API key. The CLI authenticates via a SEARCHFIT_API_KEY environment variable. Generate one in the dashboard under Settings > API. Enterprises scaling custom AEO workflows can use scoped keys per environment.
  2. Node.js 20+ and npm 10+. The CLI ships as an npm package, so your version managers (nvm, fnm) should point to the latest LTS. Run node -v and npm -v to confirm.
  3. A content workspace. Ideally a git repo with at least a /content directory. The CLI writes markdown files, configs, and sitemaps here. If you're starting fresh, create an empty directory and cd into it.

Pro tip: If you manage visibility for multiple brands or clients, set up separate directories per project. The CLI respects the current working directory as the content root, so isolation is free.

Once your API key is exported (export SEARCHFIT_API_KEY=sk-...), you're ready to scaffold.

Step 1: c:init, Scaffold a Content Project

Run:

npx @searchfit/cli c:init

c:init writes a .searchfit/config.yml and a starter content skeleton in under thirty seconds. The config file registers your project's target engines (default: ChatGPT, Perplexity, Gemini, Claude, Grok, Google), the primary domain, and content output preferences. This is where you define:

  • Target engines and citation format. By default, the CLI optimizes for all six engines, but a B2B SaaS firm might drop Grok and double down on ChatGPT and Perplexity. The config accepts an engines array.
  • Content template. The scaffold includes a template.md with frontmatter fields (title, slug, metaDescription, targetKeywords, engineFocus) that every generated file will use. Change this once, and c:run respects it across all batches.
  • Sitemap settings. sitemap: keys define changefreq, priority, and lastmod behavior. More on that in step 5.

If you've ever scaffolded a site with the GitHub CLI or the Netlify CLI, this feels familiar: a single command, a predictable output, and a project ready for automation. SearchFit's version differs in that it seeds the config with AI-specific directives, citation tone, engine weightings, and the URL of your real-time citation monitoring endpoint for later use.

After the scaffold completes, you'll see:

✅ Initialized SearchFit content project in /my-brand
   Config: .searchfit/config.yml
   Template: .searchfit/template.md
   Output dir: ./content

Check the config file. If you want to adjust engine priorities, edit the engines block. For now, the defaults work.

Why Not Just Write Content Manually?

A common objection: "I'll just write optimized articles myself." Manual authoring breaks at scale. AI answer engines crawl and re-rank content differently than Google. They don't care about domain authority; they care about factual density, entity coverage, and response-pattern alignment. The SearchFit CLI's agent team, Researcher, Writer, Validator, Scorer, encodes those signals automatically. Manual content has none of that feedback loop.

Step 2: c:ideas, Generate Content Ideas That AI Engines Actually Cite

Keyword volume doesn't map to citation likelihood. A 50,000-search-volume keyword might never appear in a ChatGPT answer, while a niche long-tail phrase gets cited five times a day because it answers a specific query pattern. c:ideas bridges that gap by mining actual AI engine outputs for gaps your domain can fill.

Run:

npx @searchfit/cli c:ideas --domains yourdomain.com,competitor.com

Here's what the command does:

  1. It queries the SearchFit citation database, trillions of daily snapshots from ChatGPT, Perplexity, Gemini, Claude, and Grok, to find queries where your domain and up to three competitors are cited, under-cited, or absent.
  2. It cross-references those queries with the engine's known ranking signals (response structure, entity networks, citation freshness) to score idea viability on a 0-100 "Citation Potential" metric.
  3. It outputs a prioritized list of content topics (default 20) saved to .searchfit/ideas.json.

The --domains flag is optional but powerful. Include your top three competitors to uncover topics they're getting cited for that you aren't. This is the fastest way to build a content backlog with zero guesswork.

Sample ideas output:

[
  {
    "title": "How AEO Agents Validate Content Before Publishing",
    "citationPotential": 92,
    "engines": ["ChatGPT", "Perplexity", "Gemini"],
    "reason": "Competitor cited 3x daily; your domain absent"
  },
  ...
]

Warning: Don't treat citation potential as a guarantee. It reflects current engine behavior, which can shift. Reprioritize weekly by re-running c:ideas.

The ideas file feeds directly into the next step. You can edit it manually to add or remove topics, or pipe it straight into c:run.

This process mirrors how the SearchFit multi-agent orchestration identifies content gaps across clients. Agencies white-labeling AEO for multiple brands can script c:ideas per client directory, ensuring each backlog is engine-informed, not just keyword-informed. The Google SEO starter guide emphasizes user-centric topics; c:ideas extends that lens to answer engines.

Step 3: c:run, Generate Content at Scale, with Validation

This is where the heavy lifting happens. c:run takes your ideas and produces ready-to-publish markdown articles. It's not a thin wrapper around a language model; it's a multi-agent pipeline that researches, writes, validates, and scores every piece.

Basic invocation:

npx @searchfit/cli c:run

Full form with batch targeting:

npx @searchfit/cli c:run --ideas .searchfit/ideas.json --batch-size 5 --engine-focus chatgpt,perplexity --dry-run

Let's walk through each flag:

  • --ideas: Path to the ideas file (default: .searchfit/ideas.json). You can point to a different file to isolate a campaign.
  • --batch-size: Number of articles generated in parallel. The default is 3; max is 30. This leverages SearchFit's fan-out architecture to produce 30 articles in the time it used to take for one.
  • --engine-focus: Constrain generation to specific engines. Useful when you're chasing a citation lift on ChatGPT after a product update, while letting Perplexity and Gemini content coast.
  • --dry-run: Simulates the entire pipeline, research, drafting, validation, but writes nothing to disk. Use it to test your template and engine settings before committing.

Inside c:run, the agent team operates in lockstep:

  1. Researcher Agent pulls structured data from the SearchFit knowledge graph: entity relationships, competitor citations, engine-specific ranking signals. This isn't a web scrape; it's a query against persistent agent memory that's accumulated across your audits.
  2. Writer Agent produces the draft, adhering to the project's template and engine-focus constraints. It injects internal links and citations automatically, driven by an agent that understands your site's information architecture.
  3. Validator Agent audits the draft for factual errors, hallucinated stats, and style drift. This is the same autonomous content validation that catches issues before human review.
  4. Scorer Agent assigns a quality score (0-100) and an engine-specific citation likelihood. Only content scoring above an 80 threshold defaults to writing to disk; you can adjust this in .searchfit/config.yml under qualityGate.

Each article lands in ./content/ with frontmatter pre-loaded. The filename is the slug. Opening one, you'll see finished markdown, not a half-baked draft.

Pro tip: For high-stakes articles, set qualityGate: 90 and batch-size to 1. The slower path surfaces more validator feedback you can act on.

The Validation Difference

Most AI content tools stop at generation. They hand you a draft that might contain invented product details, wrong pricing, or confident-sounding nonsense. SearchFit's validation agent cross-checks claims against a trusted knowledge base, your product specs, documentation, and industry facts. It's analogous to what a senior editor does, but at machine speed. The architecture behind the agent team explains why this matters: answer engines penalize inconsistency. One hallucinated statistic can get your entire domain flagged as unreliable.

Step 4: c:status, Monitor Generation Jobs and Citation Uptake

c:status gives you real-time visibility into running and completed jobs. Run it with no arguments to get an overview:

npx @searchfit/cli c:status

Output:

Job: 1423 (batch 5/20)  ■■■■■■□□□□ 60%  |  Elapsed: 4m12s  |  ETA: 2m
  - Research: done
  - Write: done
  - Validate: running
  - Score: pending

Job: 1422 (batch 4/20)  COMPLETED  |  Score: 87  |  Wrote: ./content/aeo-validator-guide.md

Optionally, pipe it through watch for a live dashboard:

watch -n 10 'npx @searchfit/cli c:status'

This is critical when you're generating 30 articles via --batch-size 30. You'll want to see which articles scored low and need rework. The status command also surfaces the citation feedback loop: after articles are published and indexed, SearchFit's real-time citation monitoring API feeds back into c:status to show you which articles are getting cited on which engines. You'll see a CITED badge next to slugs that have appeared in answers.

npx @searchfit/cli c:status --show-citations

content/aeo-validator-guide.md  CITED (ChatGPT: 2x, Perplexity: 1x)

This closes the loop: you're not just generating content; you're tracking its real-world impact on AI search visibility. For agencies managing white-label dashboards, this data can be piped into internal client reports via the REST API or MCP server. Speaking of which, if you're deciding between the two, the SearchFit API vs MCP Server guide walks through the trade-offs. For most CLI users, the REST API is a simpler starting point.

When a job fails, network errors, validation rejection exceeding retries, c:status shows a red FAILED line with a summary. The CLI keeps logs in .searchfit/logs/ for debugging. Most failures are transient and resolve on a retry (c:run --retry-failed).

Step 5: c:sitemap, Export Sitemaps for Indexation and Crawl Analytics

Generated content is useless if engines can't discover it. c:sitemap builds an XML sitemap of all published content in your output directory and optionally posts it to Google Search Console and your robots.txt.

Run:

npx @searchfit/cli c:sitemap --output ./public

This produces sitemap.xml and a gzipped version. It respects the changefreq and priority settings from your config file. For AI-specific content, we recommend a daily changefreq during active campaigns and a priority of 0.8 (treating core product pages as 1.0).

The sitemap feeds into every search console. But AEO requires more than traditional crawl indexing, it requires showing answer engines that your content is fresh and well-structured. The CLI enhances the sitemap with:

  • <lastmod> pulled from file mtime, automatically updated each time you regenerate an article.
  • Engine-specific annotations (via <xhtml:link> and structured comment blocks) that indicate which engines the content was optimized for. While ChatGPT and others don't directly consume sitemaps, having this metadata in your indexation pipeline improves consistency across tools like Cloudflare's logs and analytics, which you can use to verify crawl frequency.
  • Integration with SearchFit's internal citation tracker, so when a URL gets cited, the sitemap's <lastmod> is updated to reflect that event, encouraging re-crawls.

After generation, you can automate uploads via tools like the GitLab CLI or Sanity's content CLI if you're using a headless CMS, or directly to your static host using the Netlify CLI. For teams using Contentful, its CLI can be part of a CI/CD pipeline that passes the sitemap through to CDN deployment.

Warning: Don't publish a sitemap before your content is live. The CLI checks that every URL in the sitemap returns a 200 over HTTPS. If it gets a 404 or redirect, it throws an error so you can fix deployment before search engines index broken links.

Run c:sitemap --validate to explicitly trigger a link-checking pass. This uses the same logic as Storyblok's content CLI validate command, a pattern common in headless CMS workflows.

From Sitemap to Citation

The full cycle works like this: you run c:init, generate ideas, run content, monitor status, and export a sitemap. That sitemap gets deployed. Within 48 hours, SearchFit's monitoring detects the first citations. You check c:status --show-citations, see the CITED badge, and know the command line produced revenue-attributable impact. No guessing, no hoping, just a measurable pipeline.

Pro Tips for Production Use

  • Use environment-specific configs. Clone .searchfit/config.yml to config.staging.yml and set --config flag for testing before promoting to production.
  • Commit IDEAS and sitemaps to git. Track your content strategy evolution. The .searchfit/ directory is small and diff-friendly.
  • Run c:ideas as a cron job. Weekly on Monday morning, pull fresh topics from the citation database. Pipe the results to your team's Slack via a simple webhook script.
  • Pair with the SearchFit MCP server for advanced queries during research. The 10 essential questions you can ask Claude via MCP will surface nuances that c:ideas might miss.
  • Monitor your quality gates. If you consistently see scores below 80, check that your template and engine focus align. The agent evolution post explains how the pipeline changes over time to reflect engine updates.

Summary and Key Takeaways

The SearchFit Content CLI operationalizes answer engine optimization at the command line. In five steps, you:

  1. Initialize a content project tuned to the engines that matter.
  2. Generate ideas grounded in actual citation data, not keyword volume fiction.
  3. Run multi-agent content generation with autonomous validation and scoring.
  4. Monitor job health and citation uptake in real time.
  5. Export sitemaps wired for AI engine discovery and re-crawl signals.

What used to take a content team weeks, researching, outlining, drafting, fact-checking, and publishing for six engines simultaneously, now runs in minutes per article. The CLI doesn't replace SEO strategy; it amplifies it by handling the mechanical work of making content engine-ready. You focus on the editorial vision; the agents handle the formatting, internal linking, entity optimization, and validation.

Start with npx @searchfit/cli c:init and a single idea from c:ideas --domains yourdomain.com. Measure the citation lift within two weeks. If you see zero change, revisit your quality gates, engine focus, and template. But more likely, you'll start appearing in answers where you were absent, and that's when the true value of a command-line content factory becomes obvious.

Get SearchFIT Weekly

What we are learning about getting brands cited in AI search, in your inbox every week. Unsubscribe any time.