Quick Start

Configure GTM Toolkit, add your first piece of content, and ship the baseline SEO workflow.

1Initialize Your Project
Run the interactive CLI to create your configuration
# Initialize GTM Toolkit
npx gtm-toolkit init --framework nextjs
✓ Answer prompts for site metadata, analytics, and content paths
✓ Writes gtm.config.js to the repository root
✓ Installs framework-specific helpers unless --skip-install is set
Framework detection: auto-detects Next.js/Nuxt/Astro if present.
Analytics: prompts for GA4/PostHog IDs when enabled.
Robots: tracks whether AI crawlers should be allowed.
Content location: defaults to content but is customizable.
2Prepare Your First Post
Add a markdown draft that the linter can validate
# content/blog/2024-12-25-my-post.md
---
title: "How GTM Toolkit Keeps Our Content Honest"
date: 2024-12-25
category: "playbooks"
summary: "A five-minute walkthrough for validating markdown content with GTM Toolkit before it hits production."
readTime: "6 min read"
---

# Introduction

Your primary keyword should appear in the first 100 words...
3Validate SEO Compliance
Run the lint command and unblock any failing rules
# Lint your content
npx gtm-toolkit lint content/blog --format console --fail-on-error
🔍 Example output
✓ content/blog/2024-12-25-my-post.md (94.0%)
errors: 0 | warnings: 1 | passed: 47
- [warning] SEO-012: Consider adding the focus keyword to your introduction.
Rule Coverage
50+ guard rails enforced
Readable Reports
Console or JSON output
AI Ready
Copy prompts into your local assistant for deeper analysis
4Generate SEO Files
Create robots.txt, sitemap.xml, and optional meta scaffolding
# Generate all SEO assets
npx gtm-toolkit generate --all
✓ Writes public/robots.txt using your AI bot preferences
✓ Builds public/sitemap.xml from static routes + markdown content
✓ Adds a meta tags template when --meta is passed
robots.txt mirrors the allowAIBots flag from gtm.config.js.
sitemap.xml includes the five default static routes plus every markdown file under content.
meta template is a stub for teams that manage metadata in code.
5Optional Local AI Analysis
Generate prompts you can paste into Cursor, Copilot, Claude Desktop, and other local assistants
These commands print ready-to-use assistant instructions:
  • npx gtm-toolkit analyze --gaps — surface topics that need more coverage.
  • npx gtm-toolkit analyze --competitor https://example.com --output competitor.json — export structured findings.
  • npx gtm-toolkit analyze --keywords “go to market strategy” — request AI-assisted keyword research.

No remote API keys are required—open the generated prompt in your preferred local assistant to continue the workflow.

Connect Google Search Console Early
Understand what questions bots already associate with your brand

Linking a verified Search Console property lets GTM Toolkit capture AI Overview and answer-engine style queries. It's the fastest way to learn which questions bots and assistants are already asking about your site.

  • • Enable Generative Optimization so gtm-toolkit generate --all writes reports/ai-overview-keywords.csv.
  • • Review the CSV to see phrasing straight from the bots, then prioritize briefs or landing pages that answer them.
  • • Feed those queries into gtm-toolkit analyze --keywords for local assistant prompts that close content gaps.