Skip to content
/ dotgh Public

A cross-platform CLI tool to template AI-coding configs such as AGENTS.md for easy reuse across projects.

License

Notifications You must be signed in to change notification settings

openjny/dotgh

Repository files navigation

dotgh

CI Release License Latest Release

A CLI tool to manage AI coding assistant configuration templates.

dotgh demo

💡 Why dotgh?

If you're using AI coding assistants like GitHub Copilot or Cursor, you've probably noticed yourself creating similar config files over and over again — .github/copilot-instructions.md, .github/prompts/my.prompt.md, AGENTS.md, and so on...

dotgh is a cross-platform tool that lets you save and apply these config files as templates. When starting a new project, just run dotgh pull my-template and you're good to go 👌.

📁 What it manages

By default, dotgh manages these files as template components:

  • AGENTS.md
  • .github/agents/*.agent.md
  • .github/copilot-chat-modes/*.chatmode.md
  • .github/copilot-instructions.md
  • .github/instructions/*.instructions.md
  • .github/prompts/*.prompt.md
  • .vscode/mcp.json

This is customizable via ~/.config/dotgh/config.yaml. See User Guide for details.

💡 Using other AI tools? Check out configuration examples for Claude Code, Cursor, Windsurf, Gemini CLI, and more.

📦 Install

Linux / macOS:

curl -fsSL https://raw.githubusercontent.com/openjny/dotgh/main/install.sh | bash

Windows (PowerShell):

irm https://raw.githubusercontent.com/openjny/dotgh/main/install.ps1 | iex

See User Guide for more installation options.

🚀 Usage

dotgh list                  # List templates
dotgh pull <template>       # Sync template to current directory
dotgh push <template>       # Sync current directory to template
dotgh diff <template>       # Show differences before syncing
dotgh edit <template>       # Edit a template
dotgh delete <template>     # Delete a template
dotgh config show           # Show current configuration
dotgh config edit           # Edit configuration file
dotgh sync init <repo>      # Initialize sync with a Git repository
dotgh sync push             # Push config/templates to remote
dotgh sync pull             # Pull config/templates from remote
dotgh sync status           # Show sync status
dotgh update                # Update dotgh to latest version

Git-style Sync

pull and push use Git-style sync behavior:

# Full sync: adds, updates, and deletes files to match exactly
dotgh pull my-template

# Preview changes before applying
dotgh diff my-template

# Merge mode: only add/update, no deletions
dotgh pull my-template --merge

# Skip confirmation prompt
dotgh pull my-template --yes

See User Guide for detailed command usage.

📖 Documentation

⚖️ License

This project is licensed under the Apache 2.0 License. See the LICENSE file for details.

About

A cross-platform CLI tool to template AI-coding configs such as AGENTS.md for easy reuse across projects.

Topics

Resources

License

Contributing

Stars

Watchers

Forks