SEO CLI Tool

Keyword research, difficulty scoring, technical audits and rank tracking from a terminal. One Python package, 22 commands, MIT licensed, no key required for the core workflows. The output is a file you keep, not a dashboard you rent.

Install

pip install zens-ink
zens-ink --help

Nothing else to install: the package is pure Python standard library. Python 3.10 or newer. The same tools are on GitHub and ship an MCP server, so an agent can drive them without shell access.

What you actually run

Five commands cover the loop most people need. All output below is real, not illustrative.

1. Find the words

python3 -m zens_ink.keyword_research "seo audit"

Expands a seed through Google Autocomplete, groups the completions, and flags which ones your own site already ranks for. No key, no quota.

2. Score how hard the SERP is

python3 -m zens_ink.kd "seo cli tool"
┌─ KD Analysis: seo cli tool
│  Score: 19.8/100  [Very Easy]
│  SERP Structure:
│    Homepages: 2/10  |  Dedicated: 8/10  |  Inner: 0/10
│    Weak domains (top5): 3  |  Weak domains (total): 5
│  Link Budget (est. referring domains to enter top-10):
│    Editorial (quality links): ~28 (17–42)
│    Directory  (easy links):  ~97 (58–145)
│  Top 10 Breakdown:
│     1. github.com            dedicated  A≈0.94
│     2. www.reddit.com        dedicated  A≈0.90
│     3. claude-seo.md         homepage   A≈0.35 [HOME]
│     4. seocrawl.ai           dedicated  A≈0.35
│     5. geofflambeth.com      dedicated  A≈0.49 (2019)
└──────────────────────────────────────────────────────────────

Difficulty here is read from the SERP itself: what kind of pages rank, how old the domains are, whether the niche is mature. It is a different question from "how many links does the top result have", and on long-tail words it disagrees with the paid scores often enough to be useful.

3. Audit the build

python3 -m zens_ink.site_audit --dist dist --sitemap dist/sitemap.xml

Points at your build output, not a live URL, so it sees exactly what you are about to ship and nothing else. 33 checks: broken internal links, redirect chains, orphan pages, missing or wrong canonicals, titles and meta descriptions, H1 structure, image alt text, hreflang reciprocity, JSON-LD field depth, sitemap coverage, staging subdomains leaking into production, and whether your robots.txt blocks the AI crawlers that matter. --base /en scopes it to one language tree; --format json makes it a CI gate.

4. Track positions without a subscription

python3 -m zens_ink.rank_tracker add example.com "seo cli tool"
python3 -m zens_ink.rank_tracker check

Positions live in a local SQLite file with history, so a cron entry gives you a rank log you own. One check per day is enough; the file is small and diffable.

5. Read Search Console like a data source, not a dashboard

python3 -m zens_ink.search_performance --queries --limit 100

Pulls queries and pages through the GSC API and prints them as rows: impression, click, CTR, position. Export JSON and you can diff two periods yourself, which is the only decay signal worth acting on.

The 22 tools

Grouped by what they answer, not by what they are called:

  • Demand — keyword_research, keyword_volume (Bing), brave_volume, keyword_cluster, search_intent, serp_intent, kgr_auto
  • Difficulty — kd (SERP structure), domain_rating (Ahrefs free DR), geo_fanout
  • Audit — site_audit, onpage_audit, broken-link checking inside site_audit, ai_crawler_audit, llms_gen, content_qc
  • Gap — competitor_gap (sitemap comparison), reddit_blueocean
  • Measure — search_performance (GSC), rank_tracker, setup_gsc
  • Ops — mcp (serve every tool to an agent), config

Why a CLI instead of another dashboard

Three reasons that matter, and one that does not.

It composes. A dashboard gives you its own idea of a report. A command gives you text you can grep, diff, commit, or feed to an agent. The useful SEO work I do is mostly comparing two states of the same site over time, and that is a job for files.

It runs where the work happens. Nightly audits in cron, a build that fails when a link dies, a rank snapshot before you write the weekly post. None of that needs a login.

It is inspectable. Every score is a documented rule, not a model output. When the difficulty score says 19.8 you can read why: homepages 2/10, weak domains in the top five, and a niche whose sites average eight years old.

The reason that does not matter: "CLI is cooler". If you want a hosted crawler with a shared backlink index and a support desk, buy one. This is a different trade.

What it does not do

No shared backlink index. No historical keyword database. No rank grid for 500 keywords across 20 locations. For your own domain's backlinks the honest source is your Search Console export; for competitors, the Common Crawl graph is a floor, not the truth. The Pro package adds the off-page layer, GSC-driven winability and portfolio reporting, and it still runs locally.

Start

pip install zens-ink
python3 -m zens_ink.kd "your keyword"

Docs for every command: /docs/. Source and issues: ZensInk/zens-ink-seo-package. If you want the workflows behind these commands written out, start with keyword research without Ahrefs, auditing a static site with Python and the hreflang audit.

FAQ

What is an SEO CLI tool?
A command-line program that does SEO work from your terminal instead of a web dashboard: keyword research, difficulty scoring, site audits, rank tracking, Search Console analysis. Because the output is text and the input is a shell command, you can pipe it into files, run it in cron, or call it from an AI agent.
Is zens-ink really free and open source?
Yes. The CLI is MIT licensed, installs from PyPI with pip install zens-ink, and uses only the Python standard library, so there is nothing else to install. The 22 core tools are free forever. A separate Pro package adds GSC-driven winability, content radar, competitor radar and the recon suite; the free CLI stays free and the Pro package imports it.
Do I need API keys to use it?
No for the core tools. Keyword discovery uses Google Autocomplete (no key), site audits fetch pages directly, and the audit checks (broken links, orphan pages, canonicals, hreflang, JSON-LD, robots.txt for AI crawlers) never touch a paid API. Keys are optional and only unlock specific data: SERPER_API_KEY for SERP-based difficulty, BING_API_KEY for search volume, Google ADC for Search Console.
How is it different from a web SEO platform?
A web platform owns the crawl and the queries, so you rent the answer. A CLI runs on your machine against pages you choose, produces files you keep, and can be scheduled or scripted. The trade is real: no shared backlink index, no historical rank database, no support desk. It is a tool for people who want the data in a file, not a dashboard.
Can I run it on a schedule or in CI?
That is the point. Every command is non-interactive and writes plain text or JSON, so a cron entry or a GitHub Action can run an audit nightly, fail the build on new broken links, or archive a rank snapshot every morning. Exit codes are meaningful, and missing keys degrade to skipping a data source rather than failing the run.
Does it work for Chinese sites?
Yes. content_qc counts CJK characters, keyword_cluster parses Chinese CSV exports, and the audit checks run on any HTML regardless of language. The same commands accept --zh on the tools that use language or geo parameters (difficulty and SERP tools).