{"_id":"@adiasg/agentsmd","_rev":"2-c1a929dfe62eb8ea2fc7a39e52110e1a","name":"@adiasg/agentsmd","dist-tags":{"latest":"0.0.1"},"versions":{"0.0.0":{"name":"@adiasg/agentsmd","version":"0.0.0","keywords":["agents.md","cli","devtools"],"license":"MIT","_id":"@adiasg/agentsmd@0.0.0","maintainers":[{"name":"adiasg","email":"aditya.asgaonkar@gmail.com"}],"homepage":"https://github.com/adiasg/agentsmd","bugs":{"url":"https://github.com/adiasg/agentsmd/issues"},"bin":{"agentsmd":"bin/agentsmd"},"dist":{"shasum":"4576e32fb1eae2a7c8d1d5e15b02b5c0e6cf3d77","tarball":"https://registry.npmjs.org/@adiasg/agentsmd/-/agentsmd-0.0.0.tgz","fileCount":18,"integrity":"sha512-5QCMBDnOe8Xw+cMMMZZnShXBY5sQfyjRsvYBYQ3i5X9bP7B2ZsVQctmcCSPoWX9NsTvt8x4F0+w4W3+825y6sw==","signatures":[{"sig":"MEUCIEbd5i7ub3uOCIeLgbSSXh4MFrYsic07/ISW+PBE3rUWAiEAgJ6YKPH3ywi8Q6dxxXE29kjASZzXi09aDJc4RHzDaFQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":48007},"engines":{"node":">=18"},"gitHead":"1847940a76dcbb923685f61942e6889ed25b1fdf","scripts":{"lint":"scripts/lint.sh","test":"scripts/test.sh","prepare":"npm run lint","version":"scripts/sync-version.sh"},"_npmUser":{"name":"adiasg","email":"aditya.asgaonkar@gmail.com"},"repository":{"url":"git+https://github.com/adiasg/agentsmd.git","type":"git"},"_npmVersion":"11.3.0","description":"CLI helpers for managing AGENTS.md workflows and Git automation.","directories":{},"_nodeVersion":"23.10.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/agentsmd_0.0.0_1759171269009_0.3447928702290368","host":"s3://npm-registry-packages-npm-production"}},"0.0.1":{"name":"@adiasg/agentsmd","version":"0.0.1","description":"CLI helpers for managing AGENTS.md workflows and Git automation.","license":"MIT","bin":{"agentsmd":"bin/agentsmd"},"scripts":{"lint":"scripts/lint.sh","test":"scripts/test.sh","prepare":"npm run lint"},"publishConfig":{"access":"public"},"engines":{"node":">=18"},"keywords":["agents.md","cli","devtools"],"homepage":"https://github.com/adiasg/agentsmd","repository":{"type":"git","url":"git+https://github.com/adiasg/agentsmd.git"},"_id":"@adiasg/agentsmd@0.0.1","gitHead":"f7cdb8c1662859b4bbb2fa050ecb4d32831fe033","bugs":{"url":"https://github.com/adiasg/agentsmd/issues"},"_nodeVersion":"22.20.0","_npmVersion":"10.9.3","dist":{"integrity":"sha512-Pvmd7Y2tbMmRXxgFWv5p2OeRi6N8AbZhTIsbRKOiYPNqXYFHK658gMjT43hpyN/gBYQ/pSPWkGSf4XiHp40sog==","shasum":"bddf7565ed291e75e4c0a83df613439130dc7648","tarball":"https://registry.npmjs.org/@adiasg/agentsmd/-/agentsmd-0.0.1.tgz","fileCount":19,"unpackedSize":47891,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQC3+d0PsIm84czn50P2/n+Vh8GMu1c/YxSrrq6tjA+WiQIgChkGKC9i5I22HMjHb1WyArtis+ch8ACs/7PZQHiIn1w="}]},"_npmUser":{"name":"adiasg","email":"aditya.asgaonkar@gmail.com"},"directories":{},"maintainers":[{"name":"adiasg","email":"aditya.asgaonkar@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/agentsmd_0.0.1_1760375110840_0.7062632245814069"},"_hasShrinkwrap":false}},"time":{"created":"2025-09-29T18:41:08.932Z","modified":"2025-10-13T17:05:11.194Z","0.0.0":"2025-09-29T18:41:09.194Z","0.0.1":"2025-10-13T17:05:11.016Z"},"bugs":{"url":"https://github.com/adiasg/agentsmd/issues"},"license":"MIT","homepage":"https://github.com/adiasg/agentsmd","keywords":["agents.md","cli","devtools"],"repository":{"type":"git","url":"git+https://github.com/adiasg/agentsmd.git"},"description":"CLI helpers for managing AGENTS.md workflows and Git automation.","maintainers":[{"name":"adiasg","email":"aditya.asgaonkar@gmail.com"}],"readme":"<h1 align=\"center\">agentsmd</h1>\n<p align=\"center\">Templates and preferences for your <code>AGENTS.md</code> instructions.</p>\n\n<p align=\"center\">\n<code>npm install -g @adiasg/agentsmd</code> · <code>npx @adiasg/agentsmd &lt;command&gt;</code>\n</p>\n\n---\n\n> **agentsmd** adds templating and local `.agentsmd` preferences to `AGENTS.md` while keeping the tracked source clean.\n\n## Features\n\n* 🧾 **Extend AGENTS.md** – `agentsmd make` regenerates `AGENTS.md` with templates and appends local `.agentsmd` preferences onto the committed snapshot.\n* 🧩 **Reusable Templates** – Place `{{ name }}` tokens in `AGENTS.md` or `.agentsmd` to pull snippets from `~/.agentsmd/templates/<name>[.md]`, sharing guidance across projects.\n* 🔄 **Automate the Refresh** – `agentsmd enable` hooks Git so `AGENTS.md` regenerates on pulls/checkouts and silently ignores your local rendered copy; `agentsmd disable` rolls back the Git hooks.\n* 🧰 **Local Install Only** – Everything the CLI writes stays in your working tree — no global state or remote services required.\n\n---\n\n## 🚀 Quick Tour\n```bash\n# 1. Install\nnpm install -g @adiasg/agentsmd\n\n# 2. Drop reusable templates into your home library\nmkdir -p ~/.agentsmd/templates\necho \"Never run npm run dev yourself.\" > ~/.agentsmd/templates/nextjs.md\n# Refer to this template in AGENTS.md or .agentsmd with {{ nextjs }}\necho \"{{ nextjs }}\" > .agentsmd\n\n# 3. Place your personal overlay (kept local)\necho \"Don't hardcode constants - instead place them in a constants.ts file.\" >> .agentsmd\n\n# 4. Render templates and append .agentsmd to AGENTS.md\nagentsmd make\n\n# 5. (Optional) Git automation for regeneration & ignoring file\nagentsmd enable\nagentsmd status\nagentsmd disable\n```\n\n---\n\n## 🧩 Templating Quick Start\n\nKeep the shared `AGENTS.md` focused on repository guidelines while layering your personal preferences in `.agentsmd`. Anywhere you place `{{ name }}` inside the file, `agentsmd make` will inline content from your home template library at `~/.agentsmd/templates/<name>`.  \nFor each location the lookup checks both `<name>` and `<name>.md`, so you can opt in to the Markdown suffix without breaking existing snippets.\n\n**Note:** Rendering templates requires Python 3 to be available as `python3` or `python`.\n\nExample:\n\n```markdown\n### ~/.agentsmd/templates/nextjs.md\n\n- Never run `npm run dev`.\n```\n\n```markdown\n### .agentsmd\n\n### Developer Preferences\n\n- Use orange hues for the accent colors.\n{{ nextjs }}\n```\n\n```\nagentsmd make\n```\n\nThe resulting `AGENTS.md`: \n\n```markdown\n<Orignial AGENTS.md contents>\n\n### Developer Preferences\n\n- Use orange hues for the accent colors.\n- Never run `npm run dev`.\n```\n\n---\n\n## 🧰 CLI Reference\n\n| Command | What it does |\n|---------|--------------|\n| `agentsmd make` | Rebuilds `AGENTS.md` from the last committed version plus your `.agentsmd` preferences and templates. |\n| `agentsmd enable` | Enables local Git automation for regenerating file on pull/checkout. Installs hooks, merge driver, `git rebuild-agents` alias, and marks `AGENTS.md` assume-unchanged. |\n| `agentsmd disable` | Removes all installed local Git automation, restores backed up hooks/config. |\n| `agentsmd status` | Prints installation status. |\n| `agentsmd --version` | Shows the version. |\n\nRun `agentsmd help <command>` for detailed usage text.\n\n---\n\n## 🧱 What `agentsmd enable` Installs\n\n- **Hooks** – Managed `pre-commit`, `post-merge`, and `post-checkout` scripts that call `agentsmd make` when appropriate. Original hooks are saved as `<hook>.agentsmd.bak`.\n- **Merge driver** – Adds `merge=agentsmd` to `.git/info/attributes` so merge conflicts prefer the remote `AGENTS.md`.\n- **Git alias** – `git rebuild-agents` points back to the CLI for quick rebuilds.\n- **Assume unchanged** – `AGENTS.md` is kept out of `git status` noise but remains editable locally.\n- **State directory** – `.git/agentsmd-state/` tracks backups and ownership markers, enabling clean disable flows.\n\nDisable removes each artifact and puts your repo back exactly as it was.\n\n---\n\n## 🛠 Contributing\n\nWe welcome pull requests! Before opening one:\n- Ensure new behaviour is covered by tests where practical.\n- Run `npm run lint` and `npm run test`.\n- Update documentation (`README.md`, `docs/PRD.md`, and relevant assets) to match your changes.\n\n`.devcontainer/` has an environment with the required tooling (Node LTS, `shellcheck`, `shfmt`, `bats`).\n\n---\n\n## ❓ Troubleshooting\n\n- **\"fatal: not a git repository\"** – Run commands inside a clone; automation never touches directories without `.git`.\n- **`AGENTS.md` still showing in git status** – Ensure the file is tracked; otherwise `git update-index --assume-unchanged` cannot be set.\n- **HEAD missing or `AGENTS.md` untracked** – `agentsmd make` falls back to the working-tree `AGENTS.md` at the repo root before reapplying preferences.\n- **`Status: DISABLED` with missing components** – Run `agentsmd enable` to reinstall; it is safe to re-run and will restore missing pieces.\n- **Missing template referenced** – The token is left as `{{ name }}` and a warning is printed; fix files in `~/.agentsmd/templates/`.\n\n---\n\n## 📄 License\n\nMIT License. See [`LICENSE`](LICENSE).\n","readmeFilename":"README.md"}