UNPKG

vibe-coding-toolbox

Version:

CLI tools for AI-powered prompt enhancement, local project scanning, and component analysis - extends vibecodingtoolbox.com

267 lines (183 loc) 6.34 kB
# Vibe Coding Toolbox CLI A powerful command-line interface for AI-powered prompt enhancement, code analysis, and project optimization. Seamlessly integrates with [vibecodingtoolbox.com](https://vibecodingtoolbox.com) to bring advanced AI capabilities directly to your terminal. ## Features - 🚀 **AI-Powered Prompt Enhancement** - Transform basic prompts into comprehensive, context-aware instructions - 📁 **Smart Project Scanning** - Automatically analyze your codebase structure and generate relevant context - 🔍 **Semantic Code Search** - Find relevant files and code snippets using natural language queries - 🧩 **Component Analysis** - Analyze UI components for complexity, reusability, and best practices - 🔐 **Secure Authentication** - API key encryption and secure storage - 💰 **Credit Management** - Track and manage your API usage credits - 🎯 **Extended Framework Detection** - Automatic detection of 55+ frameworks across 7 categories including web frameworks, databases, CSS/UI libraries, build tools, API technologies, testing frameworks, and infrastructure tools ## Installation ```bash npm install -g vibe-coding-toolbox ``` Or use with npx: ```bash npx vibe-coding-toolbox ``` ## Quick Start ### 1. Authenticate First, authenticate with your Vibe Coding Toolbox API key: ```bash vibe auth login ``` You'll be prompted to enter your API key, which you can get from [vibecodingtoolbox.com/user/api-keys](https://vibecodingtoolbox.com/user/api-keys). ### 2. Enhance a Prompt ```bash vibe enhance "Create a React component for user authentication" ``` ### 3. Scan Your Project ```bash vibe scan ``` This generates a comprehensive analysis of your project structure, which is automatically used to provide context for prompt enhancement. ## Commands ### Authentication ```bash # Login with API key vibe auth login # Check authentication status vibe auth status # Logout vibe auth logout ``` ### Prompt Enhancement ```bash # Enhance a simple prompt vibe enhance "your prompt here" # Enhance from file vibe enhance --file prompt.txt # Interactive mode vibe enhance --interactive # Batch processing vibe enhance --batch "prompts/*.txt" # With specific context vibe enhance "your prompt" --context code # Output formats vibe enhance "your prompt" --format json vibe enhance "your prompt" --output enhanced.md ``` ### Project Scanning ```bash # Scan current directory with auto framework detection vibe scan --auto-frameworks # Scan specific directory vibe scan /path/to/project # Output scan results with categorized frameworks vibe scan --output scan-results.json # Semantic search through files vibe scan --query "authentication logic" # Skip interactive framework confirmation vibe scan --auto-frameworks --non-interactive ``` ### Component Analysis ```bash # Analyze all components vibe component analyze # Analyze specific component vibe component analyze Button # Show complexity metrics vibe component complexity # Get reusability suggestions vibe component suggestions ``` ### Credit Management ```bash # Check credit balance vibe credits check # View credit history vibe credits history ``` ## Configuration The CLI stores configuration in `~/.vibe-toolbox/config.json`. You can also use environment variables: ```bash # Set API key via environment variable export VIBE_API_KEY=your-api-key # Set API endpoint (for development) export VIBE_API_URL=https://custom-endpoint.com ``` ## Examples ### Example 1: Enhancing a Complex Prompt with Project Context ```bash # First, scan your project vibe scan # Then enhance with automatic context vibe enhance "Add user authentication with JWT tokens and refresh token rotation" ``` ### Example 2: Batch Processing Multiple Prompts ```bash # Create a directory with prompt files mkdir prompts echo "Create a REST API endpoint" > prompts/api.txt echo "Add database migrations" > prompts/migrations.txt # Process all prompts vibe enhance --batch "prompts/*.txt" --output results/ ``` ### Example 3: Component Analysis for React Project ```bash # Analyze all components in your React project vibe component analyze # Get specific suggestions for improvement vibe component suggestions # Check complexity of specific component vibe component analyze Header ``` ### Example 4: Semantic Code Search ```bash # Find files related to authentication vibe scan --query "authentication and login" # Find database-related code vibe scan --query "database connection and queries" ``` ## Output Formats The CLI supports multiple output formats: - **Text** (default) - Human-readable format with colors - **JSON** - Machine-readable format for integration - **Markdown** - Documentation-ready format ```bash # JSON output vibe enhance "your prompt" --format json # Markdown output vibe enhance "your prompt" --format markdown --output enhanced.md ``` ## Integration with CI/CD The CLI can be integrated into your development workflow: ```yaml # GitHub Actions example steps: - uses: actions/checkout@v2 - name: Install Vibe CLI run: npm install -g vibe-coding-toolbox - name: Scan Project run: vibe scan --output scan-results.json env: VIBE_API_KEY: ${{ secrets.VIBE_API_KEY }} ``` ## Troubleshooting ### Common Issues **Authentication Failed** - Ensure your API key is correct - Check your internet connection - Verify your account is active at vibecodingtoolbox.com **Insufficient Credits** - Check your balance with `vibe credits check` - Purchase more credits at vibecodingtoolbox.com/user/subscription **Command Not Found** - Ensure the package is installed globally - Try using npx: `npx vibe-coding-toolbox` ### Debug Mode Enable debug logging for troubleshooting: ```bash DEBUG=vibe:* vibe enhance "your prompt" ``` ## Support - Documentation: [vibecodingtoolbox.com/docs](https://vibecodingtoolbox.com/docs) - Issues: [GitHub Issues](https://github.com/yourusername/vibe-coding-toolbox/issues) - Email: support@vibecodingtoolbox.com ## License This project is licensed under the MIT License. See [LICENSE](LICENSE) file for details. ## Contributing Contributions are welcome! Please read our [Contributing Guide](CONTRIBUTING.md) for details on our code of conduct and the process for submitting pull requests. --- Built with ❤️ by the Vibe Coding Toolbox team