Skip to content

Menschomat/Hyphae

Repository files navigation

Hyphae

Hyphae Banner

A Git-based chat system with terminal UI, encryption, and full Git workflow integration

Hyphae is a working chat application that leverages Git's powerful version control capabilities to create a distributed, offline-capable chat platform. It transforms Git branches into chatrooms and enables seamless collaboration through familiar Git workflows.

Warning

Hyphae is in "Work in Progress"-State and requires Git to be properly configured on your system before use:

  • Git User Configuration: Set your Git username and email:

    git config --global user.name "Your Name"
    git config --global user.email "your.email@example.com"
  • Remote Repository Access: If using remote repositories, configure authentication:

    • SSH (Recommended): Set up SSH keys and add them to your Git hosting service
      • Note: SSH support is currently not enabled on Windows. For Windows users, clone the repository manually using Git commands and then configure the local path in config.yaml
    • HTTPS: Configure Git credential helper or personal access tokens

Without proper Git configuration, Hyphae will not be able to create commits or sync with remote repositories.

🚀 Overview

Hyphae reimagines chat systems by using Git as the underlying protocol and storage mechanism:

  • Git-Based Architecture: Every chat is a Git repository, every conversation a commit
  • Terminal UI: Beautiful, intuitive terminal interface for seamless chat experience
  • End-to-End Encryption: Secure messaging with built-in encryption (planned)
  • Branch-Based Chatrooms: Create chatrooms as Git branches, merge conversations
  • Full Git Integration: Leverage branching, merging, and version control for conversations
  • Offline Capable: Chat without internet connection, sync when online

🏗️ Architecture

The application transforms Git concepts into chat features:

Git Concept Hyphae Feature
Repository Chat workspace
Branch Chatroom
Commit Message
Merge Combine conversations
Push/Pull Sync with remote

📋 Current Status

Working Application - Hyphae is a functional Git-based chat system with a complete Textual TUI interface and full Git integration for message storage.

✅ Implemented Features

  • Textual TUI Interface: Modern terminal user interface built with Textual
  • Git-Based Message Storage: Messages stored as Git commits with metadata
  • Branch-Based Chatrooms: Create and switch between chat branches
  • Repository Management: Local repository creation and remote cloning
  • Automatic Sync: Pull/push changes to remote repositories
  • Command Line Interface: Both TUI and CLI modes available
  • Configuration System: YAML-based configuration for user settings

🚧 Planned Features

  • End-to-end encryption
  • Advanced Git operations (merging)

🛠️ Development Setup (Current)

Installation

The project is currently set up as a Python project using Poetry for dependency management:

# Install dependencies (includes Textual)
poetry install

# Run the Textual TUI interface (default)
poetry run python -m hyphae.main

# Or explicitly launch TUI
poetry run python -m hyphae.main --tui

# Show version information
poetry run python -m hyphae.main --version

# CLI mode (placeholder for future)
poetry run python -m hyphae.main --cli

🖥️ Textual TUI Controls

  • Type messages in the input field and press Enter or click Send
  • Ctrl+N: Create new chat (placeholder)
  • Ctrl+Q: Quit application
  • F1: Show help information

📁 Project Structure

hyphae/
├── hyphae/              # Main package
│   ├── __init__.py
│   ├── main.py          # Entry point with CLI/TUI modes
│   ├── app.py           # Textual TUI application
│   ├── styles.tcss      # Textual CSS styles for TUI
│   ├── git/             # Git integration module
│   │   ├── __init__.py
│   │   ├── integration.py  # Chat-specific Git operations
│   │   ├── repository.py   # Generic Git repository management
│   │   ├── credentials.py  # Git authentication
│   │   ├── fetch.py        # Remote fetching operations
│   │   ├── pull.py         # Pull operations
│   │   └── push.py         # Push operations
│   ├── utils/           # Utility modules
│   │   ├── __init__.py
│   │   ├── config.py    # Configuration management
│   │   └── logging.py   # Logging utilities
│   ├── widgets/         # Textual UI widgets
│   │   ├── __init__.py
│   │   ├── chat_area.py     # Chat message display
│   │   ├── chat_message.py  # Individual message widget
│   │   ├── message_input.py # Message input widget
│   │   ├── new_chat_dialog.py    # New chat creation dialog
│   │   ├── git_repo_setup_dialog.py  # Repository setup dialog
│   │   └── py.typed
│   └── py.typed
├── tests/               # Test suite
├── assets/              # Static assets
│   └── hyphaesmall.webp # Logo image
├── pyproject.toml       # Project configuration
├── poetry.lock          # Poetry lock file
├── config.yaml          # Default configuration
├── setup.py             # Setup script
├── README.md
└── .gitignore

🎯 Implementation Progress

The implementation is being developed incrementally:

✅ Phase 1: Core Git Integration

  • Status: COMPLETED
  • Features: Git repository management, message storage as commits, branch-based chatrooms, remote sync

✅ Phase 2: Terminal UI Interface

  • Status: COMPLETED
  • Features: Textual TUI with chat interface, message display, input handling, repository setup dialogs

📋 Phase 3: Encryption Layer

  • Status: PLANNED
  • Features: End-to-end encryption, key management

📋 Phase 4: Advanced Git Integration

  • Status: PLANNED
  • Features: Merge conversations, advanced branching

🤝 Contributing

Hyphae is an active project with a working codebase. Contributions are welcome! Please see the development setup instructions above to get started.

Hyphae: Conversations that branch out and merge together, powered by Git.

About

Hyphae - A Git-based chat system with terminal UI

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages