Skip to content

karolswdev/hypnos

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

175 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Hypnos - AI-Powered Workflow Automation Daemon

๐ŸŒ™ Hypnos is a daemonized workflow automation system that transforms your vague ideas into complete projects using AI-powered generation. Control everything through Telegram bot with secure workspace isolation and AI persona collaboration.

๐Ÿš€ Key Features

  • ๐Ÿค– AI-Powered Project Generation - Transform vague ideas into complete projects
  • ๐Ÿ“ฑ Telegram Bot Control - Manage workflows from anywhere via Telegram
  • ๐ŸŽญ AI Personas & Teams - Work with AI personalities (Alex, Sarah, Marcus, etc.)
  • ๐Ÿ”’ Security-First Design - Complete workspace isolation with path traversal protection
  • ๐Ÿ‘ฅ Multi-User Support - User-based access control and workspace management
  • ๐Ÿค– Multi-LLM Support - Claude, Zlaude, GPT-4, and local models
  • ๐Ÿ—๏ธ Intelligent Architecture - Natural language to complete project generation

๐Ÿ—๏ธ Architecture

graph TB
    %% User Interface Layer
    User[๐Ÿ‘ค User] --> Telegram[๐Ÿ“ฑ Telegram Bot]

    %% Command Processing
    Telegram --> CommandHandler[๐ŸŽฎ Command Handler]

    %% Authentication & Security
    CommandHandler --> Auth[๐Ÿ” Authentication Layer]
    Auth --> |User ID Validation| UserContext[๐Ÿ‘ฅ User Context]

    %% Core Management Systems
    CommandHandler --> WorkspaceManager[๐Ÿ“‚ Workspace Manager]
    CommandHandler --> PersonaManager[๐ŸŽญ Persona Manager]
    CommandHandler --> LLMManager[๐Ÿค– LLM Manager]

    %% Workspace System
    WorkspaceManager --> WorkspaceContext[๐Ÿ—๏ธ Workspace Context]
    WorkspaceManager --> IsolatedStorage[๐Ÿ“ Isolated Storage<br/>~/.hypnos/workspaces/]

    %% Security Features
    IsolatedStorage --> PathTraversal[๐Ÿ›ก๏ธ Path Traversal Protection]
    IsolatedStorage --> FileTypeFilter[๐Ÿ“‹ File Type Filtering]
    IsolatedStorage --> UserIsolation[๐Ÿ”’ User-based Isolation]

    %% Persona System
    PersonaManager --> Personas[๐ŸŽญ Global Personas<br/>Alex, Sarah, Marcus, Evelyn, Jamie]
    PersonaManager --> Teams[๐Ÿ‘ฅ Teams<br/>Full-Stack, Mobile, Enterprise]
    PersonaManager --> PersonaStorage[๐Ÿ’พ Persona Config<br/>~/.hypnos/personas.json]

    %% AI/LLM Integration
    LLMManager --> Providers[๐Ÿ”Œ LLM Providers<br/>Claude, Zlaude, GPT-4, Local Models]
    LLMManager --> CostOptimization[๐Ÿ’ฐ Cost Optimization]
    LLMManager --> Failover[๐Ÿ”„ Failover System]

    %% Project Generation Workflow
    CommandHandler --> WorkspaceGenerator[๐Ÿ—๏ธ Workspace Generator]
    WorkspaceGenerator --> ProjectSpec[๐Ÿ“‹ Project Specification]
    WorkspaceGenerator --> CodeGeneration[๐Ÿ’ป Code Generation]
    WorkspaceGenerator --> DependencySetup[๐Ÿ“ฆ Dependency Setup]

    %% AI Integration in Generation
    ProjectSpec --> LLMManager
    CodeGeneration --> PersonaPrompts[๐ŸŽญ Persona System Prompts]
    PersonaPrompts --> LLMManager

    %% Output & Storage
    CodeGeneration --> GeneratedFiles[๐Ÿ“ Generated Project Files]
    GeneratedFiles --> ProjectStructure[๐Ÿ—๏ธ Project Structure]
    ProjectStructure --> Documentation[๐Ÿ“š Documentation]

    %% State Management
    UserContext --> WorkspaceContext
    PersonaManager --> ProjectGenerationContext[๐ŸŽฏ Generation Context]

    %% Styling
    classDef userLayer fill:#e1f5fe
    classDef securityLayer fill:#fff3e0
    classDef coreLayer fill:#f3e5f5
    classDef aiLayer fill:#e8f5e8
    classDef storageLayer fill:#fce4ec

    class User,Telegram userLayer
    class Auth,PathTraversal,FileTypeFilter,UserIsolation securityLayer
    class WorkspaceManager,PersonaManager,LLMManager,WorkspaceGenerator coreLayer
    class LLMManager,Providers,CostOptimization,Failover,PersonaPrompts aiLayer
    class IsolatedStorage,PersonaStorage,GeneratedFiles storageLayer
Loading

๐Ÿ“‹ Quick Start

Prerequisites

  • Node.js 18+
  • npm or yarn
  • Telegram Bot Token

Installation

git clone https://github.com/karolswdev/hypnos.git
cd hypnos
npm install

Configuration

  1. Create a Telegram bot via @BotFather
  2. Set environment variables:
export HYPNOS_BOT_TOKEN="your_bot_token_here"
export HYPNOS_ADMIN_USER_ID="your_telegram_user_id"

Running Hypnos

npm run hypnos:test

๐ŸŽฎ Available Commands

Basic Commands

  • /start - Welcome message and status
  • /help - Show all available commands
  • /status - Check daemon status
  • /ping - Test bot response time

Workspace Management

  • /ws - Show workspace overview
  • /ws use <workspace> - Switch active workspace
  • /ws create <name> - Create new workspace
  • /ws delete <workspace> - Delete workspace

Persona & Team Management

  • /personas - Show available AI personas
  • /persona use <name> - Set active persona
  • /teams - Show available teams
  • /team use <name> - Set active team

Project Generation

  • /create "project idea" - Create project from vague idea
  • /enhance <workspace> <feature> - Add features to existing project

๐ŸŽญ AI Personas

  • ๐Ÿง‘โ€๐Ÿ’ป Alex Chen - Senior Full-Stack Developer (React, TypeScript, Node.js)
  • ๐ŸŽจ Sarah Miller - UI/UX Designer (Figma, CSS, Accessibility)
  • โš™๏ธ Marcus Johnson - DevOps Engineer (Docker, CI/CD, AWS)
  • ๐Ÿ—๏ธ Dr. Evelyn Reed - System Architect (Microservices, Security)
  • ๐Ÿ“ฑ Jamie Park - Mobile Developer (React Native, iOS, Android)

๐Ÿ”’ Security

  • Complete workspace isolation in ~/.hypnos/workspaces/
  • Path traversal protection and file type filtering
  • User-based authentication via Telegram user IDs
  • Secure AI provider integration

๐Ÿค– AI Integration

Hypnos integrates with multiple LLM providers:

  • Claude (Anthropic) - Advanced reasoning and code generation
  • Zlaude - Specialized development tasks
  • GPT-4 (OpenAI) - Versatile general-purpose AI
  • Local Models - Privacy-focused offline generation

๐Ÿ“ Project Structure

hypnos/
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ hypnos/
โ”‚   โ”‚   โ”œโ”€โ”€ core/           # Core management systems
โ”‚   โ”‚   โ”œโ”€โ”€ integrations/   # External integrations
โ”‚   โ”‚   โ””โ”€โ”€ utils/          # Utility functions
โ”‚   โ””โ”€โ”€ cli/                # CLI interface
โ”œโ”€โ”€ docs/                   # Documentation
โ””โ”€โ”€ templates/              # Project templates

๐Ÿšง Current Status

Phase 1 - Complete โœ…

  • โœ… Telegram bot integration
  • โœ… Secure workspace management
  • โœ… Persona & team system
  • โœ… Multi-user support

Phase 2 - In Progress ๐Ÿšง

  • ๐Ÿšง AI-powered project generation
  • ๐Ÿšง Multi-LLM integration
  • ๐Ÿšง Intelligent code generation

๐Ÿค Contributing

Contributions are welcome! Please read our contributing guidelines and submit pull requests.

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ™ Acknowledgments

Built with โค๏ธ using:


๐ŸŒ™ Hypnos - Transform your ideas into reality, one command at a time.

About

Your coding buddy - CodeMachine with batteries included and optimized for Telegram

Resources

License

Contributing

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors