← Volver al Journal
· 4 min de lectura

SEO CLI Tools: Run Keyword Research from Your Terminal

Browser-based SEO tools waste your time with dashboards you don't need. Here's how to do keyword research, SERP analysis, and site audits entirely from the command line — faster, scriptable, and free.

If you’re a developer, you already know the terminal is the most efficient interface for repetitive work. Yet most SEO tools force you into a browser: log in, click through dashboards, export CSVs, re-upload to spreadsheets. Every step is manual.

SEO doesn’t have to work that way. Every part of the SEO workflow — keyword research, volume lookup, difficulty scoring, site auditing, rank tracking — can run from the command line. Faster, scriptable, composable.

Here’s the developer’s guide to SEO from the terminal.

Why CLI Over Web Apps

Speed. No page loads, no JavaScript rendering, no waiting for dashboards. A keyword expansion that takes 30 seconds in a browser takes 2 seconds in the terminal.

Scriptability. CLI tools output text. You can pipe it, redirect it, schedule it with cron, or chain it into pipelines:

# One-liner: discover → volume → filter
python3 -m zens_ink.keyword_research "astro seo" --expand | \
  python3 -m zens_ink.keyword_volume --stdin --api-key $BING_KEY | \
  awk -F',' '$2 > 50 {print $1}'

Try doing that in Ahrefs.

Composability. Each tool does one thing well. Combine them however you want. Need keyword research + SERP analysis + clustering? Pipe them together. Need just volume? Run one command.

No account, no subscription. The tools we’ll cover are open source. No login, no trial expiration, no credit card.

Agent-friendly. CLI tools with a SKILL.md file can be invoked by AI agents directly. Claude Code, Cursor, Windsurf — they can all run SEO workflows without you touching a keyboard. See our SEO workflow pipeline guide for the full automation setup.

The Core Toolkit

keyword_research — Autocomplete Mining

# Basic: get Google Autocomplete suggestions
python3 -m zens_ink.keyword_research "seo tools"

# Expand: recursive A-Z expansion
python3 -m zens_ink.keyword_research "seo tools" --expand -o keywords.txt

Output goes to stdout (pipeable) or a file with -o. Each suggestion is a real Google Autocomplete result — actual search terms, not database estimates.

keyword_volume — Search Demand

# Check volume for specific keywords
python3 -m zens_ink.keyword_volume \
  --keywords "seo audit,free seo tools,python seo" \
  --api-key YOUR_BING_KEY

# Bulk: read keywords from a file
python3 -m zens_ink.keyword_volume \
  --from-file keywords.txt \
  --api-key YOUR_BING_KEY \
  -o volumes.csv

Uses Bing Webmaster API (free, actual search counts). Output is CSV: keyword,volume. Pipe it into any tool.

kd_analysis — SERP Difficulty

# Analyze ranking difficulty for a keyword
python3 -m zens_ink.kd_analysis "python seo script" \
  --serp-api-key YOUR_SERPER_KEY \
  --json

Reads the actual SERP for the keyword, analyzes homepage ratio, platform density, domain authority profile, and content match. Outputs a difficulty assessment (Easy/Medium/Hard) with reasoning.

For the methodology, see our SERP analysis guide.

site_audit — Technical SEO

# Full site audit
python3 -m zens_ink.site_audit https://example.com \
  --output audit-report.md

# Specific checks only
python3 -m zens_ink.site_audit https://example.com \
  --checks meta,sitemap,links

Checks 30+ SEO items including meta tags, canonical URLs, sitemap integrity, broken links, schema markup, image alt text, mobile signals, and robots.txt.

For Astro-specific audit tips, see our Astro SEO Audit guide.

competitor_gap — Content Gap Analysis

# Compare your site to a competitor
python3 -m zens_ink.competitor_gap \
  --yours https://yoursite.com/sitemap.xml \
  --compare https://competitor.com/sitemap.xml

Reads both sitemaps, identifies topics your competitor covers that you don’t, and outputs a gap report. See the content gap analysis guide.

Building a One-Command Pipeline

The real power of CLI tools is chaining them. Here’s a complete keyword research pipeline in one command:

#!/bin/bash
# seo-pipeline.sh — Full keyword research in one script

SEED="$1"
BING_KEY="$2"
SERPER_KEY="$3"

# 1. Expand seeds
python3 -m zens_ink.keyword_research "$SEED" --expand > raw_keywords.txt

# 2. Get volumes
python3 -m zens_ink.keyword_volume \
  --from-file raw_keywords.txt \
  --api-key "$BING_KEY" > with_volume.csv

# 3. Filter: keep keywords with volume > 50
awk -F',' '$2 > 50 {print $1}' with_volume.csv > promising.txt

# 4. Score difficulty for each
while read kw; do
  python3 -m zens_ink.kd_analysis "$kw" --serp-api-key "$SERPER_KEY" --json
  echo ""
done < promising.txt > difficulty_report.json

echo "Done. Reports saved."

Run it:

./seo-pipeline.sh "python seo" $BING_KEY $SERPER_KEY

This replaces an entire Ahrefs workflow: keyword discovery, volume lookup, difficulty scoring — all in one script, all free, all from the terminal.

Comparison: CLI vs Web Tools

FeatureAhrefs/SemrushZensInk CLI
Keyword discovery✓ (from their DB)✓ (from Google live)
Search volume✓ (Google estimates)✓ (Bing actual counts)
Difficulty score✓ (DR-based)✓ (SERP structure-based)
Site audit✓ (visual dashboard)✓ (markdown report)
Price$229-$249/moFree
Scriptable
AI agent compatible✓ (SKILL.md)
Works offline✓ (most tools)
Learning curveMedium (UI navigation)Low (if you know terminal)

AI Agent Integration

Every CLI tool in the toolkit ships with a SKILL.md — a structured instruction file that tells AI agents how to use the tools. This means you can ask Claude Code, Cursor, or Windsurf to run SEO tasks:

“Audit my Astro site for SEO issues and give me a prioritized fix list”

The agent reads SKILL.md, runs the appropriate commands, and returns a structured report. No browser, no copy-pasting URLs, no manual export-import.

This is the future of SEO for developers: not another dashboard to check, but tools that integrate into your existing development workflow.

For the full agent workflow setup, see our SEO Workflow Pipeline guide and the open source tools list.

Getting Started

# Clone the toolkit
git clone https://github.com/respectevery01/zens-ink-seo-package.git

# No dependencies to install — pure Python stdlib
cd zens-ink-seo-package

# Run your first keyword research
python3 -m zens_ink.keyword_research "your niche" --expand

That’s it. No signup, no trial, no credit card. Just keywords, from the terminal, for free.

For the Pro version with workflow automation, keyword clustering, and GEO visibility checks, see the pricing page.

Want to run this analysis on your own site?

ZensInk Pro automates this pipeline. One command, from seed keywords to content plan.

Get Pro →