@thongntit/tprompts
v0.2.0
Published
Universal AI prompt installer for coding editors
Maintainers
Readme
tprompts
Universal CLI for installing prompt packs directly into your coding editors. Install prompts from any GitHub URL into VS Code, Cursor, Windsurf, Claude Code, or any other editor - no registration required.
Repository Layout
src/– TypeScript source for the Oclif-based CLI (all commands)lib/– Compiled JavaScript emitted bynpm run build(published to npm)example-prompts/– A sample prompts repository that demonstrates thetprompts.jsonformatdocs/tprompts-plan.md– Design document and implementation notesclaude.md– Comprehensive documentation for all CLI commandsnode_modules/,package.json,tsconfig.json– Standard Node.js project scaffolding
Key Features
- Direct URL Installation: Install prompts directly from GitHub URLs - no registration needed
- Universal Editor Support: Works with any editor - not limited to predefined list
- Smart Installation: Prefix/suffix processing, conflict detection, and dry-run mode
- Simple & Fast: One command to install, one to remove
- Preview Changes: Use
--dry-runto see what will be installed before making changes
Prerequisites
- Node.js 16+
- Git (required when registering remote repositories)
Getting Started
# Install dependencies
npm install
# Run the CLI in watch mode during development
npm run dev -- --help
# Or build once and run the compiled CLI
npm run build
node lib/cli.js --helpYou can also execute the TypeScript entry point directly:
npx tsx src/cli.ts <command> [flags]Quick Start
# Install globally
npm install -g @thongntit/tprompts
# Or use with npx
npx @thongntit/tprompts --helpUsage
# Install a prompt from GitHub URL
tprompts install https://github.com/user/repo/prompt-name vscode
tprompts install https://github.com/user/repo/tree/main/prompts/my-prompt cursor
# Works with any editor name your prompt pack supports
tprompts install https://github.com/thongntit/prompts/tree/main/prompts/obisidian-second-brain claude
tprompts install https://github.com/user/repo/prompt windsurf
# Preview before installing
tprompts install https://github.com/user/repo/prompt vscode --dry-run
# Force overwrite existing files
tprompts install https://github.com/user/repo/prompt cursor --forcePrompt Repository Format
Each prompt pack lives in its own folder and must include a tprompts.json configuration file describing how files should be installed per editor. A minimal example:
{
"name": "Coding Assistant",
"description": "Shared rules for the coding assistant persona",
"editors": {
"vscode": {
"system-prompt.md": {
"location": ".vscode/ai-assistant.md",
"prefix": "---\nrole: system\napplyTo: '**'\n---\n\n"
},
"commands/": {
"location": ".vscode/commands/",
"suffix": "\n\n<!-- Generated by tprompts -->"
}
},
"cursor": {
"system-prompt.md": {
"location": ".cursorrules"
}
}
}
}Configuration options include:
location: Destination path relative to the project rootprefix/suffix: Optional text injected before or after file contents- Directory support: Point a configuration key at a source directory (
commands/above) to copy all of its files recursively while keeping the structure intact
Refer to example-prompts/ for complete, multi-editor configurations.
Local State
- Registry and settings live in
~/.tprompts/repos.jsonand~/.tprompts/config.json - Git repositories registered through
tprompts register <url>are cloned into~/.tprompts/repositories/<name> - Installations write directly into your current working directory; use
--dry-runto preview changes
Development
npm run dev– Execute the CLI viatsx(passes additional args after--)npm run build– Compile TypeScript tolib/npm test– Reserved for Jest tests (no suites yet)
Available Commands
tprompts install <github-url> <editor>- Install prompts from a GitHub URL- Options:
--dry-run,--force,-e/--editor
- Options:
Run tprompts --help or tprompts install --help for detailed usage information.
Full command documentation is available in claude.md.
Documentation
claude.md- Comprehensive command reference with examplesdocs/tprompts-plan.md- Design document and implementation notesexample-prompts/- Sample prompt repository demonstrating the format
