{"id":26696231,"url":"https://github.com/cogflows/promptcode-vscode","last_synced_at":"2025-12-24T23:14:02.549Z","repository":{"id":284393327,"uuid":"954765980","full_name":"cogflows/promptcode-vscode","owner":"cogflows","description":"PromptCode: The VS Code extension that saves the day when your AI code agent (Cursor, etc.) hits a wall. You're in control—select files, craft precise prompts, and effortlessly apply fixes using your favorite LLM.","archived":false,"fork":false,"pushed_at":"2025-03-25T17:04:12.000Z","size":187,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-25T17:40:53.883Z","etag":null,"topics":["ai-assistant","ai-prompts","anthropic","code-assistant","code-generation","cursor","llm","openai","prompt-engineering","prompt-management","vscode-extension","windsurf"],"latest_commit_sha":null,"homepage":"https://marketplace.visualstudio.com/items?itemName=cogflows.promptcode","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cogflows.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-25T15:26:58.000Z","updated_at":"2025-03-25T17:04:16.000Z","dependencies_parsed_at":"2025-03-25T17:42:01.795Z","dependency_job_id":"09499861-fa7b-49e5-ad39-4a3c491c9f11","html_url":"https://github.com/cogflows/promptcode-vscode","commit_stats":null,"previous_names":["cogflows/promptcode-vscode"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cogflows%2Fpromptcode-vscode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cogflows%2Fpromptcode-vscode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cogflows%2Fpromptcode-vscode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cogflows%2Fpromptcode-vscode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cogflows","download_url":"https://codeload.github.com/cogflows/promptcode-vscode/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245727761,"owners_count":20662558,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai-assistant","ai-prompts","anthropic","code-assistant","code-generation","cursor","llm","openai","prompt-engineering","prompt-management","vscode-extension","windsurf"],"created_at":"2025-03-26T20:18:15.542Z","updated_at":"2025-12-24T23:14:02.543Z","avatar_url":"https://github.com/cogflows.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PromptCode\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![GitHub release](https://img.shields.io/github/v/release/cogflows/promptcode-vscode)](https://github.com/cogflows/promptcode-vscode/releases/latest)\n[![Downloads](https://img.shields.io/github/downloads/cogflows/promptcode-vscode/total)](https://github.com/cogflows/promptcode-vscode/releases)\n[![Platform](https://img.shields.io/badge/Platform-VSCode%20%7C%20CLI-blue)](https://github.com/cogflows/promptcode-vscode)\n[![VS Code Extension](https://img.shields.io/badge/VS%20Code-Extension-blue)](https://marketplace.visualstudio.com/items?itemName=cogflows.promptcode)\n[![CLI Tool](https://img.shields.io/badge/CLI-Available-green)](https://github.com/cogflows/promptcode-vscode/releases/latest)\n\n\u003e **The ultimate rescue tool when AI code agents hit their limits**\n\nPromptCode is your go-to solution when code agents like Cursor or Windsurf hit a wall. Available as both a powerful [VS Code extension](https://marketplace.visualstudio.com/items?itemName=cogflows.promptcode) and a standalone [CLI tool](https://github.com/cogflows/promptcode-vscode/tree/main/packages/cli#readme), PromptCode supercharges your workflow with improved code-to-AI connections. It seamlessly bridges your codebase with your favorite AI models—including those without direct API access, like GPT-5 or Grok. Pick your file context, craft precise prompt templates, generate AI prompts, and even parse the responses—whether you prefer the rich VS Code interface or the flexibility of the command line.\n\n## Demo Video\n\nWatch this short demo to see PromptCode in action:\n\n[![PromptCode Video](https://img.youtube.com/vi/dUpdSAPklfo/0.jpg)](https://www.youtube.com/watch?v=dUpdSAPklfo)\n\n## Quick Start\n\nChoose your path:\n\n### VS Code Extension\n1. Install from the [VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=cogflows.promptcode)\n2. Open Command Palette (`Cmd/Ctrl+Shift+P`) → \"PromptCode: Show\"\n3. Select files, add instructions, generate prompts\n\n### CLI Tool\n```bash\n# macOS/Linux\ncurl -fsSL https://raw.githubusercontent.com/cogflows/promptcode-vscode/main/packages/cli/scripts/install.sh | bash\n\n# Windows PowerShell\nirm https://raw.githubusercontent.com/cogflows/promptcode-vscode/main/packages/cli/scripts/install.ps1 | iex\n\n# Quick test\npromptcode expert \"Explain this code\" -f \"src/**/*.ts\"\n```\n\n## Why PromptCode?\n\nWhen your trusty code agent stumbles, PromptCode steps in as the ultimate rescue tool. Its unique strength lies in bridging the gap between your codebase and AI models, offering a structured, intuitive way to:\n\n- **Select specific files** as context for your prompts\n- **Add custom instructions** or use prompt templates for clarity\n- **Two ways to work**: Rich VS Code UI or powerful CLI—your choice\n- **Work with any AI model**, even those tricky non-API ones\n- **Parse and apply AI responses** directly to your code, implement yourself, or paste the response to your AI code agent\n\nNo more fumbling with scattered tools or manual context copying—PromptCode keeps it all in one place, right where you code.\n\n## Key Features\n\n### 🔍 Smart Context Selection\n- **Intuitive File Picker**: Hand-pick files from your workspace to give your AI the exact context it needs\n- **Intelligent Filtering**: Quickly filter relevant files with smart search and .gitignore/.promptcode_ignore support\n- **Token Optimization**: See real-time token counts to maximize your context window\n\n### ✏️ Instruction Builder\n- **Custom Templates**: Built-in prompt templates for common coding tasks (refactoring, bug fixing, optimization, etc.)\n- **@mention System**: Quickly insert templates with our `@` mention system (type @ in the instructions field)\n- **Workspace Templates**: Create your own project-specific templates in `.promptcode/prompts`\n\n### 💬 Universal AI Compatibility\n- **Copy \u0026 Paste**: Works with ANY AI model or assistant - including OpenAI, Anthropic Claude, Google Gemini, and others\n- **No API Required**: Use with web interfaces, desktop apps, or private instances\n- **Supplement Your Workflow**: Perfect companion to Cursor, Windsurf, GitHub Copilot, and other AI coding tools\n\n### 🔄 Structured Output Processing\n- **Code Change Extraction**: Automatically parse code changes from AI responses\n- **Smart Code Diff**: Preview changes with side-by-side diffs before applying\n- **Bulk Apply**: Apply multiple file changes with a single click\n\n### 🚀 CLI Features\n- **Expert Mode**: Direct AI consultation with codebase context\n- **Preset Management**: Save and reuse file selection patterns\n- **Cost Controls**: Budget caps, dry-run mode, and approval workflows\n- **Claude Code Integration**: Custom slash commands for Claude Code (`promptcode cc`)\n- **Cursor Integration**: Teach Cursor's AI about your codebase (`promptcode cursor`)\n- **Auto-Updates**: Keep CLI current with `promptcode update`\n\n## Supported AI Models\n\nPromptCode supports the latest models from OpenAI (GPT-5.1, O3), Anthropic (Claude 4), Google (Gemini 3), and xAI (Grok 4).\n\n```bash\npromptcode expert --models  # View all models with pricing\n```\n\n## Usage\n\n### VS Code Extension Workflow\n\n1. **Select Files**: Open the PromptCode view and use the file explorer to choose the files you want as context.\n2. **Add Instructions**: Switch to the Instructions tab, type @ to pull up prompt templates, or write custom directions.\n3. **Generate Prompt**: Review your polished prompt in the Generate Prompt tab—copy it or open it in the editor.\n4. **Apply Changes**: Paste the AI's response in the Merge tab to review and apply suggested edits effortlessly.\n\n### CLI Workflow\n\n```bash\n# Set up AI agent integrations\npromptcode cc           # Install Claude Code slash commands\npromptcode cursor       # Enhance Cursor's AI capabilities\n\n# Create a reusable preset for your API files\npromptcode preset create api --from-files \"src/api/**/*.ts\" \"src/models/**/*.ts\"\n\n# Get expert consultation with preset context\npromptcode expert \"How can I optimize these database queries?\" --preset api\n\n# Generate a prompt for external use\npromptcode generate --preset api --template refactor -o prompt.txt\n\n# Direct file analysis\npromptcode expert \"Review for security issues\" -f \"src/auth/*.ts\" --model gpt-5\n```\n\n## Configuration\n\nTailor PromptCode to your needs with these options:\n\n- **Ignore Patterns**: Define which files to skip when selecting context (e.g., node_modules/ or .git/).\n- **Prompt Folders**: Point to directories housing your custom prompt templates for quick access (e.g., .cursorrule, ai-docs).\n\n## Requirements\n\n### VS Code Extension\n- VS Code ≥ 1.96.0\n- Windows, macOS, or Linux\n\n### CLI Tool\n- macOS (Intel/Apple Silicon), Linux (x64), or Windows (x64)\n- Internet connection for AI consultations\n- API keys for AI providers (OpenAI, Anthropic, Google, or xAI)\n\n## Installation\n\nChoose the tool that fits your workflow—or use both!\n\n### VS Code Extension\n\nInstall from the [Visual Studio Code Marketplace](https://marketplace.visualstudio.com/items?itemName=cogflows.promptcode) or search for \"PromptCode\" in VS Code Extensions.\n\n**Features:**\n- Visual file selection with tree view\n- Real-time token counting\n- Built-in prompt templates\n- AI response parsing and diff view\n- Settings sync across devices\n\n### CLI Tool\n\nPerfect for terminal workflows, automation, and CI/CD pipelines.\n\n#### Quick Install\n```bash\n# macOS/Linux\ncurl -fsSL https://raw.githubusercontent.com/cogflows/promptcode-vscode/main/packages/cli/scripts/install.sh | bash\n\n# Windows PowerShell  \nirm https://raw.githubusercontent.com/cogflows/promptcode-vscode/main/packages/cli/scripts/install.ps1 | iex\n```\n\n#### Update \u0026 Uninstall\n```bash\npromptcode update      # Self-update to latest version\npromptcode uninstall   # Remove CLI and clean up\n```\n\n**Features:**\n- Expert Mode: Direct AI consultation with codebase context\n- Preset Management: Save and reuse file selection patterns\n- Template Support: Apply structured prompts for common tasks\n- Multi-Model Support: Works with OpenAI, Anthropic, Google, and xAI models\n- Claude Code Integration: Install custom slash commands with `promptcode cc`\n- Cursor Integration: Enhance Cursor's AI with `promptcode cursor`\n\nSee the [CLI documentation](packages/cli/README.md) for detailed usage, integration setup, and examples.\n\n## Contributing\n\nWe welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for details on how to get started.\n\n## Telemetry\n\nPromptCode collects anonymous usage data (which features are used and any errors encountered) to improve the extension. This respects VS Code's telemetry settings and can be disabled via `promptcode.enableTelemetry` setting. No personal data, file contents, prompts, or code are ever collected.\n\n## Copyright\n\n© 2025 cogflows. All Rights Reserved.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcogflows%2Fpromptcode-vscode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcogflows%2Fpromptcode-vscode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcogflows%2Fpromptcode-vscode/lists"}