GTM Toolkit
Developer-Native Marketing
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
✓ Installs framework-specific helpers unless
✓ 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
Provide
CLAUDE_API_KEY for deeper analysis4Generate SEO Files
Create robots.txt, sitemap.xml, and optional meta scaffolding
# Generate all SEO assets
npx gtm-toolkit generate --all
✓ Writes
✓ Builds
✓ Adds a meta tags template when
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 passedrobots.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 AI Analysis
Unlock Claude-backed insights for content, keywords, and competitors
Set
CLAUDE_API_KEY to enable these commands:- •
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.
Store secrets in .env.local for local development and in your CI/CD secret manager for automated workflows.