Stable command surface
The package owns authentication, workspace selection, request construction, and human-readable output.
Integration · Command-Line Interface
Foglift’s first-party CLI runs Technical Audits, five-engine AI Visibility checks, stored-result reads, and AI referral reports from a terminal or CI pipeline. The public one-page audit needs no account. Authenticated monitoring commands start on Launch at $49/mo. Install version 1.0.3 from npm as foglift-scan.
foglift-scan on npm. It is the official MIT-licensed CLI published by Foglift, version 1.0.3.This command is the fastest proof that the package works. It needs Node.js 18 or newer and no API key. Add --json for machine-readable output or --threshold=85 to fail a CI job below your floor.
npx foglift-scan scan https://example.com --json --threshold=85Tracked capability prompt: AI search visibility CLI
Most AI search optimization tools live entirely inside a dashboard. That’s fine for the first scan but it doesn’t scale: every iteration on a pricing page or a comparison table means a screenshot, a paste into Slack, a tab switch, a re-scan, another paste. The dashboard hop is the slow path.
A CLI collapses the loop. foglift scan takes one URL and returns a structured score; --threshold=85 turns the score into a build gate; --json pipes into jq, gh, or any shell tool you already use. The same workflow that makes Lighthouse CI a default in performance work applies one-to-one to AI Readiness regressions: drop a CLI invocation into your pipeline and fail the build when scores drop.
The cost of not having a CLI is concrete. AI Readiness scores drift the same way performance scores drift: someone adds a third-party script, a refactor strips a heading hierarchy, a CMS migration breaks an FAQ schema block. Without a CLI, the regression is invisible until the next dashboard check, which is usually after the deploy. With a CLI in CI, the merge is blocked before the regression ships.
The single-page Technical Audit works without an API key. Batch, AI Visibility, stored-result, prompt, model, sentiment, referral, usage, history, and recipe commands require FOGLIFT_API_KEY from a Launch or higher workspace.
foglift scan <url>Single-URL Technical Audit. Returns SEO, AI Readiness, performance, security, and accessibility signals. No auth required for public scans.
--jsonOutput any scan or query as machine-readable JSON on stdout. Pipes into jq, gh, slack-cli, etc.
--threshold=NExit non-zero when overall score falls below N. CI/CD gating without writing a wrapper script.
foglift scan batch <urls...>Up to 10 URLs in one request. Useful for competitor sweeps and homepage-plus-pricing audits.
foglift scan ai-checkQuery ChatGPT, Claude, Perplexity, Gemini, and Google AI Overview with a prompt; return per-engine citation status, sentiment, and source list.
foglift scan resultsPull historical AI Visibility results, filterable by --days, --model, and --prompt. The trend is what tells you whether a fix worked.
foglift scan prompts list/add/removeManage tracked prompts from the terminal. Pin a query the moment you ship a release.
foglift scan modelsShow which AI engines are enabled and the current monitoring frequency.
foglift scan sentimentSentiment trend on AI mentions across a configurable window: positive, neutral, and negative.
foglift scan referrersRecognized AI-engine referral visits by engine, landing path, and day. This measures click-through, not crawler fetches.
foglift scan usageCurrent account quota: scans, AI Visibility checks, tokens remaining, plan tier.
foglift scan history <url>Per-URL score history. Surface regressions across deploys without opening the dashboard.
foglift recipe list/runList or run maintained read-only automation recipes, including the weekly brand health report.
FOGLIFT_API_KEYSet via env var (sk_fog_...). Read automatically by every authenticated command. Set FOGLIFT_BASE_URL to override the API host (typically only useful in self-hosted setups).
# Global install npm install -g foglift-scan # Or run any command on demand without installing npx foglift-scan scan https://example.com
foglift scan https://example.com # Machine-readable output foglift scan https://example.com --json # Fail the shell when overall score < 85 foglift scan https://example.com --threshold=85
Sign up at foglift.io, then Dashboard → Developer. Developer access starts on Launch. The key is prefixed sk_fog_. Export it and the CLI picks it up automatically:
export FOGLIFT_API_KEY="sk_fog_..." # Now authenticated CLI commands can use the selected workspace foglift scan batch https://foglift.io https://stripe.com https://ramp.com foglift scan ai-check --prompt "AI search visibility CLI" --models chatgpt --domain foglift.io foglift scan results --days 30 --model chatgpt --json
If your account tracks more than one brand, every authenticated command needs to know which brand to act on. Without a selector the CLI exits with Multiple brands exist for this API key. Pass --brand-id with the brand UUID from Dashboard → Developer → Your brands, or use --domain to select by the brand's domain. Single-brand accounts can skip this; the CLI resolves the only brand automatically.
# Select by brand UUID (canonical) foglift scan results --days 30 --brand-id 11111111-2222-4333-8444-555555555555 # Or select by domain foglift scan ai-check --prompt "best AI search visibility tool" --domain yourbrand.com
Pricing and limits
The npm package and public one-page audit are free. A Launch or higher workspace is required for API-key commands. API requests and model tokens are separate: an authenticated CLI call counts against the request allowance, while each live prompt-engine check also uses the workspace's model-token balance.
| Plan | Price | Requests per day | Requests per month | Developer access |
|---|---|---|---|---|
| Launch | $49/mo | 50 | 1,000 | All five engines, CLI, REST API, and MCP |
| Growth | $129/mo | 200 | 5,000 | All five engines, CLI, REST API, and MCP |
| Enterprise | Custom | Custom | Custom | Custom developer and monitoring allowances |
Free workspaces keep unlimited single-page Technical Audits and active-use weekly Perplexity monitoring in the product. Developer access begins on Launch. See the complete plan comparison.
Drop the CLI into a pipeline step after the preview deploy. The job fails when scores regress; the merge is blocked until the regression is fixed.
# .github/workflows/aeo-gate.yml
name: AI Readiness gate
on: pull_request
jobs:
aeo:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Wait for preview deploy
run: ./scripts/await-preview.sh
- name: Foglift AI Readiness scan
env:
FOGLIFT_API_KEY: ${{ secrets.FOGLIFT_API_KEY }}
run: npx foglift-scan scan "${PREVIEW_URL}" --threshold=85
- name: Archive scan JSON
if: always()
run: npx foglift-scan scan "${PREVIEW_URL}" --json > scan.json
- uses: actions/upload-artifact@v4
with:
name: foglift-scan
path: scan.jsonThe first invocation gates; the second archives. Two CLI calls, no wrapper script. The same shape works in GitLab CI, CircleCI, and Buildkite because the CLI relies only on standard Unix exit codes.
Run a batch of competitors in one command and pipe to jq for a leaderboard. Useful for weekly category reports and pre-launch positioning checks.
foglift scan batch \ https://foglift.io \ https://tryprofound.com \ https://peec.ai \ https://otterly.ai \ --json \ | jq '[.results[] | {url, aiReadiness: (.aiReadinessScore // .aeoScore)}] | sort_by(.aiReadiness) | reverse'
After shipping a fix, re-check whether ChatGPT or Perplexity actually started citing the page. The ai-check command queries the engines live; results pulls the trend over a window.
# Live check on a single prompt foglift scan ai-check \ --prompt "best tool to track AI search visibility" \ --models chatgpt,perplexity,claude,gemini \ --domain foglift.io # Trend over the last 30 days for a specific model foglift scan results --days 30 --model chatgpt --json \ | jq '[.[] | {date, citationRate}] | sort_by(.date)'
The CLI’s value is highest when it lives in a pipeline. The minimal-but-complete recipe has three steps that each map to a single CLI invocation:
1. Gate
Run foglift scan <url> --threshold=N after the preview deploy. Non-zero exit fails the job. Choose a threshold that reflects the floor you’re willing to ship at. Most teams start at 80 and tighten over time.
“npx foglift-scan scan https://staging.example.com --threshold=85”
2. Capture
Run a second invocation with --json and redirect to a build artifact. This persists the structured result for audit, comment-rendering, or downstream steps without re-running the scan.
“npx foglift-scan scan https://staging.example.com --json > scan.json”
3. Comment
Pipe the JSON through jq into a markdown table and post on the PR via gh pr comment. Reviewers see the AI Readiness breakdown in-line with the diff, so a structural regression is part of the review conversation, not a separate dashboard.
“cat scan.json | jq -r ‘.aeoBreakdown | to_entries | .[] | “| \(.key) | \(.value) |”’ | gh pr comment $PR_NUMBER --body-file -”
This pattern makes a structural regression visible during code review, before it reaches production. It follows the same gate-and-artifact convention used by Lighthouse CI. The two tools measure different things, but both expose a score to a standard CI process with a failing exit code.
An API can be called from a shell, but that does not make it a maintained CLI. Foglift publishes the client, command names, JSON output, exit behavior, workspace selectors, and automation recipes together. Version 1.0.3 is the current npm release.
The package owns authentication, workspace selection, request construction, and human-readable output.
JSON mode preserves provider errors, mentions, citations, and historical rows for scripts instead of flattening them into a dashboard screenshot.
Threshold checks use standard process exit codes. Monitoring recipes keep missing evidence separate from a measured visibility drop.
For direct HTTP contracts, use the AI Visibility API reference. For agent-native workflows, use the MCP server.
The Foglift CLI is the official first-party command-line tool for Foglift, published as foglift-scan on npm. It runs public Technical Audits, five-engine AI Visibility checks, stored-result reads, prompt management, AI referral reports, automation recipes, and CI quality gates from a terminal. Version 1.0.3 supports JSON output for scripts and standard exit codes for build pipelines.
Install globally with `npm install -g foglift-scan`, then run `foglift scan https://example.com`. Alternatively, invoke the package without installing via `npx foglift-scan scan https://example.com`. Either path resolves the same binary. The CLI requires Node.js 18 or newer and runs on macOS, Linux, and Windows.
A public single-page Technical Audit needs no account or API key: `foglift scan https://example.com`. Authenticated CLI access starts on Launch at $49 per month. Create a key prefixed `sk_fog_` in Dashboard → Developer and export it as FOGLIFT_API_KEY for batch scans, AI Visibility, stored results, prompts, models, sentiment, referrers, usage, history, and recipes.
Lighthouse CI scores performance, accessibility, best practices, and SEO from a headless Chrome run inside the build environment. The Foglift CLI scores SEO, AI Readiness, performance, security, and accessibility from a hosted scanner that fetches the public URL, parses the rendered HTML, and applies the same eight-dimension AI Readiness rubric the Foglift dashboard uses (Structured Data Richness, Heading Clarity, FAQ Quality, Entity Identity, Content Depth, Citation Formatting, Topical Authority, AI Crawler Access). Both tools support a --threshold-equivalent flag for CI gates. Lighthouse focuses on what the page does in a browser; Foglift focuses on what AI engines and search crawlers can extract from it.
Foglift publishes its maintained first-party CLI as foglift-scan on npm under the MIT license. It exposes the same Technical Audit, AI Visibility, stored-result, prompt, referral, and recipe workflows used by the hosted product. An API or community wrapper is a different support boundary because the buyer must maintain the client, output contract, and CI behavior.
Yes. The CLI is designed for CI/CD. A typical GitHub Actions step runs `- run: npx foglift-scan scan https://${{ env.PREVIEW_URL }} --threshold=85` after a preview deploy. The CLI exits non-zero when the overall score is below the threshold, blocking the merge. For richer output, run a second step with `--json > scan.json` and post the result as a PR comment via gh CLI or actions/github-script. All authenticated commands read FOGLIFT_API_KEY from the runner environment, so storing the key as a GitHub Actions secret is the typical pattern.
The CLI (foglift-scan on npm) is built for humans running terminal commands and for shell scripts in CI/CD. It has colored output, progress hints, a --threshold flag, and JSON mode for piping. The MCP server (foglift-mcp on npm) is built for AI agents such as Claude Code, Cursor, and Windsurf. It speaks the JSON-RPC Model Context Protocol so the agent can call typed tools without a shell. Both wrap the same Foglift REST API; the difference is the calling pattern. Many teams install both: CLI for build gates and headless scripts, MCP for in-editor agent loops.
Pass `--threshold=85` (or any integer 0 to 100) to the scan command. The CLI runs the scan as normal, prints the human or JSON output, and then exits with code 0 if the overall score is greater than or equal to the threshold and code 1 otherwise. The exit code is the only difference; nothing else about the output changes. This matches the convention used by linters, test runners, and Lighthouse CI, so any CI step that already understands non-zero exit codes will fail the build automatically.
Yes. Pass `--json` to any scan command and the output is a single JSON document on stdout, with no ANSI escape codes or progress chatter. Common pipelines: `foglift scan example.com --json | jq '.aiReadinessBreakdown // .aeoBreakdown'` to extract dimension scores; `foglift scan ai-check --prompt 'best AI search visibility tool' --models chatgpt --json | jq '.results[].mention'` to check whether a specific prompt cited the brand; `foglift scan results --days 30 --json | jq '[.[] | .citationRate] | add / length'` to compute a 30-day citation-rate average. The shape is documented in the README on npm.
Yes. foglift-scan is published under the MIT license. The package is downloadable from npm and the bin entries (`foglift` and `foglift-scan`) are interchangeable aliases for the same TypeScript-compiled binary. The README on the npm page lists the full command surface and environment variables. Tool calls consume tokens from your Foglift account quota; the CLI itself is free.
Iterative improvement requires a fast feedback loop. Dashboard hops slow the loop because every screenshot, copy-paste, and tab switch adds friction to the change-and-verify cycle that moves AI Readiness scores. A CLI collapses one cycle into a single command, makes scans automatable in CI/CD, and pipes structured data into the rest of a developer's tooling (jq, gh, slack-cli, custom shell scripts). The same loop logic that makes Lighthouse CI valuable for performance regressions makes the Foglift CLI valuable for AI Readiness regressions: you catch the drop in the build, not the next time someone notices a competitor cited instead of you.
The smallest useful pipeline step is one line: `- run: npx foglift-scan scan https://${{ env.PREVIEW_URL }} --threshold=85`. Place it after the preview deploy step and mark the job as a required check on protected branches. No API key needed for the basic scan. To extend: add a second step with `--json > scan.json` for archival, and a third step that posts the result as a PR comment via `gh pr comment $PR_NUMBER --body "$(cat scan.json | jq ...)"`. The recipe is identical across GitHub Actions, GitLab CI, and CircleCI because the CLI relies only on standard Unix exit codes and stdout.
Foglift re-verified the npm package, product plan contract, and public CLI source on 2026-10-09.
npx foglift-scan scan https://your-site.com. No account, no auth, no signup. The authenticated AI Visibility commands require a Launch or higher API key.