DevPromptly VS Code Extension
A VS Code extension that integrates with DevPromptly to help you access and insert prompts directly in your editor.
Features
- 🔐 Authentication: Login with email/password or Google
- 📝 Prompt Browsing: Browse and search through your DevPromptly prompts
- ⚡ Quick Insert: Insert prompts directly into your code
- 🤖 AI Refinement: Refine selected text using AI agents (GPT-5, Claude, Gemini)
- 📊 Smart Search: Search through prompt questions, answers, and tags
Installation
From Source (Development)
- Clone this repository
- Navigate to the
vscode-extension
directory
- Install dependencies:
npm install
- Compile the extension:
npm run compile
- Press
F5
in VS Code to run the extension in a new Extension Development Host window
From VSIX Package (Production)
- Package the extension:
npm run vscode:prepublish
npx vsce package
- Install the generated
.vsix
file in VS Code
Configuration
The extension can be configured through VS Code settings:
devpromptly.environment
: Set to "production" or "staging" (default: "production")
devpromptly.apiUrl
: Override the API base URL if needed
Usage
Getting Started
- Login: Click the DevPromptly icon in the status bar or use
Ctrl+Shift+P
→ "DevPromptly: Login to DevPromptly"
- Browse Prompts: Use
Ctrl+Shift+P
→ "DevPromptly: List Prompts" to browse available prompts
- Insert Prompts: Select a prompt and choose what to insert (question, answer, or both)
Commands
Command |
Description |
DevPromptly: Login to DevPromptly |
Authenticate with DevPromptly |
DevPromptly: List Prompts |
Browse and search prompts |
DevPromptly: Search & Insert Prompt |
Search for a specific prompt and insert it |
DevPromptly: Refine Selected Text |
Use AI to refine selected text |
DevPromptly: Logout |
Sign out of DevPromptly |
Right-click in the editor to access:
- Insert Prompt: Search and insert a prompt at cursor position
- Refine Selected Text: Refine the selected text using AI
Status Bar
The status bar shows your authentication status:
- 🔐 Sign In: Click to login when not authenticated
- 📖 DevPromptly: Click to browse prompts when authenticated
Features in Detail
Authentication
The extension supports multiple authentication methods:
- Email/Password: Traditional email and password login
- Google OAuth: Sign in with your Google account
- Anonymous: Automatic anonymous access for basic features
Prompt Management
- Search: Search through prompt questions, answers, and tags
- Sort: Sort by date, popularity, rating, etc.
- Insert Options: Choose to insert question only, answer only, or both
AI Refinement
Select any text in your editor and use the "Refine Selected Text" command to:
- Improve clarity and specificity
- Add context where helpful
- Follow AI prompting best practices
- Choose from GPT-5, Claude, or Gemini
Development
Project Structure
vscode-extension/
├── src/
│ ├── config/
│ │ └── firebase.ts # Firebase configuration
│ ├── services/
│ │ ├── authService.ts # Authentication management
│ │ ├── apiService.ts # API communication
│ │ └── promptService.ts # Prompt operations
│ ├── types.ts # TypeScript type definitions
│ └── extension.ts # Main extension entry point
├── package.json # Extension manifest
├── tsconfig.json # TypeScript configuration
└── README.md # This file
Building
# Install dependencies
npm install
# Compile TypeScript
npm run compile
# Watch for changes
npm run watch
# Package for distribution
npm run vscode:prepublish
npx vsce package
Testing
# Run linting
npm run lint
# Run tests (when implemented)
npm test
API Integration
The extension integrates with DevPromptly's Firebase Functions:
- Authentication: Uses Firebase Auth for user management
- Prompts: Fetches prompts from Firestore (currently using mock data)
- AI Services: Uses Firebase Functions for prompt refinement and chat
Environment Configuration
- Production:
https://us-central1-devpromptly-adeca.cloudfunctions.net
- Staging:
https://us-central1-devpromptly-staging.cloudfunctions.net
Troubleshooting
Common Issues
Authentication Fails
- Check your internet connection
- Verify your DevPromptly account credentials
- Try logging out and back in
Prompts Not Loading
- Ensure you're authenticated
- Check the API configuration in settings
- Verify the environment setting matches your account
AI Refinement Not Working
- Ensure you have selected text in the editor
- Check that you're authenticated (AI features require login)
- Verify the Firebase Functions are accessible
Debug Mode
Enable debug logging by setting the VS Code setting:
{
"devpromptly.debug": true
}
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
License
This extension is part of the DevPromptly project. See the main repository for license information.
Support
For issues and feature requests, please use the GitHub issue tracker in the main DevPromptly repository.