vibecheck-isl-studio 1.0.0
VibeCheck ISL Studio Python API Server - AI-powered code generation and verification
License: MIT
Requires Python: >=3.8
Keywords: ai, code-generation, verification, isl, vibecheck

# VibeCheck ISL Studio Python API

[![PyPI version](https://badge.fury.io/py/vibecheck-isl-studio.svg)](https://badge.fury.io/py/vibecheck-isl-studio)
[![Python 3.8+](https://img.shields.io/badge/python-3.8+-blue.svg)](https://www.python.org/downloads/)

The official Python API server for VibeCheck ISL Studio, providing AI-powered code generation and verification capabilities.

## 🚀 Quick Start

### Installation

```bash
# Install from PyPI
pip install vibecheck-isl-studio

# Or install with development dependencies
pip install vibecheck-isl-studio[dev]

# Or install with QA dependencies
pip install vibecheck-isl-studio[qa]
```

### Usage

```bash
# Start the server
vibecheck-isl-server start

# Start on custom port
vibecheck-isl-server start --port 8080

# Start with debug mode
vibecheck-isl-server start --debug
```

The server will start on `http://localhost:8000` by default.

### API Endpoints

- `GET /health` - Health check
- `POST /api/generate` - Generate code from description
- `POST /api/validate` - Validate generated code
- `POST /api/chat` - Chat with AI assistant

## ⚙️ Configuration

Set environment variables for API keys:

```bash
export OPENAI_API_KEY="your-openai-key"
export ANTHROPIC_API_KEY="your-anthropic-key"
```

Or pass API keys via HTTP headers:

```bash
curl -X POST http://localhost:8000/api/generate \
  -H "Content-Type: application/json" \
  -H "X-OpenAI-API-Key: your-openai-key" \
  -d '{"description": "Build a todo app"}'
```

## 🛠️ Development

### Setup for Development

```bash
# Clone the repository
git clone https://github.com/vibecheck/vibez.git
cd vibez/langchain

# Install in development mode
pip install -e .[dev]

# Run tests
pytest

# Format code
black src/
ruff check src/

# Type checking
mypy src/
```

### CLI Commands

```bash
# Check installation
vibecheck-isl-server check

# Install dependencies
vibecheck-isl-server install

# Install with dev dependencies
vibecheck-isl-server install --dev

# Show configuration
vibecheck-isl-server config

# Show configuration with secrets
vibecheck-isl-server config --show-secrets
```

## 📚 API Documentation

### Generate Code

```bash
curl -X POST http://localhost:8000/api/generate \
  -H "Content-Type: application/json" \
  -H "X-OpenAI-API-Key: your-key" \
  -d '{
    "description": "Build a React todo app with TypeScript",
    "template_style": "modern",
    "tech_stack_preferences": {
      "frontend_framework": "react",
      "backend": "nodejs",
      "database": "postgresql"
    }
  }'
```

### Validate Code

```bash
curl -X POST http://localhost:8000/api/validate \
  -H "Content-Type: application/json" \
  -d '{
    "files": {
      "src/App.tsx": "import React from 'react';\n\nexport default function App() {\n  return <div>Hello World</div>;\n}"
    },
    "project_type": "web"
  }'
```

### Chat with AI

```bash
curl -X POST http://localhost:8000/api/chat \
  -H "Content-Type: application/json" \
  -H "X-OpenAI-API-Key: your-key" \
  -d '{
    "message": "How do I add authentication to my React app?",
    "session_id": "optional-session-id"
  }'
```

## 🔧 Configuration Options

| Environment Variable | Default | Description |
|---------------------|---------|-------------|
| `ISL_STUDIO_HOST` | `0.0.0.0` | Server host |
| `ISL_STUDIO_PORT` | `8000` | Server port |
| `ISL_STUDIO_DEBUG` | `false` | Debug mode |
| `ISL_STUDIO_LOG_LEVEL` | `INFO` | Log level |
| `OPENAI_API_KEY` | - | OpenAI API key |
| `ANTHROPIC_API_KEY` | - | Anthropic API key |

## 🤝 Integration with VS Code

The VS Code extension can automatically start this server when needed. No manual installation required - the extension handles everything for you!

## 📝 License

MIT License - see LICENSE file for details.

## 🆘 Support

- 📖 [Documentation](https://docs.vibecheck.ai)
- 🐛 [Issues](https://github.com/vibecheck/vibez/issues)
- 💬 [Discord](https://discord.gg/vibecheck)

---

Made with ❤️ by [VibeCheck](https://vibecheck.ai)