Skip to main content

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/health returns 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 URL
  • POST /api/v1/auth/github/callback - Handle OAuth callback
  • GET /api/v1/auth/me - Get current user info
  • POST /api/v1/auth/logout - Logout user

Thoughts Management

  • GET /api/v1/thoughts - List thoughts with filtering
  • POST /api/v1/thoughts - Create new thought
  • GET /api/v1/thoughts/{id} - Get specific thought
  • PUT /api/v1/thoughts/{id} - Update thought
  • DELETE /api/v1/thoughts/{id} - Delete thought

Teams & Collaboration

  • GET /api/v1/teams - List user teams
  • GET /api/v1/teams/{id}/stats - Get team statistics
  • POST /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:

  1. Frontend Components - Enhance the terminal UI experience
  2. Backend APIs - Extend functionality and performance
  3. Authentication - Add more OAuth providers
  4. Templates - Create new Claude Code configurations
  5. Documentation - Improve setup and usage guides

๐Ÿ“š Documentation


Built for teams using AI-assisted development with Claude Code and modern web technologies.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mem8-1.5.0.tar.gz (2.1 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mem8-1.5.0-py3-none-any.whl (34.1 kB view details)

Uploaded Python 3

File details

Details for the file mem8-1.5.0.tar.gz.

File metadata

  • Download URL: mem8-1.5.0.tar.gz
  • Upload date:
  • Size: 2.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.14

File hashes

Hashes for mem8-1.5.0.tar.gz
Algorithm Hash digest
SHA256 03d35deb07bae0623771e21b91cf2c40537ddb4340f1a93e6ae3d0f634ff8b2e
MD5 a46300069973b1e87b34e7f89499225c
BLAKE2b-256 4c37e47a3cabdb2fecb286735a9e11e33e77209aae1a348c0a2c90f194e7ae56

See more details on using hashes here.

File details

Details for the file mem8-1.5.0-py3-none-any.whl.

File metadata

  • Download URL: mem8-1.5.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

Hashes for mem8-1.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3e73a45b299dabab30e8d9bcf32d47c58ebe998a3beddffeb210d8131a1c0192
MD5 1126434353020709fbcc1db6b152ce62
BLAKE2b-256 c1ef4a7ad11e62b7677959553288bc86b5600cf780f24bde5bf3f042358a95f0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page