Installation

Install GTM Toolkit, verify the CLI, and prepare your workspace for continuous marketing automation.

Prerequisites
Recommended runtime and dependencies before you install

Core requirements

  • • Node.js 18.17+ (LTS recommended)
  • • npm 9+, pnpm 8+, or yarn 3+
  • • Git 2.40+ for versioned content workflows
  • • Access to your content directory (e.g., content/blog)

Optional integrations

  • • Claude API key for AI-powered analysis
  • • Google Search Console service account for performance tracking
  • • CI/CD access if you plan to run GTM Toolkit in automation
Install the CLI
Choose your preferred package manager or use npx ad-hoc
# Install
npm install --save-dev gtm-toolkit
# Verify
npx gtm-toolkit --help
# Optional package.json script
"scripts": { "gtm": "gtm-toolkit" }
Initialize Project Files
Generate configuration and seed directories in one command
# Initialize GTM Toolkit defaults
npx gtm-toolkit init

Files created

  • gtm.config.js containing your answers to the init prompts
  • • Recommended dependencies installed unless --skip-install was used
  • • Analytics placeholders based on the providers you selected

What to customize next

  • • Allowed category values and content directory structure
  • • Default site metadata (siteUrl, siteName)
  • • AI provider configuration (ai.apiKey, ai.model)
  • • Output directory for generated SEO files (defaults to public)
Verify Your Setup
Run a smoke test to confirm everything is configured
# Validate installation
npx gtm-toolkit lint content/blog --format console --fail-on-error
# Expected output
✓ content/blog/example.md (92.0%)
errors: 0 | warnings: 1 | passed: 48
Process exits with code 0 when no errors are found.
Troubleshooting
Common installation issues and how to resolve them
EACCES
Permission errors on macOS/Linux — prefer a user-level Node install (e.g., via nvm) instead of sudo.
MODULE_NOT_FOUND
Ensure the package manager installed dependencies; rerun npm install (or equivalent) at the repo root.
API Keys
If Claude integrations fail, confirm CLAUDE_API_KEY is set in your environment and accessible to the CLI/CI runner.
GSC Auth
Google Search Console requires a service account JSON; store the credentials securely and reference them via environment variables.