Skip to content

An AI-powered coding assistant that can control your computer, write code, debug issues, and automate development tasks.

License

Notifications You must be signed in to change notification settings

Cordycepsers/computer-use-coding-assistant

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

12 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Hero Image

πŸ€– Computer Use Coding Assistant

An AI-powered coding assistant that can control your computer, write code, debug issues, and automate development tasks.

πŸš€ Features

  • AI Code Generation - Generate code in any language with natural language descriptions
  • Intelligent Debugging - Analyze and fix bugs with AI assistance
  • Code Refactoring - Improve code quality and performance automatically
  • Test Generation - Create comprehensive test suites
  • Documentation - Generate API docs, READMEs, and code comments
  • Computer Control - AI can control desktop, run commands, and use IDEs
  • Full Monitoring - Production-ready logging, metrics, and alerting

πŸ“‹ Prerequisites

  • Docker & Docker Compose
  • Anthropic API Key (Get one here)
  • 8GB+ RAM recommended
  • 20GB+ free disk space

🎯 Quick Start

1. Configure API Key

Edit .env file and add your Anthropic API key:

ANTHROPIC_API_KEY=sk-ant-api03-xxxxx...

2. Start the Application

./scripts/start.sh

3. Access the Application

πŸ“– Usage

Via Web Interface

  1. Open http://localhost:8080
  2. Enter your coding task
  3. Select language and preferences
  4. Click "Generate Code"
  5. View results and download code

Via API

import requests

response = requests.post(
    "http://localhost:8000/execute",
    json={
        "task": "Create a Python REST API for todo management",
        "context": {"language": "python", "framework": "fastapi"}
    }
)
print(response.json())

Via Command Line

curl -X POST "http://localhost:8000/execute" \
  -H "Content-Type: application/json" \
  -d '{"task": "Write a sorting algorithm in Python"}'

πŸ› οΈ Configuration

Environment Variables

See .env file for all configuration options:

  • ANTHROPIC_API_KEY - Your API key (required)
  • LOG_LEVEL - Logging level (INFO, DEBUG, ERROR)
  • VNC_PASSWORD - VNC access password
  • Alert configurations (Email, Slack, PagerDuty)

Ports

Service Port Description
Streamlit 8080 Main web interface
FastAPI 8000 REST API
VNC 5900 VNC desktop access
noVNC 6080 Web-based VNC
Code Server 8443 VS Code in browser
Grafana 3000 Monitoring dashboards
Prometheus 9091 Metrics

πŸ“Š Monitoring

Accessing Monitoring Tools

Available Metrics

  • Request rate and latency
  • Error rates by type
  • Task completion times
  • System resources (CPU, memory, disk)
  • Active sessions

Alerts

Configure alerts in .env:

  • Email alerts via SMTP
  • Slack webhooks
  • PagerDuty integration

πŸ”§ Management

Start Services

./scripts/start.sh

Stop Services

./scripts/stop.sh

View Logs

docker-compose logs -f

Update Application

./scripts/update.sh

Create Backup

./scripts/backup.sh

Enter Container

docker exec -it computer-use-coding bash

πŸ“ Project Structure

computer-use-coding-assistant/
 ──                 
│── agent/             # AI agent logic
│── api/               # FastAPI server
│── monitoring/        # Monitoring tools
β”œβ”€β”€ docker/                # Docker configuration
β”œβ”€β”€ monitoring/            # Monitoring configs
β”‚   β”œβ”€β”€ grafana/          # Grafana dashboards
β”‚   └── prometheus/       # Prometheus config
β”œβ”€β”€ projects/             # Project files
β”œβ”€β”€ logs/                 # Application logs
β”œβ”€β”€ scripts/              # Utility scripts
β”œβ”€β”€ docker-compose.yml    # Service orchestration
β”œβ”€β”€ .env                  # Configuration
└── README.md            # Documentation

πŸ› Troubleshooting

API Key Issues

  • Verify key in .env file
  • Check key has sufficient credits
  • Ensure key is active

Port Conflicts

  • Modify ports in docker-compose.yml
  • Check for conflicting services

Container Issues

# Check container status
docker-compose ps

# View logs
docker-compose logs coding-assistant

# Restart services
docker-compose restart

Performance Issues

  • Allocate more Docker resources
  • Check system requirements
  • Monitor via Grafana dashboards

πŸ”’ Security

  • Run in isolated Docker environment
  • VNC password protected
  • API key stored securely
  • Automatic log redaction
  • Network isolation

🀝 Support

πŸ“„ License

MIT License - See LICENSE file for details

πŸ™ Acknowledgments

Built with:

About

An AI-powered coding assistant that can control your computer, write code, debug issues, and automate development tasks.

Topics

Resources

License

Stars

Watchers

Forks