{"_id":"@cogflows/promptcode-preset-mcp","_rev":"3-4f6dcc3c60bc09984ff4dd87ae70480f","name":"@cogflows/promptcode-preset-mcp","dist-tags":{"latest":"1.0.2"},"versions":{"1.0.0":{"name":"@cogflows/promptcode-preset-mcp","version":"1.0.0","keywords":["cli","prompt","code","preset","ai","llm"],"author":{"name":"cogflows"},"license":"MIT","_id":"@cogflows/promptcode-preset-mcp@1.0.0","maintainers":[{"name":"cogflows","email":"rubin.asaf@gmail.com"}],"homepage":"https://github.com/cogflows/promptcode-preset-mcp#readme","bugs":{"url":"https://github.com/cogflows/promptcode-preset-mcp/issues"},"bin":{"promptcode":"dist/cli.js"},"dist":{"shasum":"da2f07563697525244b85aa3d61b4259958de7dd","tarball":"https://registry.npmjs.org/@cogflows/promptcode-preset-mcp/-/promptcode-preset-mcp-1.0.0.tgz","fileCount":9,"integrity":"sha512-6/wI+ylxDAvmL06WUyFKbvO+hDlJCCerEGn7urSuJy0zDqn0Z9/FdiqAPRMMOMi+m5X6cSBV2CU5TFOfPCbBAg==","signatures":[{"sig":"MEQCIGksKk3vQZ6/GnG8LU85iMk6kujr966gflcUR1NMZUVeAiBYB/zd7PKKpCchXSf8DV5kBZ00BTjomQXNJQ1sTkD2+Q==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":20886},"main":"index.js","type":"module","_from":"file:cogflows-promptcode-preset-mcp-1.0.0.tgz","scripts":{"cli":"node --loader ts-node/esm src/cli.ts","dev":"nodemon --exec 'node --loader ts-node/esm' src/server.ts","test":"echo \"Error: no test specified\" && exit 1","build":"tsc"},"_npmUser":{"name":"cogflows","email":"rubin.asaf@gmail.com"},"_resolved":"/private/var/folders/_9/r_5hm76n1x7b7k8njj69bfb00000gn/T/edec664c2b386e7ba69837c06b6394fe/cogflows-promptcode-preset-mcp-1.0.0.tgz","_integrity":"sha512-6/wI+ylxDAvmL06WUyFKbvO+hDlJCCerEGn7urSuJy0zDqn0Z9/FdiqAPRMMOMi+m5X6cSBV2CU5TFOfPCbBAg==","repository":{"url":"git+https://github.com/cogflows/promptcode-preset-mcp.git","type":"git"},"_npmVersion":"10.1.0","description":"CLI tool for managing file presets for code prompting","directories":{},"_nodeVersion":"20.7.0","dependencies":{"zod":"^3.25.48","open":"^10.1.2","execa":"^9.6.0","express":"^5.1","tiktoken":"^1.0.21","gpt-tokenizer":"^2.9.0"},"_hasShrinkwrap":false,"devDependencies":{"nodemon":"^3.1.10","ts-node":"^10.9.2","typescript":"^5.8.3","@types/node":"^22.15.29","@types/open":"^6.2.1","@types/express":"^5.0.2"},"_npmOperationalInternal":{"tmp":"tmp/promptcode-preset-mcp_1.0.0_1748893084120_0.668201866911325","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@cogflows/promptcode-preset-mcp","version":"1.0.1","keywords":["cli","prompt","code","preset","ai","llm"],"author":{"name":"cogflows"},"license":"MIT","_id":"@cogflows/promptcode-preset-mcp@1.0.1","maintainers":[{"name":"cogflows","email":"rubin.asaf@gmail.com"}],"homepage":"https://github.com/cogflows/promptcode-preset-mcp#readme","bugs":{"url":"https://github.com/cogflows/promptcode-preset-mcp/issues"},"bin":{"promptcode":"dist/cli.js"},"dist":{"shasum":"cf70d8ac4ed84fd20ca0a6dd4b4a25de8beae24e","tarball":"https://registry.npmjs.org/@cogflows/promptcode-preset-mcp/-/promptcode-preset-mcp-1.0.1.tgz","fileCount":24,"integrity":"sha512-Kg+wzGwAh0MM9nYUGL59kcguWptXUAGSMHCwrqmoBDJgnlFiHyzw7KBx5sprIFP3kCICyRkuKmvsISJxq/sR/Q==","signatures":[{"sig":"MEUCIDTtkVuLe5cM6imWBbqFVft1D1JJ4zvoXPHdj8cStQPdAiEA6L3UdeZFNXuZc+n/ElXIs90cV0PTcvtyp8Q36apm5f4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":30487},"main":"./dist/server.js","type":"module","types":"./dist/server.d.ts","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/server.d.ts","import":"./dist/server.js"},"./cli":{"types":"./dist/cli.d.ts","import":"./dist/cli.js"}},"gitHead":"9fb4449b83be5363ab34033f9bb616fe83e5bad6","scripts":{"cli":"node --loader ts-node/esm src/cli.ts","dev":"nodemon --exec 'node --loader ts-node/esm' src/server.ts","test":"echo \"Error: no test specified\" && exit 1","build":"tsc","prepublishOnly":"pnpm build"},"_npmUser":{"name":"cogflows","email":"rubin.asaf@gmail.com"},"repository":{"url":"git+https://github.com/cogflows/promptcode-preset-mcp.git","type":"git"},"_npmVersion":"10.1.0","description":"CLI tool for managing file presets for code prompting","directories":{},"_nodeVersion":"20.7.0","dependencies":{"zod":"^3.25.48","open":"^10.1.2","execa":"^9.6.0","express":"^5.1","tiktoken":"^1.0.21","gpt-tokenizer":"^2.9.0"},"_hasShrinkwrap":false,"packageManager":"pnpm@10.7.1","devDependencies":{"nodemon":"^3.1.10","ts-node":"^10.9.2","typescript":"^5.8.3","@types/node":"^22.15.29","@types/open":"^6.2.1","@types/express":"^5.0.2"},"_npmOperationalInternal":{"tmp":"tmp/promptcode-preset-mcp_1.0.1_1748895378201_0.05449027982603849","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@cogflows/promptcode-preset-mcp","version":"1.0.2","description":"CLI tool for managing file presets for code prompting","main":"./dist/server.js","type":"module","exports":{".":{"import":"./dist/server.js","types":"./dist/server.d.ts"},"./cli":{"import":"./dist/cli.js","types":"./dist/cli.d.ts"}},"bin":{"promptcode":"dist/cli.js"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"tsc","prepublishOnly":"pnpm build","dev":"nodemon --exec 'node --loader ts-node/esm' src/server.ts","cli":"node --loader ts-node/esm src/cli.ts"},"keywords":["cli","prompt","code","preset","ai","llm"],"author":{"name":"cogflows"},"license":"MIT","engines":{"node":">=18.0.0"},"homepage":"https://github.com/cogflows/promptcode-preset-mcp#readme","bugs":{"url":"https://github.com/cogflows/promptcode-preset-mcp/issues"},"repository":{"type":"git","url":"git+https://github.com/cogflows/promptcode-preset-mcp.git"},"packageManager":"pnpm@10.7.1","dependencies":{"execa":"^9.6.0","express":"^5.1","gpt-tokenizer":"^2.9.0","open":"^10.1.2","tiktoken":"^1.0.21","zod":"^3.25.48"},"devDependencies":{"@types/express":"^5.0.2","@types/node":"^22.15.29","@types/open":"^6.2.1","nodemon":"^3.1.10","ts-node":"^10.9.2","typescript":"^5.8.3"},"_id":"@cogflows/promptcode-preset-mcp@1.0.2","gitHead":"9fb4449b83be5363ab34033f9bb616fe83e5bad6","types":"./dist/server.d.ts","_nodeVersion":"20.7.0","_npmVersion":"10.1.0","dist":{"integrity":"sha512-YOvOKL21bkeyZ0n3H5de0dDvgbRdI5xIxZV03GpBlweYO5oYIPSJftWNAUrqRGwmNmyvE23sQ+BxIxsOhUTS2Q==","shasum":"69a9cd7e23de37d14f5222af341ee17d3e7e8cc1","tarball":"https://registry.npmjs.org/@cogflows/promptcode-preset-mcp/-/promptcode-preset-mcp-1.0.2.tgz","fileCount":24,"unpackedSize":31012,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIGecPGPZ182Sm4e3gdTxhc0AST8P3TmjB397hf5orIfgAiEAntJB2UkDa5wiGZpzWfK5RqigtvyeUEQzCaYuwFhSGXk="}]},"_npmUser":{"name":"cogflows","email":"rubin.asaf@gmail.com"},"directories":{},"maintainers":[{"name":"cogflows","email":"rubin.asaf@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/promptcode-preset-mcp_1.0.2_1748895548533_0.6391970395333422"},"_hasShrinkwrap":false}},"time":{"created":"2025-06-02T19:38:04.038Z","modified":"2025-06-02T20:19:08.889Z","1.0.0":"2025-06-02T19:38:04.306Z","1.0.1":"2025-06-02T20:16:18.430Z","1.0.2":"2025-06-02T20:19:08.717Z"},"bugs":{"url":"https://github.com/cogflows/promptcode-preset-mcp/issues"},"author":{"name":"cogflows"},"license":"MIT","homepage":"https://github.com/cogflows/promptcode-preset-mcp#readme","keywords":["cli","prompt","code","preset","ai","llm"],"repository":{"type":"git","url":"git+https://github.com/cogflows/promptcode-preset-mcp.git"},"description":"CLI tool for managing file presets for code prompting","maintainers":[{"name":"cogflows","email":"rubin.asaf@gmail.com"}],"readme":"# promptcode-preset-mcp\n\nA CLI tool for managing file presets for code prompting. Quickly assemble collections of files from your codebase into prompts for AI/LLM interactions.\n\n## Installation\n\n### Global installation (recommended)\n\n```bash\n# Install from npm\npnpm install -g @cogflows/promptcode-preset-mcp\n\n# Or install from GitHub\npnpm install -g github:cogflows/promptcode-preset-mcp\n```\n\n### Local development\n\n```bash\n# Clone the repository\ngit clone https://github.com/cogflows/promptcode-preset-mcp.git\ncd promptcode-preset-mcp\n\n# Install dependencies\npnpm install\n\n# Build and link globally\npnpm build\npnpm link --global\n```\n\n## Usage\n\n### List presets\n\n```bash\npromptcode ls\n```\n\n### Get preset content\n\n```bash\n# Export to temp file and print path\npromptcode get <preset-name>\n\n# Export and open in default editor\npromptcode get <preset-name> --open\n```\n\n### Set workspace directory\n\n```bash\n# Use environment variable\nWORKSPACE=/path/to/project promptcode ls\nWORKSPACE=/path/to/project promptcode get core\n```\n\n## Creating Presets\n\nPresets are JSON files stored in `.promptcode/presets/` within your workspace directory.\n\nExample preset file `.promptcode/presets/core.json`:\n\n```json\n{\n  \"name\": \"core\",\n  \"files\": [\n    \"src/main.ts\",\n    \"src/utils.ts\",\n    \"README.md\"\n  ]\n}\n```\n\n## Example Workflow\n\n1. Create a presets directory in your project:\n   ```bash\n   mkdir -p .promptcode/presets\n   ```\n\n2. Create preset files:\n   ```bash\n   echo '{\n     \"name\": \"api\",\n     \"files\": [\"src/api/index.ts\", \"src/api/routes.ts\", \"src/types.ts\"]\n   }' > .promptcode/presets/api.json\n   ```\n\n3. List available presets:\n   ```bash\n   promptcode ls\n   ```\n   Output:\n   ```json\n   [\n     {\n       \"name\": \"api\",\n       \"fileCount\": 3,\n       \"totalTokens\": 1250\n     }\n   ]\n   ```\n\n4. Export preset content:\n   ```bash\n   promptcode get api\n   ```\n   Output: `/var/folders/.../T/preset-api-2025-06-02T19-12-41-238Z.txt`\n\n5. Use the exported file with your AI tool:\n   ```bash\n   # Copy to clipboard (macOS)\n   cat $(promptcode get api) | pbcopy\n   \n   # Or open directly\n   promptcode get api --open\n   ```\n\n## Features\n\n- **Token counting**: Uses OpenAI's tiktoken to count tokens in files\n- **Caching**: Token counts are cached for performance\n- **Workspace support**: Work with presets from any project directory\n- **Clean output**: Returns just the file path for easy scripting\n\n## Development\n\nThe project is written in TypeScript and uses:\n- Node.js ES modules\n- tiktoken for token counting\n- TypeScript for type safety\n\n### Project Structure\n\n```\nsrc/\n├── cli.ts           # CLI interface\n├── presetManager.ts # Preset loading/saving logic\n├── tokenCounter.ts  # Token counting with caching\n└── types/\n    └── filePreset.ts # TypeScript interfaces\n```","readmeFilename":"README.md"}