{"id":37359669,"url":"https://github.com/fotsakir/codehero","last_synced_at":"2026-01-26T14:03:15.660Z","repository":{"id":331540984,"uuid":"1130626845","full_name":"fotsakir/codehero","owner":"fotsakir","description":"Self-hosted AI Coding Agent powered by Claude | Autonomous Development Platform | POC for Human-AI Collaboration","archived":false,"fork":false,"pushed_at":"2026-01-23T16:28:45.000Z","size":16872,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-23T16:57:04.759Z","etag":null,"topics":["ai-coding-assistant","ai-developer","anthropic","automation","autonomous-agent","claude-ai","code-generation","flask","python","self-hosted"],"latest_commit_sha":null,"homepage":"https://fotsakir.github.io/codehero/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fotsakir.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-01-08T19:18:51.000Z","updated_at":"2026-01-23T16:28:49.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/fotsakir/codehero","commit_stats":null,"previous_names":["fotsakir/claude-ai-developer","fotsakir/codehero"],"tags_count":113,"template":false,"template_full_name":null,"purl":"pkg:github/fotsakir/codehero","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fotsakir%2Fcodehero","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fotsakir%2Fcodehero/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fotsakir%2Fcodehero/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fotsakir%2Fcodehero/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fotsakir","download_url":"https://codeload.github.com/fotsakir/codehero/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fotsakir%2Fcodehero/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28780043,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-26T13:55:28.044Z","status":"ssl_error","status_checked_at":"2026-01-26T13:55:26.068Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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-coding-assistant","ai-developer","anthropic","automation","autonomous-agent","claude-ai","code-generation","flask","python","self-hosted"],"created_at":"2026-01-16T04:44:18.242Z","updated_at":"2026-01-26T14:03:15.653Z","avatar_url":"https://github.com/fotsakir.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"assets/hero-icon.svg\" width=\"80\" height=\"96\" alt=\"CodeHero\"\u003e\n\u003c/p\u003e\n\n\u003ch1 align=\"center\"\u003eCodeHero\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cstrong\u003eThe Developer That Never Rests\u003c/strong\u003e\u003cbr\u003e\n  \u003cem\u003ePowered by Claude AI\u003c/em\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/badge/License-Dual-blue.svg\" alt=\"License\"\u003e\u003c/a\u003e\n  \u003ca href=\"CHANGELOG.md\"\u003e\u003cimg src=\"https://img.shields.io/badge/version-2.83.5-green.svg\" alt=\"Version\"\u003e\u003c/a\u003e\n  \u003cimg src=\"https://img.shields.io/badge/Ubuntu-22.04%20|%2024.04-orange.svg\" alt=\"Ubuntu\"\u003e\n  \u003ca href=\"https://anthropic.com\"\u003e\u003cimg src=\"https://img.shields.io/badge/Powered%20by-Claude%20AI-blueviolet.svg\" alt=\"Claude AI\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/fotsakir/codehero/stargazers\"\u003e\u003cimg src=\"https://img.shields.io/github/stars/fotsakir/codehero?style=social\" alt=\"Stars\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003e **This is not an AI that answers questions. It builds software.**\n\nInstead of chatting back and forth, this AI works inside a real development environment. Describe what you want, and it plans the project, writes code, and tracks its own progress — like a developer on your team.\n\nWhat makes it different is **control**. It understands your whole project, uses only the files it needs, avoids loops, and stops itself when something goes wrong.\n\nFor beginners, it removes complexity.\nFor developers, it removes noise.\n\n**Download it. Let it build.**\n\n### True Autonomy - Works While You Sleep\n\nUnlike chat-based AI tools that require constant prompting, this system runs **unattended for hours or even days**. Create your tickets, describe what you want, and walk away. Come back to find completed features, fixed bugs, and working code.\n\n- Queue multiple tasks across projects\n- AI works through them one by one\n- Built-in failsafe prevents runaway sessions\n- Wake up to progress, not prompts\n\n### Control Everything from Your Phone\n\nWork from anywhere with **two-way Telegram integration**. No need to open a laptop.\n\n- **Get instant alerts** when Claude needs your input or something fails\n- **Reply to continue** - just reply to any notification to give Claude new instructions\n- **Ask quick questions** - start with `?` to get status updates without triggering work\n- **Never lose time** - respond from the bus, the coffee shop, or your bed\n\n```\n📱 Notification: \"Task completed - awaiting review\"\n     ↓\n💬 You reply: \"add error handling too\"\n     ↓\n🤖 Claude continues working\n```\n\n---\n\n## Screenshots\n\n![Dashboard](screenshots/dashboard.png)\n*Dashboard - Real-time overview of projects, tickets, and usage statistics*\n\n![Tickets](screenshots/tickets.png)\n*Tickets - Track all development tasks across projects*\n\n![Projects](screenshots/projects.png)\n*Projects - Manage multiple projects with isolated environments*\n\n![Ticket Detail](screenshots/ticket-detail.png)\n*Ticket Detail - Claude's response with code and conversation history*\n\n![Console](screenshots/console.png)\n*Console - Real-time view of Claude working on tickets*\n\n---\n\n## Why CodeHero?\n\n| Challenge | Solution |\n|-----------|----------|\n| \"AI tools need constant prompting\" | **Set it and forget it** - Claude works for hours unattended |\n| \"I want to code more, but time is limited\" | **Multiply your output** - wake up to completed features |\n| \"Chat-based AI feels like extra work\" | **True autonomy** - describe once, Claude figures out the rest |\n| \"I need my code to stay private\" | **Self-hosted** - your code never leaves your infrastructure |\n| \"I want to think bigger, not type more\" | **Master from above** - architect solutions, let AI build them |\n\n## Key Features\n\n### Intelligent AI Features\n\n#### SmartContext - Intelligent Context Management\nClaude automatically understands your project structure without being told:\n- **Auto-detects** framework, language, and architecture\n- **Finds relevant files** based on the task at hand\n- **Builds minimal context** - only includes what's needed\n- **Learns patterns** from your codebase conventions\n- **Reduces token usage** by up to 70% vs. sending entire codebase\n\n#### AI Failsafe (Watchdog)\nBuilt-in protection against runaway AI sessions:\n- **Monitors all active tickets** every 30 minutes\n- **Detects stuck patterns**: repeated errors, circular behavior, no progress\n- **Auto-pauses problematic tickets** before excessive token usage\n- **Telegram notifications** when issues detected\n- **Explains why** it stopped in the conversation\n\n#### AI Project Manager (Blueprint Planner)\nLet Claude design and build your entire project from a single description:\n\n**How it works:**\n1. Describe what you want to build\n2. CodeHero Manager creates the plan (tech stack, features, database)\n3. Creates the project and tickets automatically\n4. You just wait - wake up to working code\n\n- **\"Plan with AI\"** button on Projects page\n- **Guided questionnaire** - Claude asks about requirements\n- **Auto-creates project** with correct paths and settings\n- **Auto-creates tickets** with dependencies and sequences\n- **Choose execution mode** - autonomous, semi-autonomous, or supervised\n\n#### Claude Assistant\nInteractive Claude terminal with full control:\n- **AI Model Selection**: Choose Opus, Sonnet, or Haiku per session\n- **Popup Window**: Open in separate window for multi-monitor setups\n- **Direct Access**: Chat with Claude outside of ticket workflow\n- **Full Terminal**: Real PTY with color support\n\n#### Execution Modes\nControl how Claude runs your tickets with three security levels:\n\n| Mode | Description | Best For |\n|------|-------------|----------|\n| **Autonomous** | Full access, no permission prompts | Trusted tasks, experienced users |\n| **Semi-Autonomous** | Smart sandbox with automatic rules (recommended) | Most projects |\n| **Supervised** | Asks permission for all write operations | Sensitive projects, learning |\n\n**Semi-Autonomous Mode** (New!) - The smart middle ground:\n- ✅ **Auto-allows**: File operations within project, running tests, builds, linting\n- ⚠️ **Asks permission**: Package installs (`npm install`, `pip install`), git commits, database migrations\n- 🚫 **Blocks**: System files, `/etc`, `.git` folder modifications, dangerous commands\n- 🔄 **\"Approve Similar\"**: Approve once, auto-approve similar operations\n\nSet per-ticket or project-wide - override defaults as needed\n\n#### Dependency Modes\nControl how tickets progress and close:\n- **Strict** (default) - User reviews and closes tickets manually\n- **Relaxed** - AI reviewer automatically closes completed tickets\n- **Useful for chained tasks** - Keep work flowing without manual intervention\n\n| Mode | Ticket Closing | Best For |\n|------|---------------|----------|\n| Strict | User closes manually | Critical tasks, review needed |\n| Relaxed | AI auto-closes | Batch work, trusted workflows |\n\n#### Visual Verification - \"See With Your Eyes\"\nClaude can see exactly what you see:\n- **Screenshot capture** - Claude takes screenshots using Playwright\n- **Visual analysis** - Describes layout, styling, and UI issues\n- **No more explaining** - Just click \"👁️ See\" and Claude sees the problem\n- **Automatic when needed** - Mention visual issues and Claude uses Playwright automatically\n\n#### Monaco Editor with LSP Support\nVS Code-quality code editing right in your browser:\n- **Monaco Editor** - The same editor that powers VS Code\n- **Intelligent Autocomplete** - Context-aware suggestions as you type\n- **Hover Documentation** - See function docs by hovering\n- **Go to Definition** - Ctrl+Click to jump to definitions\n- **Real-time Diagnostics** - Errors and warnings as you type\n- **Multi-language Support** - Python, JavaScript, TypeScript, PHP, Java, C#, Kotlin, HTML, CSS, JSON\n- **Optional LSP Servers** - Install only what you need with `setup_lsp.sh`\n\n#### Git Version Control\nAutomatic version control for every project:\n- **Auto-commit** - When AI completes work, changes are committed automatically\n- **Commit Messages** - Format: `[TICKET-NUM] Title` with full metadata\n- **Git History Page** - View all commits with timeline and diff viewer\n- **Rollback** - Restore any previous version with one click (preserves history)\n- **Smart .gitignore** - Auto-generated based on project type (PHP, Python, Node, .NET)\n- **AI Context** - Claude sees recent commits and can self-correct based on history\n- **Initialize Existing** - Add Git to existing projects from the web UI\n\n#### Telegram - Work from Your Phone\nFull two-way communication via Telegram. Control your AI developer from anywhere:\n- **Instant Notifications** - Get alerts when tasks complete, fail, or get stuck\n- **Reply to Execute** - Reply to any notification and Claude starts working\n- **Quick Questions** - Add `?` to get instant status updates via AI\n- **Never Wait** - Respond immediately from your phone, no laptop needed\n- **Easy Setup** - One-click configuration from Settings panel (⚙️)\n\n### Core AI Features\n- **Autonomous AI Agent** - Claude AI works on tickets independently, writing real code\n- **Multi-Project Management** - Handle multiple projects with isolated databases\n- **Parallel Execution** - Process tickets from different projects simultaneously\n- **Real-Time Console** - Watch Claude write code live in your browser\n- **Interactive Chat** - Guide Claude or ask questions during execution\n- **Voice Input** - Speak instead of typing in ticket chat (auto-stops after 10s silence)\n\n### Ticket Management\n- **Ticket Workflow** - Structured flow: Open → In Progress → Awaiting Input → Done\n- **Kill Switch** - Instant control while Claude is working:\n  - `/stop` command or Stop button - Pause immediately and wait for correction\n- **Message Queue** - Messages sent during execution are read when Claude finishes\n- **Auto-Close** - Tickets auto-close after 7 days in awaiting input\n- **Search** - Search across tickets, projects, and history\n\n### Web Terminal\nFull Linux terminal in your browser:\n- **Real shell access** via WebSocket\n- **Popup support** for multi-monitor setups\n- **Full sudo access** for system administration\n- **256-color support** with xterm.js\n\n### Backup \u0026 Restore\n- **Auto Backup on Close** - Project automatically backed up when ticket completes\n- **Manual Backup** - Create backup anytime from project page\n- **Restore** - Restore project files to any previous backup point\n- **Export Project** - Download complete project as ZIP\n\n### Project Migration\nMove projects between servers with all data intact:\n- **Export for Migration** - Full backup with tickets, conversations, and database\n- **Export Full** - Complete backup including conversation history\n- **Export Light** - Smaller backup without conversations\n- **Import Migration** - Restore on any CodeHero server\n- **Simple Import** - Import files + database only (no tickets)\n\n### File Management\n- **File Upload** - Upload files directly to project via web interface\n- **File Editor** - Edit project files in browser with syntax highlighting\n- **File Browser** - Navigate project directory structure\n\n### Project Features\n- **Auto Database Provisioning** - MySQL database auto-created per project\n- **phpMyAdmin Integration** - Full database management with auto-login (port 9454)\n- **Voice Input** - Speak to create projects and tickets (name, description fields)\n- **Project Archive/Reopen** - Archive completed projects, reopen when needed\n- **Global Context** - Server environment info shared with all projects\n- **Tech Stack Detection** - Knows installed tools (Node.js, PHP, Java, etc.)\n\n### Monitoring \u0026 Analytics\n- **Real-Time Usage Tracking** - Tokens, API requests, and work duration tracked in real-time\n- **Per-Project Stats** - See exactly how much each project costs\n- **Per-Ticket Stats** - Know the cost of every feature or fix\n- **Time-Based Reports** - Daily, weekly, and monthly usage summaries\n- **Session History** - View all Claude sessions with full output\n- **Daemon Status** - Monitor background worker status\n\n### Infrastructure\n- **Web Dashboard** - Beautiful dark-theme admin panel\n- **SSL Encryption** - All traffic encrypted via Nginx\n- **Self-Hosted** - Complete control over your data\n- **CLI Tool** - Manage projects and tickets from terminal\n\n## Supported Application Types\n\nCodeHero supports multiple project types with intelligent context and tooling:\n\n### Web Development\n- **PHP / WordPress** - Full PHP-FPM integration with Nginx\n- **Static HTML/CSS/JS** - Served directly via Nginx\n- **API Projects** - REST and GraphQL endpoints\n\n### .NET / ASP.NET Core\n- **Full .NET 8 SDK** support with automatic configuration\n- **Auto Nginx Proxy** - Each .NET app gets its own reverse proxy route\n- **Systemd Services** - Apps run as managed services with auto-restart\n- **Port Management** - Automatic port allocation (5001+)\n- **PowerShell, Mono, Wine** - Windows development tools available\n\n### Mobile Development (Android)\n\n#### Android Emulator with Web Visualization\nRun and test Android apps directly from your browser:\n- **Server-based Emulator** - Redroid (Android in Docker)\n- **Live Screen Mirror** - See and control the emulator via ws-scrcpy\n- **ADB Integration** - Install APKs, view logs, capture screenshots\n- **Framework Support** - Capacitor.js, React Native, Flutter, Native Android\n\n```\n📱 Your Browser → ws-scrcpy (HTTPS:8443) → Redroid Container\n                         ↓\n                   Live Android Screen\n                   Touch/Keyboard Input\n```\n\n#### Remote ADB Device\nConnect to physical Android devices or remote emulators:\n- **Remote ADB** - Connect to any device via IP:PORT\n- **Same Commands** - Install, debug, and test seamlessly\n- **No Local Setup** - Everything runs on the server\n\n### Backend / API\n- **Node.js** - Full Node 22.x with npm\n- **Python** - Python 3 with Flask, Django support\n- **Java** - GraalVM 24 with Gradle\n\n### Optional Setup Scripts\nAfter initial installation, run these scripts based on your needs:\n\n| Script | What it installs |\n|--------|------------------|\n| `setup_android.sh` | Docker, Redroid emulator, ws-scrcpy, ADB, Flutter, Gradle |\n| `setup_windows.sh` | .NET 8 SDK, PowerShell, Wine, Mono, NuGet |\n| `setup_devtools.sh` | Node.js, Java (GraalVM), multimedia tools (ffmpeg, ImageMagick, tesseract) |\n| `setup_lsp.sh` | Language servers for code editor (Python, JS/TS, PHP, Java, C#, Kotlin, HTML/CSS) |\n\n```bash\n# Android development (emulator + mobile frameworks)\nsudo /opt/codehero/scripts/setup_android.sh\n\n# Windows/.NET development\nsudo /opt/codehero/scripts/setup_windows.sh\n\n# Development tools (Node.js, Java, multimedia)\nsudo /opt/codehero/scripts/setup_devtools.sh\n\n# Code editor LSP (optional - for autocomplete, hover docs, etc.)\nsudo /opt/codehero/scripts/setup_lsp.sh\n```\n\n---\n\n## Perfect For\n\n- **Solo Developers** - Multiply your productivity with an AI coding partner\n- **Small Teams** - Offload routine development tasks to AI\n- **Agencies** - Manage multiple client projects efficiently\n- **Startups** - Ship faster with AI-assisted development\n- **Learning** - See how AI approaches coding problems\n- **Mobile Developers** - Test Android apps without local emulator setup\n\n## Quick Start\n\n### One-Click Install (Recommended)\n\n**No technical knowledge required!** Works on Windows, macOS, and Linux.\n\n**🪟 Windows** - Open PowerShell as Admin, paste:\n```powershell\nirm https://raw.githubusercontent.com/fotsakir/codehero/main/multipass/install-windows.ps1 | iex\n```\n\n**🍎 macOS** - Open Terminal, paste:\n```bash\ncurl -sL https://raw.githubusercontent.com/fotsakir/codehero/main/multipass/install-macos.command | bash\n```\n\n**🐧 Linux** - Open Terminal, paste:\n```bash\ncurl -sL https://raw.githubusercontent.com/fotsakir/codehero/main/multipass/install-linux.sh | bash\n```\n\nPaste → Enter → Wait 15 minutes → Done! [Full guide →](docs/MULTIPASS_INSTALL.md)\n\n**After installation:**\n- Dashboard: `https://VM_IP:9453` (login: admin / admin123)\n- Change passwords: `sudo /opt/codehero/scripts/change-passwords.sh`\n\n---\n\n### Manual Install (Ubuntu Server)\n\n#### Requirements\n\n- Ubuntu 22.04 or 24.04 LTS (server or desktop)\n- 2GB+ RAM recommended\n- Root/sudo access\n- Internet connection\n\n#### One-Command Install\n\n```bash\n# Install required tools\napt-get update \u0026\u0026 apt-get install -y unzip wget net-tools\n\n# Download and extract\ncd /root\nwget https://github.com/fotsakir/codehero/releases/latest/download/codehero-2.83.5.zip\nunzip codehero-2.83.5.zip\ncd codehero\n\n# Run setup\nchmod +x setup.sh \u0026\u0026 ./setup.sh\n\n# Find your IP address\nifconfig\n\n# Then install Claude Code CLI\n/opt/codehero/scripts/install-claude-code.sh\n```\n\nThe installer automatically sets up:\n- MySQL 8.0 database\n- Nginx web server with SSL and PHP-FPM\n- Python Flask application\n- Claude Code CLI\n- Background daemon service\n- All required dependencies\n\n### Upgrading from Previous Version\n\n```bash\n# Download new version\ncd /root\nunzip codehero-2.83.5.zip\ncd codehero\n\n# Preview changes (recommended)\nsudo ./upgrade.sh --dry-run\n\n# Run upgrade\nsudo ./upgrade.sh\n\n# Or auto-confirm all prompts\nsudo ./upgrade.sh -y\n```\n\nThe upgrade script will:\n- Create automatic backup of current installation\n- Apply any database migrations\n- Update all application files\n- Restart services\n- Show what changed in the new version\n\n### Access Your Dashboard\n\n| Service | URL | Default Login |\n|---------|-----|---------------|\n| **Admin Panel** | `https://YOUR_IP:9453` | admin / admin123 |\n| Web Projects | `https://YOUR_IP:9867` | - |\n| phpMyAdmin | `https://YOUR_IP:9454` | auto-login from project |\n\n---\n\n## Claude Activation\n\nCodeHero requires Claude to be activated before it can work on tickets. You have **two activation methods** and can use either the **Web Terminal** or **Linux Terminal**.\n\n### Method 1: Claude Subscription (Pro/Max)\n\nIf you have a Claude Pro or Claude Max subscription at [claude.ai](https://claude.ai), you can use it directly.\n\n#### Via Web Terminal (Dashboard)\n\n1. Go to **Dashboard** → Click **\"Activate Claude\"** button (or \"License Active\")\n2. Click **\"Open Terminal\"** in the Subscription section\n3. In the terminal, type:\n   ```bash\n   claude\n   ```\n4. Once Claude starts, type:\n   ```\n   /login\n   ```\n5. Claude will display a URL - **copy it** (right-click → Copy)\n6. Open the URL in your browser and authorize access\n7. Copy the authorization code from the browser\n8. Paste it back in the terminal (right-click → Paste)\n9. Done! Claude is now activated with your subscription\n\n#### Via Linux Terminal (SSH)\n\n1. SSH into your server or open a terminal\n2. Switch to the claude user:\n   ```bash\n   sudo su - claude\n   ```\n3. Run Claude and login:\n   ```bash\n   claude\n   ```\n4. Type `/login` and follow the same authorization flow as above\n\n### Method 2: Anthropic API Key\n\nIf you have an API key from [console.anthropic.com](https://console.anthropic.com), you can use it instead of a subscription.\n\n#### Via Dashboard\n\n1. Go to **Dashboard** → Click **\"Activate Claude\"** button\n2. Select the **\"API Key\"** section\n3. Paste your API key (starts with `sk-ant-api...`)\n4. Click **Save**\n\n#### Via Linux Terminal\n\n1. SSH into your server\n2. Create or edit the environment file:\n   ```bash\n   sudo mkdir -p /home/claude/.claude\n   sudo nano /home/claude/.claude/.env\n   ```\n3. Add your API key:\n   ```\n   ANTHROPIC_API_KEY=sk-ant-api03-your-key-here\n   ```\n4. Save and set permissions:\n   ```bash\n   sudo chown claude:claude /home/claude/.claude/.env\n   sudo chmod 600 /home/claude/.claude/.env\n   ```\n\n### Verify Activation\n\nAfter activation, the **\"Activate Claude\"** button in the dashboard will change to **\"License Active\"** (green).\n\nYou can also verify from terminal:\n```bash\nsudo su - claude\nclaude --version\n```\n\n### Deactivate License\n\nTo deactivate (e.g., to switch methods):\n1. Dashboard → Click **\"License Active\"** → **\"Deactivate License\"**\n\nOr via terminal:\n```bash\nrm /home/claude/.claude/.credentials.json\nrm /home/claude/.claude/.env\n```\n\n---\n\n## How It Works\n\n```\n┌─────────────┐     ┌─────────────┐     ┌─────────────┐     ┌─────────────┐\n│   Create    │     │   Daemon    │     │  Claude AI  │     │    Code     │\n│   Ticket    │ ──► │   Picks Up  │ ──► │   Works     │ ──► │  Delivered  │\n│             │     │   Ticket    │     │   On Task   │     │             │\n└─────────────┘     └─────────────┘     └─────────────┘     └─────────────┘\n       │                                       │\n       │            ┌─────────────┐            │\n       └───────────►│  You Watch  │◄───────────┘\n                    │  Real-Time  │\n                    └─────────────┘\n```\n\n1. **Create a ticket** - Describe what you need built\n2. **Daemon assigns it** - Background service picks up open tickets\n3. **Claude works** - AI writes code, creates files, runs commands\n4. **You review** - Watch in real-time or review when complete\n5. **Iterate** - Send messages to refine, or close when satisfied\n\n## Ticket Workflow\n\n```\n┌──────┐     ┌─────────────┐     ┌─────────────────┐     ┌──────┐\n│ open │ ──► │ in_progress │ ──► │ awaiting_input  │ ──► │ done │\n└──────┘     └─────────────┘     └────────┬────────┘     └──────┘\n                                          │\n                              Send Message │ (refine/continue)\n                                          ▼\n                                    ┌──────────┐\n                                    │   open   │\n                                    └──────────┘\n```\n\nTickets auto-close after 7 days in `awaiting_input` if no action taken.\n\n## Architecture\n\n```\n                    ┌────────────────────────────────┐\n                    │           INTERNET             │\n                    └───────┬───────────┬────────────┘\n                            │           │\n                       Port 9453   Port 9867\n                      Admin Panel  Web Projects\n                            │           │\n                    ┌───────┴───────────┴────────┐\n                    │          Nginx             │\n                    │    (SSL Termination)       │\n                    └───────┬───────────┬────────┘\n                            │           │\n                    ┌───────┴───┐ ┌─────┴───────┐\n                    │   Flask   │ │  PHP-FPM    │\n                    │  Web App  │ │  Projects   │\n                    └───────┬───┘ └─────────────┘\n                            │\n                    ┌───────┴───────┐\n                    │    Daemon     │──── Claude Code CLI\n                    │  (Background) │\n                    └───────┬───────┘\n                            │\n                    ┌───────┴───────┐\n                    │    MySQL      │\n                    │   Database    │\n                    └───────────────┘\n```\n\n## CLI Commands\n\n```bash\n# Create a project\nclaude-cli project add --name \"My E-Commerce\" --code SHOP\n\n# Create a ticket\nclaude-cli ticket add --project SHOP --title \"Build user authentication\" --priority high\n\n# Check system status\nclaude-cli status\n\n# Control daemon\nclaude-cli daemon start|stop|status\n```\n\n## Configuration\n\nEdit `/etc/codehero/system.conf`:\n\n```bash\n# Database connection\nDB_HOST=localhost\nDB_NAME=claude_knowledge\nDB_USER=claude_user\nDB_PASSWORD=your-secure-password\n\n# Parallel processing (how many tickets at once)\nMAX_PARALLEL_PROJECTS=3\n\n# Auto-close tickets after N days\nREVIEW_DEADLINE_DAYS=7\n```\n\n## Tech Stack\n\n- **Backend**: Python 3, Flask, Flask-SocketIO\n- **Database**: MySQL 8.0\n- **Web Server**: Nginx with PHP-FPM\n- **AI**: Claude AI via Claude Code CLI\n- **OS**: Ubuntu 22.04 / 24.04 LTS\n\n## Documentation\n\n| Document | Description |\n|----------|-------------|\n| [One-Click Install](docs/MULTIPASS_INSTALL.md) | Easiest install for Windows, macOS, Linux |\n| [User Guide](docs/USER_GUIDE.md) | How to use the admin panel (with screenshots) |\n| [Migration Guide](docs/MIGRATION.md) | Move projects between servers |\n| [Domain \u0026 SSL Setup](docs/DOMAIN_SETUP.md) | Configure domains with Let's Encrypt SSL |\n| [2FA Setup](docs/2FA_SETUP.md) | Enable Two-Factor Authentication with Google Authenticator |\n| [WAF Setup](docs/WAF_SETUP.md) | ModSecurity Web Application Firewall with OWASP rules |\n| [LSP Setup](docs/LSP_SETUP.md) | Install language servers for code editor features |\n| [Telegram Setup](docs/TELEGRAM_SETUP.md) | Get instant alerts on your phone |\n| [VM Installation](docs/VM_INSTALLATION.md) | Install on VMware, Hyper-V, VirtualBox, UTM, Parallels |\n| [Installed Packages](docs/INSTALLED_PACKAGES.md) | All tools \u0026 packages (ffmpeg, ImageMagick, OCR, etc.) |\n| [INSTALL.md](INSTALL.md) | Detailed installation guide |\n| [CLAUDE_OPERATIONS.md](CLAUDE_OPERATIONS.md) | System management \u0026 troubleshooting |\n| [CHANGELOG.md](CHANGELOG.md) | Version history |\n| [CLAUDE.md](CLAUDE.md) | Development workflow for contributors |\n\n## Important Notice\n\n\u003e **Warning**: This system runs Claude AI with **unrestricted access** to your server. Claude can execute commands, create/modify/delete files, access databases, and perform any operation the system user can do.\n\u003e\n\u003e **Use at your own risk.** The authors and contributors are not responsible for any damage, data loss, security issues, or other consequences resulting from the use of this software. Always run on isolated/dedicated servers and maintain proper backups.\n\n## Security\n\n- **Self-hosted**: Your code stays on your server\n- **SSL encryption**: All web traffic encrypted\n- **Isolated databases**: Each project gets its own MySQL database\n- **Configurable access**: Restrict admin panel to trusted IPs\n\n### Two-Factor Authentication (2FA)\n\nOptional TOTP-based 2FA for enhanced login security:\n\n- **Google Authenticator Support** - Works with any TOTP app (Authy, Microsoft Authenticator, etc.)\n- **Account Lockout** - Automatic 30-minute lockout after 5 failed login attempts\n- **Remember Device** - Skip 2FA on trusted devices until end of month\n- **Terminal Management** - Enable/disable 2FA from command line\n\n```bash\n# Manage 2FA settings\nsudo /opt/codehero/scripts/manage-2fa.sh\n\n# Direct commands\nsudo /opt/codehero/scripts/manage-2fa.sh enable    # Enable 2FA\nsudo /opt/codehero/scripts/manage-2fa.sh disable   # Disable 2FA\nsudo /opt/codehero/scripts/manage-2fa.sh unlock    # Unlock after failed attempts\nsudo /opt/codehero/scripts/manage-2fa.sh status    # Check current status\n```\n\nSee [2FA Setup Guide](docs/2FA_SETUP.md) for detailed instructions.\n\n### Change Passwords\n\nAfter installation, change default passwords:\n```bash\nsudo /opt/codehero/scripts/change-passwords.sh\n```\n\n## Contributing\n\nContributions are welcome!\n\n1. Fork the repository\n2. Create your feature branch (`git checkout -b feature/amazing-feature`)\n3. Commit your changes (`git commit -m 'Add amazing feature'`)\n4. Push to the branch (`git push origin feature/amazing-feature`)\n5. Open a Pull Request\n\nSee [CLAUDE.md](CLAUDE.md) for development guidelines.\n\n## Support\n\n- **Issues**: [GitHub Issues](../../issues)\n- **Discussions**: [GitHub Discussions](../../discussions)\n\n## License\n\nThis project uses a **Dual License** - free for personal use and small businesses, commercial license required for larger organizations. See [LICENSE](LICENSE) for details.\n\n---\n\n\u003cp align=\"center\"\u003e\n  \u003cb\u003eBuilt with Claude AI\u003c/b\u003e\u003cbr\u003e\n  \u003csub\u003eIf you find this useful, please star the repository!\u003c/sub\u003e\n\u003c/p\u003e\n\n## Author\n\n**Fotios Tsakiridis** ([@fotsakir](https://github.com/fotsakir))\n\n[Smartnav Telematic Services Cyprus Ltd](https://routeplanner.gr)\n\n## Keywords\n\n`claude-ai` `anthropic` `ai-coding-assistant` `autonomous-agent` `code-generation` `ai-developer` `self-hosted` `ticket-system` `project-management` `flask` `mysql` `nginx` `ubuntu` `devops` `automation` `open-source` `php` `python` `human-ai-collaboration` `future-of-programming` `proof-of-concept` `ai-pair-programming` `agentic-ai`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffotsakir%2Fcodehero","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffotsakir%2Fcodehero","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffotsakir%2Fcodehero/lists"}