gtkkit-cli
v4.8.0
Published
CLI tool for bootstrapping and updating GtkKit projects
Maintainers
Readme
GtkKit Config UI
Command-line tool and web dashboard for managing GtkKit projects.
Overview
GtkKit Config UI (gtk) provides both CLI and web dashboard for managing GtkKit projects. It is built with Bun, TypeScript, and React for development, while the published CLI runs on plain Node.js so end users do not need Bun installed.
Key Features:
- CLI Commands (16): new, init, config, projects, setup, skills, agents, commands, migrate, doctor, versions, update, uninstall, watch, content, easter-egg
- Web Dashboard: Interactive React UI via
gtk config uifor configuration and project management - Hook Diagnostics Dashboard: Inspect recent Claude hook activity and failures from
gtk configacross global and project scopes - Projects Registry: Centralized registry at
~/.gtkkit/projects.jsonwith file locking - Skill Installation: Install GtkKit skills to other coding agents (Cursor, Codex, etc.)
- Multi-tier Authentication: gh CLI → env vars → keychain → prompt fallback
- Smart Merging: Conflict detection with user customization preservation
- Skills Migration: Auto-detects and migrates skills structure changes
- Offline Installation: From local archives or directories
- Security: Path traversal protection, symlink validation, UNC path protection
- Cross-Platform: macOS, Linux, Windows with platform-specific optimizations
- Update Notifications: Intelligent 7-day cache for version checks
Documentation
Comprehensive documentation in /docs:
- Codebase Summary - Overview, structure, key components
- Project Overview & PDR - Requirements, features, roadmap
- System Architecture - Architecture diagrams, data flow
- Reconciliation Architecture -
gtk migrateRECONCILE → EXECUTE → REPORT design - Code Standards - Coding conventions, best practices
- Project Roadmap - Release timeline, feature status
- Deployment Guide - Release procedures
- gtk watch - GitHub issue monitoring daemon
- gtk content - Automated content generation from git activity
Prerequisites
Before using GtkKit CLI, you need to:
- Purchase a GtkKit Starter Kit from GtkKit.cc
- Get Repository Access: After purchase, you'll receive access to the private GitHub repository containing your kit
- Create a GitHub Personal Access Token (PAT) with
reposcope to download releases
Without a purchased kit and repository access, the CLI will not be able to download any project templates.
Installation
The GtkKit CLI is published on npm at npmjs.com/package/gtkkit-cli.
End-user runtime note: global installs from npm, pnpm, yarn, or bun all execute the packaged Node.js CLI. Bun is optional for users and only needed for local GtkKit CLI development workflows. Most commands do not require native build tools; gtk content uses an optional SQLite driver and shows remediation steps if that driver is unavailable.
Using npm (Recommended)
npm install -g gtkkit-cliUsing Bun
bun add -g gtkkit-cliUsing Yarn
yarn global add gtkkit-cliUsing pnpm
pnpm add -g gtkkit-cliAfter installation, verify it's working:
gtk --versionUsage
Discoverability Quick Start
# Top-level command discovery
gtk --help
# Open config dashboard immediately
gtk config
# Expose the dashboard intentionally to your LAN/Tailscale
gtk config --host 0.0.0.0 --no-open
# Command-level help (recommended)
gtk config --help
gtk skills --help
gtk agents --help
gtk commands --help
gtk migrate --helpConfig Dashboard Access
By default, gtk config binds the dashboard to 127.0.0.1 for local-only access.
Use --host when you intentionally want remote access from another device on the same trusted network:
# Bind to all interfaces
gtk config --host 0.0.0.0 --no-open
# Bind to a specific interface or hostname
gtk config --host 100.88.12.4 --no-open
gtk config --host dashboard.local --no-openThe dashboard still enforces same-origin browser access. Remote access works when you open the UI from the same host/origin that reaches the server, instead of relying on a hardcoded IP allowlist.
Create New Project
# Interactive mode
gtk new
# With options
gtk new --dir my-project --kit engineer
# Show beta versions
gtk new --beta
# With exclude patterns
gtk new --exclude "*.log" --exclude "temp/**"
# Optional packages (OpenCode, Gemini)
gtk new --opencode --gemini
# Install skills dependencies (Python, Node packages, system tools)
gtk new --install-skills
# Command prefix (/gtk: namespace to avoid conflicts)
gtk new --prefix
# Offline installation (from local archive or directory)
gtk new --archive ~/downloads/engineer-v1.16.0.zip
gtk new --kit-path ~/extracted-kit/
# Direct repo downloads are also supported
gtk new --archive ~/downloads/gtkkit-engineer-main.zip
gtk new --kit-path ~/downloads/gtkkit-engineer-main/Flags:
--install-skills: Auto-install Python packages, system tools (FFmpeg, ImageMagick), Node.js packages--prefix: Move commands to /gtk: namespace (/plan → /gtk:plan)--beta: Show pre-release versions in selection--opencode/--gemini: Install optional packages--archive <path>: Use local archive (zip/tar.gz) instead of downloading--kit-path <path>: Use local kit directory instead of downloading
--archive and --kit-path both accept direct repo downloads with a single wrapper directory, including GitHub "Download ZIP" archives and extracted repo folders that still contain gtkkit-engineer-main/ or similar at the top level.
Initialize or Update Project
Note: Run from project root.
# Interactive mode
gtk init
# Non-interactive mode with sensible defaults
gtk init --yes
gtk init -y
# Combine with other flags
gtk init -g --kit engineer -y
# With options
gtk init --kit engineer --beta
# Global mode (platform-specific paths)
gtk init --global
# Fresh installation (⚠️ DESTRUCTIVE - removes ALL customizations)
gtk init --fresh
# With exclude patterns and prefix
gtk init --exclude "*.local" --prefix
# Offline installation (from local archive or directory)
gtk init --archive ~/downloads/engineer-v1.16.0.zip
gtk init --kit-path ~/extracted-kit/
# Direct repo downloads are also supported
gtk init --archive ~/downloads/gtkkit-engineer-main.zip
gtk init --kit-path ~/downloads/gtkkit-engineer-main/Flags:
--yes/-y: Non-interactive mode with sensible defaults (skip all prompts)--global/-g: Use platform-specific config (macOS/Linux: ~/.claude, Windows: %USERPROFILE%.claude)--fresh: Clean reinstall, removes .claude directory (requires "yes" confirmation)--beta: Show pre-release versions--prefix: Apply /gtk: namespace to commands--archive <path>: Use local archive (zip/tar.gz) instead of downloading--kit-path <path>: Use local kit directory instead of downloading
--archive and --kit-path both accept direct repo downloads with a single wrapper directory, including GitHub "Download ZIP" archives and extracted repo folders that still contain gtkkit-engineer-main/ or similar at the top level.
Default Behavior with -y Flag:
| Prompt | Default |
|--------|---------|
| Select GtkKit | engineer (first option) |
| Target directory | Current directory (.) |
| Version selection | Latest stable release |
| Google Gemini setup | Skip |
| Other optional features | Skip |
Update CLI
Keep the GtkKit CLI up to date:
# Check for CLI updates
gtk update --check
# Update to latest version
gtk update
# Update to a specific version
gtk update --version 4.5.0
# Update to beta / skip confirmation
gtk update --beta
gtk update --yesThe CLI notifies you when updates are available via gtk --version.
Skills Migration:
- Auto-detects structure changes (flat → categorized)
- Preserves customizations (SHA-256 hashing)
- Creates backup before migration
- Rollback on failure
List Available Versions
# Show all available versions for all kits
gtk versions
# Filter by specific kit
gtk versions --kit engineer
gtk versions --kit marketing
# Show more versions (default: 30)
gtk versions --limit 50
# Include prereleases and drafts
gtk versions --allDiagnostics & Doctor
# Full health check (default)
gtk doctor
# Verbose mode with execution timing and command details
gtk doctor --verbose
# Generate shareable diagnostic report (prompts for gist upload)
gtk doctor --report
# Auto-fix all fixable issues
gtk doctor --fix
# CI mode: no prompts, exit 1 on failures
gtk doctor --check-only
# Machine-readable JSON output
gtk doctor --json
# Combine flags
gtk doctor --verbose --check-only --json
gtk doctor --verbose --fixHealth Checks:
- System: Node.js, npm, Python, pip, Claude CLI, git, gh CLI
- GtkKit: Global/project installation, versions, skills, skill listing budget, duplicate skill inventory
- Auth: GitHub CLI authentication, repository access
- Project: package.json, node_modules, lock files
- Modules: Dynamic skill dependency resolution
Auto-Fix Capabilities:
| Issue | Fix Action |
|-------|------------|
| Missing dependencies | Install via package manager |
| Missing gh auth | Run gh auth login |
| Corrupted node_modules | Reinstall dependencies |
| Missing global install | Run gtk init --global |
| Missing skill deps | Install in skill directory |
| Missing/low Engineer skill listing budget | Ensure computed skillListingBudgetFraction and a valid GtkKit-recommended skillListingMaxDescChars ceiling in project settings |
gtk doctor never writes skillOverrides, hides skills, or deletes duplicate skills automatically. It reports existing skillOverrides and inventory issues so all active project/global skills can stay user-invocable while listing pressure is managed through 200k-context-floor project settings and bounded descriptions.
Exit Codes:
0: All checks pass or issues fixed1: Failures detected (only with--check-only)
Note:
gtk diagnoseis deprecated. Usegtk doctorinstead.
Uninstall
Remove GtkKit installations from your system:
gtk uninstall # Interactive mode - prompts for scope and confirmation
gtk uninstall --local # Uninstall only local installation (current project)
gtk uninstall --global # Uninstall only global installation (~/.claude/)
gtk uninstall -g --kit marketing # Remove only global Marketing kit
gtk uninstall -l -y # Local only, skip confirmation
gtk uninstall -g -y # Global only, skip confirmation
gtk uninstall --yes # Non-interactive - skip confirmation (for scripts)Scope Selection:
- When both local and global installations exist, you'll be prompted to choose:
- Local only: Remove from current project (
.claude/) - Global only: Remove from user directory (
~/.claude/) - Both: Remove all GtkKit installations
- Local only: Remove from current project (
- When multiple kits are installed in the selected scope, interactive uninstall prompts for:
- Marketing kit only or Engineer kit only: Remove one kit and preserve the other
- All GtkKit kits: Remove the full selected installation scope
- Use
--localor--globalflags to skip the prompt - Use
--kit engineeror--kit marketingto skip the kit prompt
What it does:
- Detects local
.claudedirectory in current project - Detects global
~/.claudeGtkKit installation - Shows paths before deletion
- Requires confirmation (unless
--yesflag) - Removes GtkKit subdirectories (
commands/,agents/,skills/,workflows/,hooks/,metadata.json) - Preserves user configs like
settings.json,settings.local.json, andCLAUDE.md
Note: Only removes valid GtkKit installations (with metadata.json). Regular .claude directories from Claude Desktop are not affected.
Watch GitHub Issues (gtk watch)
Autonomous daemon that monitors GitHub issues, analyzes them with Claude, generates plans, and creates PRs.
# Start watching (single repo)
gtk watch
# Dry-run mode (no posts/PRs)
gtk watch --dry-run
# Custom poll interval (ms)
gtk watch --interval 60000
# Force restart (clear state)
gtk watch --force
# Verbose logging
gtk watch --verboseFeatures: issue lifecycle management (10 statuses), Claude-powered brainstorming/planning, automatic PR creation, rate limiting (persisted across restarts), maintainer reply filtering, processedIssues TTL, optional git worktree isolation per issue, multi-repo support, graceful shutdown.
Config: .gtk.json under watch key. See docs/gtk-watch.md for full configuration reference.
Content Generation (gtk content)
Daemon that scans git activity (commits, PRs, tags), generates social media content with Claude, and publishes to X/Twitter and Facebook.
# Interactive setup wizard
gtk content setup
# Start daemon
gtk content start
# Check status
gtk content status
# View logs
gtk content logs
# Queue manual content
gtk content queue
# Review workflow
gtk content approve <id>
gtk content reject <id>
# Dry-run / verbose
gtk content start --dry-run
gtk content start --verboseFeatures: 11-phase pipeline (scan → filter → classify → context → create → validate → review → photo → publish → engage → analyze), noise filtering, context caching (24h TTL), content validation, photo generation, 3 review modes (auto/manual/hybrid), quiet hours scheduling, engagement tracking, SQLite database, platform-specific adapters.
Runtime dependency: gtk content uses the optional native SQLite driver better-sqlite3. If the driver is unavailable, other CLI commands still work and gtk content prints reinstall/build-tool guidance.
Config: .gtk.json under content key. See docs/gtk-content.md for full configuration reference.
Other Commands
# Show CLI version (shows local + global kit versions)
gtk --version
# Show help
gtk --help
gtk -h
# Command-specific help
gtk new --help
gtk init --help
gtk config --help
gtk skills --help
gtk versions --helpDebugging
gtk new --verbose # Enable verbose logging
gtk new --verbose --log-file debug.log # Save to file
GTK_VERBOSE=1 gtk new # Via environment variableCache Configuration
Release data is cached locally to improve performance. You can configure the cache TTL:
# Set custom cache TTL (in seconds, default: 3600 = 1 hour)
GTK_CACHE_TTL=7200 gtk versions # Cache for 2 hours
GTK_CACHE_TTL=0 gtk versions # Disable caching (always fetch fresh)
# Permanent configuration (add to ~/.bashrc or ~/.zshrc)
export GTK_CACHE_TTL=1800 # 30 minutesCache Location: ~/.gtkkit/cache/releases/
Update Notifications
The gtk --version command checks for newer versions of your installed GtkKit and displays a notification if an update is available. The check is cached for 7 days to minimize API calls.
Disable Update Notifications:
# Set environment variable to disable
NO_UPDATE_NOTIFIER=1 gtk --version
# Windows (permanent)
[System.Environment]::SetEnvironmentVariable("NO_UPDATE_NOTIFIER", "1", [System.EnvironmentVariableTarget]::User)
# macOS/Linux (add to ~/.bashrc or ~/.zshrc)
export NO_UPDATE_NOTIFIER=1Cache Location: ~/.gtkkit/cache/version-check.json (Windows: %USERPROFILE%\.gtkkit\cache\)
Authentication
The CLI requires GitHub authentication to download releases from private repositories.
Authentication Flow
┌─────────────────────────────────────────────────┐
│ Multi-Tier Authentication │
│ │
│ 1. GitHub CLI (gh auth token) │
│ ↓ (if not available) │
│ 2. Environment Variables (GITHUB_TOKEN) │
│ ↓ (if not set) │
│ 3. Config File (~/.gtkkit/config.json) │
│ ↓ (if not found) │
│ 4. OS Keychain (secure storage) │
│ ↓ (if not stored) │
│ 5. User Prompt (with save option) │
└─────────────────────────────────────────────────┘Quick Setup
Step 1: Install GitHub CLI
# Windows
winget install GitHub.cli
# macOS
brew install gh
# Linux
sudo apt install ghStep 2: Authenticate with GitHub CLI
gh auth loginWhen prompted, follow these steps:
- Select GitHub.com
- Select HTTPS (or SSH if preferred)
- Authenticate Git? → Yes
- Select Login with a web browser (⚠️ recommended)
- Copy the one-time code shown
- Press Enter to open browser and paste the code
- Authorize GitHub CLI
⚠️ Important: Select "Login with a web browser" - do NOT use "Paste an authentication token" as PAT authentication is no longer supported for accessing private repositories.
Troubleshooting
Run the doctor command to diagnose issues:
# Interactive diagnostics
gtk doctor
# Generate report for support
gtk doctor --report
# CI/automation
gtk doctor --check-only --json
# Verbose logging
gtk new --verbose
gtk init --verboseCommon Issues:
- "Access denied": Run
gtk doctorto check auth, use--fixto auto-repair - "Authentication failed": Run
gtk doctor --fixto re-authenticate, or manually rungh auth login(select 'Login with a web browser') - "GitHub CLI not authenticated": Run
gh auth loginand select 'Login with a web browser' (NOT 'Paste token') - Module errors: Run
gtk doctor --fixto reinstall skill dependencies - Need help: Run
gtk doctor --reportand share the gist URL
Available Kits
GtkKit offers premium starter kits available for purchase at GtkKit.cc:
- engineer: GtkKit Engineer - Engineering toolkit for building with Claude (v1.0.0+)
- marketing: GtkKit Marketing - Content automation toolkit (v1.0.0 available)
Each kit provides a comprehensive project template with best practices, tooling, and workflows optimized for Claude Code development.
Configuration
Configuration is stored in ~/.gtkkit/config.json:
{
"github": {
"token": "stored_in_keychain"
},
"defaults": {
"kit": "engineer",
"dir": "."
}
}Protected Files
The following file patterns are protected and will not be overwritten during updates:
.env,.env.local,.env.*.local*.key,*.pem,*.p12node_modules/**,.git/**dist/**,build/**
Excluding Files
Use --exclude flag with glob patterns to skip files:
gtk new --exclude "*.log" --exclude "temp/**"
gtk update --exclude "node_modules/**" --exclude "dist/**"Patterns: * (any chars), ** (recursive), ? (single char), [abc], {a,b}
Restrictions: No absolute paths, no path traversal (..), 1-500 chars
Note: User patterns are ADDED to default protected patterns
Custom .claude Files & Skills Migration
Custom File Preservation:
The CLI automatically preserves your custom .claude/ files during updates:
- Custom slash commands
- Personal workflows
- Project-specific configurations
- Any other custom files in
.claude/directory
Skills Directory Migration: Automatic migration when structure changes (flat → categorized):
- Detection: Manifest-based + heuristic fallback
- Customizations: SHA-256 hash comparison detects modifications
- Safety: Backup before migration, rollback on failure
- Preservation: All customizations preserved during migration
- Interactive: Prompts for confirmation (can skip in CI/CD)
Example Migration:
Before (flat):
.claude/skills/
├── gemini-vision/
├── postgresql-psql/
└── cloudflare-dns/
After (categorized):
.claude/skills/
├── ai-multimodal/
│ └── gemini-vision/
├── databases/
│ └── postgresql-psql/
└── devops/
└── cloudflare-dns/Customizations in any skill are detected and preserved automatically.
Development
See Development Guide for:
- Project structure (modular domain-driven architecture)
- Build & compilation (
bun run build,bun run compile) - Testing & type checking
- Code standards & linting
Architecture Highlights:
- Modular design: 122 focused modules (target: <100 lines each)
- Facade pattern: Each domain exposes public API via facade
- Phase handlers: Complex commands use orchestrator + phase handlers
- Self-documenting names: kebab-case file names describe purpose
Quick Start:
bun install
bun run dev new --kit engineer
bun test
# Optional: run expensive CLI integration tests explicitly
bun run test:integrationE2E Tests
Playwright E2E tests cover the gtk migrate dashboard (3 scenarios). Tests run against the local dev server and use API mocking — no real filesystem state is modified.
Prerequisites: Node 18+ or Bun 1.0+, Chromium (installed automatically).
# One-time browser setup (if not already installed)
./node_modules/.bin/playwright install chromium
# Run all E2E specs
bun run test:e2e
# Interactive UI mode (watch + trace viewer)
bun run test:e2e:uiNote: The dev server starts automatically via bun run dashboard:dev. CI wiring is a separate follow-up (local-only for now).
FAQ
Q: Do I need GitHub CLI? A: Yes, GitHub CLI is required. GtkKit uses it exclusively for authentication with private repositories.
Q: How do I authenticate?
A: Run gh auth login, select 'Login with a web browser', complete OAuth in browser. Do NOT use 'Paste an authentication token'.
Q: "Access denied" error?
A: Accept GitHub repo invitation, re-run gh auth login with web browser login, wait 2-5min for permissions.
Q: "GitHub CLI not authenticated" error?
A: Run gh auth login and select 'Login with a web browser' (NOT 'Paste token'). PAT authentication is no longer supported.
Q: Is my token secure? A: Yes. GitHub CLI manages tokens securely via OAuth, stored encrypted in OS keychain.
License
MIT
