SEO analysis tool for Ghost blogs - like Yoast but for the command line
A powerful CLI tool that analyzes web pages for SEO best practices, providing actionable feedback with a color-coded scoring system.
12 Comprehensive SEO Checks:
- ✅ Keyword in title and first paragraph
- ✅ Title and meta description optimization
- ✅ Keyword density analysis (0.5%-2.5%)
- ✅ URL slug optimization
- ✅ Heading structure validation (single H1, proper hierarchy)
- ✅ Internal links (minimum 2 recommended)
- ✅ Outbound links to authoritative sources
- ✅ Image alt text with keywords
- ✅ Content word count (300+ words minimum)
- ✅ Favicon presence
Color-Coded Results:
- 🟢 Green (10 pts): Perfect - no action needed
- 🟡 Amber (5 pts): Good - could be improved
- 🔴 Red (0 pts): Issues found - needs attention
# Clone the repository
git clone https://github.com/deanhume/ghoast.git
cd ghoast
# Install dependencies
npm install
# Link globally to use the 'ghoast' command
npm linknpm install -g ghoastRun the tool by providing a URL:
ghoast https://deanhume.com/your-blog-post/You'll be prompted to enter a focus keyword:
Focus keyword: performance optimization
The tool will then fetch the page, analyze it, and display results:
SEO Analysis for: https://deanhume.com/your-blog-post/
Keyword: "performance optimization"
✔ Keyword in Title: Title contains "performance optimization".
✔ Title Length: Title is 58 chars — good.
✔ Meta Description: Meta description is 145 chars and contains "performance optimization".
● Keyword in First Paragraph: First paragraph doesn't contain "performance optimization". Try to introduce it early.
✔ Keyword Density: Keyword density is 1.2% (15 occurrences) — good.
...
──────────────────────────────────────────────────
SEO Score: 85/100
──────────────────────────────────────────────────
2 check(s) need attention.
The tool checks against these industry-standard SEO guidelines:
- Keyword Density: 0.5% - 2.5% (avoid keyword stuffing)
- Title Length: 50-60 characters (prevents truncation in search results)
- Meta Description: 120-158 characters
- Word Count: Minimum 300 words (500+ recommended)
- Headings: Single H1 tag containing focus keyword, proper hierarchy
- Links: At least 2 internal links, include outbound links to sources
- Images: Alt text on all images, keyword in at least one
- URL Slug: Short (<75 chars) and contains focus keyword
ghoast/
├── index.js # Main CLI entry point
├── src/
│ └── checks.js # SEO check functions
├── package.json
└── README.md
- Create a new function in
src/checks.js:
export function checkNewFeature($, keyword) {
// Your logic here
return { name: 'Check Name', status: 'green|amber|red', message: 'Result message' };
}- Import and add to the results array in
index.js:
import { checkNewFeature } from './src/checks.js';
const results = [
// ... existing checks
checkNewFeature($, keyword),
];# Without npm link
node index.js https://example.com
# With npm link
ghoast https://example.comContributions are welcome! Feel free to submit issues or pull requests.
ISC
Built by Dean Hume
Note: This tool is designed for Ghost blogs but works with any web page. It provides suggestions based on common SEO best practices - use your judgment for your specific content strategy.