Memory management CLI for the orchestr8 ecosystem - team collaboration with shared thoughts
Project description
mem8 - Memory Management for the Orchestr8 Ecosystem
A production-ready memory management platform for the orchestr8 ecosystem with CLI, API, and web interface for team collaboration with shared thoughts.
๐ฏ Overview
Current Status: Production Ready (Phase 3 Complete)
mem8 is a comprehensive platform providing:
- ๐ป Advanced CLI - Full workspace management with Windows UTF-8 support and rich UI
- ๐ FastAPI Backend - Production-grade API with PostgreSQL, authentication, and real-time capabilities
- ๐ฅ๏ธ Terminal Web UI - Stunning retro interface with live collaboration features
- ๐ฏ Orchestr8 Integration - Seamless integration with orchestr8 ecosystem and o8 CLI
โ Current Implementation Status
Phase 1: CLI Foundation โ COMPLETE
- Rich CLI Interface - Click framework with comprehensive Windows support
- Template Management - 3 cookiecutter templates (claude-config, thoughts-repo, full)
- Core Commands - init, sync, search, status, doctor, team, deploy
- Data Protection - Sophisticated preservation of existing workspace data
- UTF-8 Excellence - Perfect emoji support across all Windows terminals
Phase 2: Backend API โ COMPLETE
- FastAPI Application - Modern async Python with comprehensive endpoints
- PostgreSQL Database - Production-grade with proper models and relationships
- GitHub OAuth - Complete authentication flow with JWT token management
- API Security - CORS, authentication middleware, protected endpoints
- Monitoring - Health checks, system stats, Prometheus metrics
- Docker Ready - Containerized deployment configuration
Phase 3: Frontend โ COMPLETE
- Next.js 15 - Modern React with App Router and TypeScript
- Terminal Aesthetic - Exceptional retro computing UI with scanlines and glows
- Authentication Flow - Seamless GitHub OAuth integration
- Real-time Framework - WebSocket integration ready for collaboration
- Responsive Design - Beautiful interface across all screen sizes
โจ Features
๐ป CLI Features (Fully Working)
ai-mem init --template full # Initialize workspace with templates
ai-mem status # Check workspace health
ai-mem sync # Bidirectional synchronization
ai-mem search "query" # Full-text search across thoughts
ai-mem doctor --auto-fix # Diagnose and repair issues
๐ API Features (Production Ready)
- Authentication:
/api/v1/auth/*- Complete GitHub OAuth flow - Health Monitoring:
/api/v1/health- System health and diagnostics - Thoughts Management:
/api/v1/thoughts/*- Full CRUD operations - Team Management:
/api/v1/teams/*- Multi-tenant team support - Advanced Search:
/api/v1/search/- Full-text and semantic search - System Stats:
/api/v1/system/stats- Real-time metrics - Documentation:
/docs- Interactive OpenAPI documentation
๐ฅ๏ธ Web Interface (Stunning Terminal UI)
- Terminal Aesthetic - Authentic retro computing interface
- Authentication - Seamless GitHub login with avatar display
- Live Dashboard - Real-time team status and system monitoring
- Search Interface - Advanced search with type selection
- Responsive Design - Perfect across desktop and mobile
๐งช Current Testing Status
โ Working Without Setup
- CLI Commands:
ai-mem status,ai-mem --help,ai-mem doctor - API Health:
localhost:8000/api/v1/healthreturns system status - API Docs:
localhost:8000/docs- Interactive OpenAPI documentation - Frontend UI:
localhost:20040- Loads with login screen - System Stats:
localhost:8000/api/v1/system/stats- Basic metrics
๐ Requires Authentication
- Thoughts API: All CRUD operations require GitHub OAuth login
- Teams API: Team management requires authenticated user
- Search API: Advanced search requires user authentication
- WebSocket: Real-time features need authenticated connection
๐ง Setup Required
- GitHub OAuth: Configure OAuth app for authentication
- Database Seed: No default data - database starts empty
- WebSocket: Endpoint exists but commented out (line 91 in main.py)
- Environment Variables: GitHub client ID/secret needed for auth flow
๐ Quick Start
Development Setup
# Clone the repository
git clone https://github.com/killerapp/ai-mem.git
cd ai-mem
# Start with Docker (recommended)
docker-compose up -d
# Or see QUICKSTART.md for detailed setup
Environment Configuration
# Backend (.env)
GITHUB_CLIENT_ID=your_github_client_id
GITHUB_CLIENT_SECRET=your_github_client_secret
SECRET_KEY=your_jwt_secret_key
DATABASE_URL=postgresql://user:pass@localhost:5433/aimem
# Frontend (.env.local)
NEXT_PUBLIC_API_URL=http://localhost:8000
NEXT_PUBLIC_WS_URL=ws://localhost:8000
Template Usage
# Install cookiecutter for templates
uv tool install cookiecutter
# Generate Claude configuration
cookiecutter claude-dot-md-template --config-file example-configs/claude-dot-md/default.yaml
# Generate thoughts repository
cookiecutter shared-thoughts-template --config-file example-configs/shared-thoughts/default.yaml
๐๏ธ Architecture
Tech Stack
- Frontend: Next.js 14, TypeScript, Tailwind CSS, Shadcn/UI
- Backend: FastAPI, SQLAlchemy, PostgreSQL, Redis
- Authentication: GitHub OAuth 2.0, JWT tokens
- Real-time: WebSocket connections
- Deployment: Docker, Docker Compose
Project Structure
ai-mem/
โโโ frontend/ # Next.js web interface
โ โโโ app/ # App router pages
โ โ โโโ auth/ # Authentication pages
โ โ โโโ page.tsx # Main terminal interface
โ โโโ components/ # Reusable UI components
โ โโโ hooks/ # React hooks (useAuth, useWebSocket)
โ โโโ lib/ # Utilities (API client, auth manager)
โโโ backend/ # FastAPI backend
โ โโโ src/aimem_api/
โ โโโ routers/ # API routes (auth, thoughts, teams)
โ โโโ models/ # SQLAlchemy models
โ โโโ config.py # Configuration management
โโโ claude-dot-md-template/ # Claude Code configuration template
โโโ shared-thoughts-template/ # Thoughts repository template
โโโ docs/ # Documentation and screenshots
๐จ Terminal Interface
The web interface features a beautiful terminal aesthetic with:
- Header Bar: Connection status, user avatar, and logout controls
- Sidebar: Team status, search functionality, and quick actions
- Main Panel: Command prompt simulation with recent thoughts
- Status Bar: Real-time system information and connection status
- Color Scheme: Classic green-on-black terminal with modern UI elements
Key UI Elements
- โ Connected/Disconnected status indicators
- ๐ค User avatar and username display
- ๐ Search memories with real-time filtering
- โก Quick actions for new thoughts and sync operations
- ๐ System stats with live memory and thought counters
- ๐ฑ๏ธ Interactive buttons with terminal styling
๐ก API Endpoints
Authentication
GET /api/v1/auth/github/url- Get GitHub OAuth URLPOST /api/v1/auth/github/callback- Handle OAuth callbackGET /api/v1/auth/me- Get current user infoPOST /api/v1/auth/logout- Logout user
Thoughts Management
GET /api/v1/thoughts- List thoughts with filteringPOST /api/v1/thoughts- Create new thoughtGET /api/v1/thoughts/{id}- Get specific thoughtPUT /api/v1/thoughts/{id}- Update thoughtDELETE /api/v1/thoughts/{id}- Delete thought
Teams & Collaboration
GET /api/v1/teams- List user teamsGET /api/v1/teams/{id}/stats- Get team statisticsPOST /api/v1/sync/teams/{id}- Sync team data
๐ง Configuration Examples
Basic Developer Setup
# Generate both templates with defaults
cookiecutter claude-dot-md-template --config-file example-configs/claude-dot-md/default.yaml
cookiecutter shared-thoughts-template --config-file example-configs/shared-thoughts/default.yaml
Enterprise Team Setup
# Full-featured configuration with Linear and Ralph workflows
cookiecutter claude-dot-md-template --config-file example-configs/claude-dot-md/enterprise-full.yaml
cookiecutter shared-thoughts-template --config-file example-configs/shared-thoughts/team-collaboration.yaml
๐ Workflow Integration
Thoughts Directory Structure
thoughts/
โโโ shared/ # Team-wide documents
โ โโโ plans/ # Implementation plans
โ โโโ research/ # Research documents
โ โโโ tickets/ # Linear tickets (ENG-XXXX.md)
โ โโโ prs/ # PR descriptions
โ โโโ decisions/ # Technical decisions
โโโ {username}/ # Personal thoughts
โ โโโ tickets/ # Personal ticket copies
โ โโโ notes/ # Personal notes
โ โโโ archive/ # Archived thoughts
โโโ searchable/ # Unified search (auto-generated)
Claude Code Integration
The system integrates seamlessly with Claude Code through:
- Agent Definitions - Pre-configured AI agents for development tasks
- Command Workflows - Automated task execution and planning
- Memory Persistence - Structured knowledge retention across sessions
- Context Sharing - Team-wide context and decision history
๐ Requirements
System Requirements
- Node.js 18+ - For frontend development
- Python 3.11+ - For backend services
- PostgreSQL 13+ - Primary database
- Redis 6+ - Session and caching (optional)
- Docker - For containerized deployment (recommended)
Development Tools
- uv - Python package manager (
curl -LsSf https://astral.sh/uv/install.sh | sh) - cookiecutter - Template engine (
uv tool install cookiecutter) - git - Version control for sync features
๐ง Roadmap
- โ Web terminal interface with authentication
- โ GitHub OAuth integration
- โ Real-time team collaboration
- โ Docker development environment
- ๐ Claude.md constructs integration (in progress)
- ๐ Advanced search with semantic embeddings
- ๐ Mobile-responsive terminal interface
- ๐ Plugin system for custom integrations
- ๐ Self-hosted deployment guides
- ๐ Integration with more AI assistants
๐ License
This project is designed for AI-assisted development workflows and knowledge management.
๐ค Contributing
Contributions welcome! Areas for improvement:
- Frontend Components - Enhance the terminal UI experience
- Backend APIs - Extend functionality and performance
- Authentication - Add more OAuth providers
- Templates - Create new Claude Code configurations
- Documentation - Improve setup and usage guides
๐ Documentation
- QUICKSTART.md - Development environment setup
- Example Configurations - Pre-built configuration examples
- Claude Template - Claude Code configuration details
- Thoughts Template - Thoughts repository details
Built for teams using AI-assisted development with Claude Code and modern web technologies.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mem8-1.4.0.tar.gz.
File metadata
- Download URL: mem8-1.4.0.tar.gz
- Upload date:
- Size: 2.1 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5d9dde699e260ce909e7f2b6e615021e20089a32277bba17d3c2def8453010dd
|
|
| MD5 |
6503c3c287ae286db0162e255376425a
|
|
| BLAKE2b-256 |
aac93eed08fe7f133958c59a12bb55461a88be39f0bbb6f616bbb1cc26dbdf14
|
File details
Details for the file mem8-1.4.0-py3-none-any.whl.
File metadata
- Download URL: mem8-1.4.0-py3-none-any.whl
- Upload date:
- Size: 34.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e9f5a54ab83a225d91b6c8057a43e0b7a75ff8f747f116b22300b61697e361e2
|
|
| MD5 |
7c137194870bcb713d2dc5bad0420d21
|
|
| BLAKE2b-256 |
4436fadae2e62207ab99886c615608b58141a17a0fdf405820632dcfc9ed66a6
|