Skip to content

About

AI-powered Git workflow platform with Claude AI integration. Features automated code generation, smart task management, real-time collaboration, and seamless GitHub integration.

Resources

Contributing

Stars

3 stars

Watchers

0 watching

Forks

Latest commit

Β 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

GitCraft AI Studio

πŸš€ AI-driven Git management platform powered by Claude and modern web technologies - Build, manage, and deploy with AI assistance.

πŸ”§ Latest Update: Comprehensive help system with Japanese/English documentation and enhanced UI!

License Node pnpm Claude Status

πŸ“‘ Table of Contents

πŸ“Έ Screenshots

πŸ–₯️ User Interface

Main application interfaces with light theme design

Dashboard Overview

Dashboard Main dashboard with system status, Claude AI progress, and task overview

Repository Management

Repositories Repository list with status indicators, stats, and quick actions

Repository Details

Repository Details Detailed repository view with Git operations and file management

Task Management

Task List Task workflow with status filtering, progress tracking, and priority management

Claude Code Integration

Claude Code Integration Real-time command tracking with repository selection and session monitoring

Claude Code CLI

Claude Code CLI Claude CLI interface for AI-powered development

AI Assistant Settings

AI Assistant Settings AI configuration and Claude integration settings

πŸ—οΈ Architecture & Workflow

Technical architecture and integration flows

Claude Integration Architecture

Claude Integration Architecture Complete architecture diagram showing how Claude CLI integrates with GitCraft AI Studio

Claude Workflow

Claude Workflow Step-by-step workflow for Claude integration: Regular work β†’ Recap β†’ Commit

Command Tracking Flow

Command Tracking Flow Real-time command tracking flow from Claude CLI to web interface

Auto-Commit and Push

Auto-Commit and Push Automatic Git operations triggered by Claude commands

Claude CLI Tools

Claude CLI Tools Available Claude CLI tools and their integration with GitCraft

Troubleshooting Flow

Troubleshooting Flow Common troubleshooting steps and solutions for Claude integration

✨ Features

🎯 Core Features

  • πŸ€– AI-Powered Development: Automated code generation, review, and refactoring with Claude AI (4 models)
  • πŸ“‹ Smart Task Management: Complete workflow (TODO β†’ IN_PROGRESS β†’ IN_REVIEW β†’ APPROVED β†’ COMPLETED)
  • πŸ—‚οΈ Repository Management: GitHub integration with local repository support and path editing
  • πŸ” Secure Authentication: Email/password with NextAuth.js and password reset
  • πŸ“Š Tech Stack Templates: Create and share technology stack configurations
  • πŸ”„ Real-time Collaboration: WebSocket-powered editing with cursor tracking
  • 🌿 Smart Git Operations: Automatic branch creation, merging, and push
  • πŸ“– Comprehensive Help System: Built-in documentation with search and multi-language support
  • πŸ”” Notifications (Under Development): Desktop and sound notifications for task updates

🌐 Internationalization & User Experience

  • 🎌 Multi-language Support: Complete Japanese & English interface
  • πŸ” Advanced Help System: Searchable documentation with 10 help sections including:
    • Getting Started guide with step-by-step onboarding
    • Installation & Setup guide for Claude Code and GitCraft
    • Repository Management with private repository access
    • Troubleshooting with 6 common issues and solutions
    • Task Management and AI integration guides
  • πŸ“± Responsive Design: Modern UI with mobile-first approach
  • 🎨 Theme Support: Light/Dark/System theme switching
  • πŸ”§ Settings Management: Comprehensive configuration system

πŸ€– Claude Integration Features

  • πŸ“ Command Tracking: Real-time monitoring of Claude CLI commands
  • πŸ’Ύ Conversation Auto-save: Automatic saving with AI-generated summaries
  • πŸ” Session Browser: Search and browse past Claude sessions with statistics
  • πŸ”„ Auto-commit/Push: Automatic Git operations triggered by ANY command (3-second delay)
  • πŸ“Š Session Analytics: Track Claude usage patterns and productivity
  • 🎯 Task Creation: Convert Claude sessions directly into tasks
  • πŸ”§ Hook System: Custom tool execution hooks for automation
  • πŸš€ Include Untracked: Automatically commits ALL files including untracked ones
  • πŸ“ Simplified Workflow: Use "recap" for summaries and "commit" for execution

🧠 AI Capabilities

  • Code Generation: Context-aware implementation from descriptions
  • Code Review: AI-powered reviews with actionable suggestions
  • Smart Commits: Auto-generate conventional commit messages
  • Code Refactoring: Optimize for performance and readability
  • Code Explanation: Interactive explanations with complexity control

πŸ› οΈ Tech Stack

Frontend

  • Framework: Next.js 15.2+, React 19.1, TypeScript 5.8
  • UI Components: shadcn/ui, Radix UI, Lucide Icons
  • Styling: Tailwind CSS 4.1, CSS Modules
  • State Management: React Context, tRPC Query
  • Real-time: WebSocket client, Server-Sent Events
  • Internationalization: next-intl for multi-language support
  • Code Editor: Monaco Editor with syntax highlighting

Backend

  • API: tRPC 11.1, Express middleware
  • Database: PostgreSQL 16, Prisma ORM 5.22
  • Authentication: NextAuth.js, bcrypt
  • Real-time: WebSocket server, Chokidar for file watching
  • Process Management: PM2 for persistent services

AI & Integrations

  • AI: Claude CLI (development) / Anthropic API (production)
  • Git: simple-git, isomorphic-git
  • Build Tools: Turborepo, pnpm workspaces
  • Development: TypeScript 5.8, ESLint, Prettier

πŸ“‹ Prerequisites

Required

  • Node.js 22.17.0+ (use nvm recommended)
  • pnpm 10.13.0+ (npm install -g pnpm)
  • Git 2.34+
  • PostgreSQL 16+

Optional

  • Claude CLI (for development mode)
  • Anthropic API Key (for production)
  • PM2 (for persistent services and Claude tracking)
    # Install PM2 globally
    sudo npm install -g pm2
    # Or without sudo using npx
    npx pm2
  • GitHub Personal Access Token (for private repos)

πŸš€ Quick Start

1️⃣ Clone Repository

git clone https://github.com/cruzy-jpn/gitcraft-ai-studio.git
cd GitCraft-AI-Studio-develop

2️⃣ Install pnpm (if not already installed)

# Option 1: Using npm with sudo
sudo npm install -g pnpm

# Option 2: Using standalone installer (no sudo required)
curl -fsSL https://get.pnpm.io/install.sh | sh -

# Option 3: Using Corepack (Node.js 16.13+)
corepack enable
corepack prepare pnpm@latest --activate

3️⃣ One-Command Setup

# Initialize everything automatically
./init.sh

This will:

  • βœ… Install all dependencies
  • βœ… Set up PostgreSQL database
  • βœ… Create environment files with symlinks
  • βœ… Initialize database schema
  • βœ… Initialize empty database (no default users)
  • βœ… Set up required directories

Note: The project now uses a single .env file in the root directory. The init script will create symlinks from apps/api/.env and apps/web/.env.local to the root .env file.

4️⃣ Environment Configuration

Important: All environment variables are managed in the root .env file. The application uses these variables for paths:

# Project root directory (defaults to current working directory)
GITCRAFT_PROJECT_ROOT=/path/to/your/project

# Log directory for Claude commands (defaults to project root)
GITCRAFT_LOG_DIR=/path/to/log/directory

# Session directory for Claude sessions (defaults to project root)
GITCRAFT_SESSION_DIR=/path/to/session/directory

Note: Some shell scripts (claude-wrapper.sh) may need manual configuration. Use claude-wrapper-template.sh as a starting point.

5️⃣ Start All Services

# Recommended: Start everything with one command
./start-all.sh

# This starts:
# - API server (port 4000)
# - Web server (port 3000)
# - Claude command tracking (integrated in API)
# - Creates necessary log files

6️⃣ Access the Application

Open your browser and navigate to:

7️⃣ Verify Installation

# Check system health
./check-system.sh

πŸ“– Documentation

πŸ“š Built-in Help System

GitCraft AI Studio includes a comprehensive help system accessible at /help with:

πŸ” Search Functionality

  • Real-time search across all documentation
  • Instant filtering of help topics
  • Keyboard shortcuts for quick navigation

πŸ“– Complete Documentation Sections

  1. Getting Started - New user onboarding with 4-step guide
  2. Installation & Setup - Claude Code and GitCraft installation
  3. Repository Management - GitHub integration and private repository access
  4. Task Management - AI-powered task workflow (coming soon)
  5. Claude AI Integration - AI development features (coming soon)
  6. Git Operations - Version control and collaboration (coming soon)
  7. Troubleshooting - 6 common issues with solutions
  8. Settings & Configuration - Workspace customization (coming soon)
  9. Collaboration - Real-time development features (coming soon)
  10. API Reference - Developer documentation (coming soon)

🌐 Multi-language Support

  • Complete English documentation
  • Full Japanese translations
  • Language switching via settings
  • Localized examples and code snippets

πŸ› οΈ Interactive Features

  • Copy-to-clipboard code blocks
  • Expandable troubleshooting sections with severity indicators
  • External links to official documentation
  • Quick navigation between related topics

πŸ“ Key Help Sections

Getting Started

  • System overview and feature introduction
  • 4-step onboarding process with visual indicators
  • Next steps recommendations

Installation & Setup

  • Prerequisites with version requirements
  • Claude Code CLI installation guide
  • GitCraft setup with environment configuration
  • Database setup instructions for multiple platforms

Repository Management

  • Comprehensive guide to adding repositories
  • Private repository access with GitHub tokens
  • Repository management operations
  • Best practices and security considerations

Troubleshooting

  • 6 common issues with step-by-step solutions:
    • Repository has no initial commit
    • Repository path mismatch
    • Claude AI authentication failed
    • Database connection failed
    • Git push operation failed
    • Task execution failed
  • Quick links for common problems
  • Additional resources and external documentation

πŸ“¦ PostgreSQL Setup (Manual)

If you need to set up PostgreSQL manually:

# Ubuntu/Debian
sudo apt update
sudo apt install -y postgresql postgresql-contrib

# macOS
brew install postgresql
brew services start postgresql

# Create database and user
sudo -u postgres psql << EOF
CREATE USER gitcraft WITH PASSWORD 'gitcraft_dev_2025';
CREATE DATABASE gitcraft_studio OWNER gitcraft;
GRANT ALL PRIVILEGES ON DATABASE gitcraft_studio TO gitcraft;
ALTER USER gitcraft CREATEDB;
EOF

For other methods (Docker, cloud services), see PostgreSQL Setup Guide.


πŸ”§ System Management

Start/Stop Services

# Start all services
./start-all.sh

# Stop all services
./stop-all.sh

# Check system health
./check-system.sh

Service Management Details

The start-all.sh script manages:

  • API Server: Backend services on port 4000
  • Web Server: Frontend on port 3000
  • Claude Tracker: PM2 process for command tracking
  • Health Monitoring: Continuous system checks

Logs and Monitoring

# View API logs
tail -f apps/api/dev.log

# View Web logs
tail -f apps/web/dev.log

# View Claude tracker logs
pm2 logs claude-track

# View all PM2 processes
pm2 status

Usage Guide

Task Workflow

  1. Create Task: Define what needs to be built with title and description
  2. AI Implementation: Claude generates code based on task description and tech stack
  3. Source Review: Review generated code and request modifications if needed
  4. Approval: Approve the implementation when satisfied
  5. Merge to Main: Merge approved code to main branch with automatic commit and push

Repository Management

  1. Add Repository: Click "Add Repository" and provide the clone URL

  2. Directory Name: Automatically extracted from URL, customizable before cloning

  3. Clone Path: Repositories are cloned to /GitCraft-AI-Studio-develop/{repository-name}

  4. GitHub Integration: Use personal access tokens for private repositories:

    https://<TOKEN>@github.com/username/repository.git
    

    ⚠️ Important: We strongly recommend using private repositories on GitHub to protect your code and intellectual property.

    πŸ“Œ Note for Empty GitHub Repositories: If you've created a new repository on GitHub without any commits:

    # First, initialize the repository locally
    echo "# your-repository-name" >> README.md
    git init
    git add README.md
    git commit -m "first commit"
    git branch -M main
    git remote add origin https://github.com/username/your-repository-name.git
    git push -u origin main
    
    # Then add it to GitCraft AI Studio
  5. Branch Management: Automatic branch creation for each task

  6. Merge Operations: One-click merge to main with automatic push

  7. Path Management: Update repository paths in settings if location changes

Real-time Collaboration

  • Collaborative Editing: Multiple users can edit files simultaneously
  • Cursor Tracking: See other users' cursor positions in real-time
  • Typing Indicators: Visual indicators when other users are typing
  • Room Management: Repository-based collaboration rooms

πŸ—οΈ Project Structure

GitCraft-AI-Studio-develop/
β”œβ”€β”€ apps/
β”‚   β”œβ”€β”€ web/                      # Next.js frontend application
β”‚   β”‚   β”œβ”€β”€ app/                  # App router pages
β”‚   β”‚   β”‚   └── [locale]/         # Internationalized routes
β”‚   β”‚   β”‚       β”œβ”€β”€ help/         # Help system pages
β”‚   β”‚   β”‚       β”‚   β”œβ”€β”€ page.tsx  # Main help landing page
β”‚   β”‚   β”‚       β”‚   β”œβ”€β”€ getting-started/
β”‚   β”‚   β”‚       β”‚   β”œβ”€β”€ installation/
β”‚   β”‚   β”‚       β”‚   β”œβ”€β”€ repositories/
β”‚   β”‚   β”‚       β”‚   └── troubleshooting/
β”‚   β”‚   β”‚       └── settings/     # Settings pages
β”‚   β”‚   β”œβ”€β”€ components/           # React components
β”‚   β”‚   β”‚   β”œβ”€β”€ claude/          # Claude integration components
β”‚   β”‚   β”‚   β”œβ”€β”€ ui/              # UI components (shadcn)
β”‚   β”‚   β”‚   └── layout/          # Layout components
β”‚   β”‚   β”œβ”€β”€ lib/                  # Utilities and hooks
β”‚   β”‚   β”‚   └── i18n/            # Internationalization
β”‚   β”‚   β”‚       └── translations/ # Translation files
β”‚   β”‚   β”‚           β”œβ”€β”€ en.json   # English translations
β”‚   β”‚   β”‚           └── ja.json   # Japanese translations
β”‚   β”‚   └── .env.local            # Web app environment
β”‚   └── api/                      # Backend API server
β”‚       β”œβ”€β”€ src/
β”‚       β”‚   β”œβ”€β”€ api/              # tRPC routers
β”‚       β”‚   β”‚   └── routers/      # API endpoints
β”‚       β”‚   β”œβ”€β”€ services/         # Business logic
β”‚       β”‚   └── db/               # Database client
β”‚       β”œβ”€β”€ prisma/               # Database schema
β”‚       └── scripts/              # Utility scripts
β”œβ”€β”€ packages/
β”‚   └── shared/                   # Shared types and schemas
β”œβ”€β”€ .claude-sessions/             # Claude conversation storage
β”œβ”€β”€ .claude-instructions          # Claude workflow configuration
β”œβ”€β”€ docs/                         # Documentation
β”œβ”€β”€ scripts/                      # System management scripts
β”‚   β”œβ”€β”€ init.sh                   # Project initialization
β”‚   β”œβ”€β”€ cleanup.sh                # Cleanup and reset
β”‚   β”œβ”€β”€ start-all.sh              # Start all services
β”‚   β”œβ”€β”€ stop-all.sh               # Stop all services
β”‚   └── check-system.sh           # System health check
└── git-repositories/             # Cloned repositories

πŸ”Œ API Reference

Core API Endpoints (tRPC)

Authentication

  • auth.login - User login with email/password
  • auth.register - Create new user account
  • auth.logout - End user session
  • auth.getSession - Get current user session
  • auth.updateProfile - Update user profile

Tasks

  • tasks.list - List all tasks with filtering
  • tasks.create - Create new task
  • tasks.update - Update task status/details
  • tasks.delete - Delete task
  • tasks.getById - Get single task details
  • tasks.updateStatus - Change task workflow status

Repositories

  • repositories.list - List user repositories
  • repositories.create - Add new repository
  • repositories.clone - Clone remote repository
  • repositories.delete - Remove repository
  • repositories.updatePath - Update repository local path
  • repositories.getBranches - List repository branches
  • repositories.createBranch - Create new branch
  • repositories.merge - Merge branch to main

Claude Sessions

  • claudeSessions.list - List all Claude sessions
  • claudeSessions.search - Search sessions by content
  • claudeSessions.getById - Get session details
  • claudeSessions.getStatistics - Usage analytics
  • claudeSessions.createTaskFromSession - Convert to task

Tech Stacks

  • techStacks.list - List available tech stacks
  • techStacks.create - Create custom stack
  • techStacks.update - Modify tech stack
  • techStacks.delete - Remove tech stack

WebSocket Events

Command Tracking

  • command:new - New Claude command executed
  • command:update - Command status updated
  • session:start - Claude session started
  • session:end - Claude session ended

Collaboration

  • room:join - User joined editing room
  • room:leave - User left editing room
  • cursor:update - Cursor position changed
  • content:update - File content changed

Utility Scripts

Database Management

# List all users
cd apps/api && npx tsx scripts/list-users.ts

# List repositories
cd apps/api && npx tsx scripts/list-repositories.ts

# Check completed tasks
cd apps/api && npx tsx scripts/check-completed-tasks.ts

# Verify auth token
cd apps/api && npx tsx scripts/verify-token.ts

Claude Integration

# Track commands manually
node track-claude-command.js <tool> <action> [params]

# Manage Claude sessions
node claude-conversation-manager.js

# Save current web session
node save-current-web-session.js

πŸš€ Initialization and Cleanup

Initial Setup (First Time Only)

The init.sh script handles all initialization automatically:

./init.sh

What it does:

  1. βœ… Installs all dependencies with pnpm
  2. βœ… Creates environment files from templates
  3. βœ… Sets up PostgreSQL database configuration
  4. βœ… Runs database migrations
  5. βœ… Creates default users
  6. βœ… Creates necessary directories (git-repositories, logs)
  7. βœ… Validates the setup
  8. βœ… Creates .claude-commands.log for Claude integration tracking

🧹 Cleanup Procedures

The cleanup.sh script provides various cleanup options:

Basic Cleanup (Keep Database)

./cleanup.sh
  • πŸ—‘οΈ Removes cloned git repositories
  • πŸ—‘οΈ Clears temporary files
  • βœ… Keeps database and user data intact

Database Reset

./cleanup.sh --reset-db
  • πŸ—‘οΈ Removes all database data
  • πŸ”„ Recreates database schema
  • πŸ—‘οΈ Clears all git repositories
  • ⚠️ All users and tasks will be deleted

Complete Cleanup

./cleanup.sh --all --reset-db
  • πŸ—‘οΈ Everything from database reset
  • πŸ—‘οΈ Removes node_modules
  • πŸ—‘οΈ Clears build artifacts (.next, dist)
  • πŸ—‘οΈ Removes log files
  • πŸ”„ Returns project to fresh state
  • ⚠️ Does not remove PostgreSQL installation

Skip Confirmation

./cleanup.sh -y --reset-db
  • ⚑ Runs cleanup without confirmation prompts
  • πŸš€ Useful for CI/CD pipelines

πŸ”„ Re-initialization After Cleanup

After running cleanup, re-initialize the project:

# After basic cleanup
pnpm dev  # Just start the servers

# After database reset
./init.sh  # Full re-initialization

# After complete cleanup
./init.sh  # Full re-initialization required

πŸ“Š Database Management

View Database

cd apps/api
npx prisma studio  # Opens at http://localhost:5555

Manual Database Operations

# Reset database manually
cd apps/api
npx prisma migrate reset --force

# Run specific migration
npx prisma migrate dev

# Generate Prisma client
npx prisma generate

πŸ”„ Database Rebuild Procedures

Once a database has been created and used, you may need to rebuild it completely. Here are the procedures:

Option 1: Complete Database Reset (Recommended)

# Use the cleanup script with database reset
./cleanup.sh --reset-db

# Then re-initialize
./init.sh

This will:

  • Drop all tables and data
  • Recreate the database schema
  • Create a fresh database with initial users
  • Clear all git repositories

Option 2: Manual Database Rebuild

# 1. Stop all services
./stop-all.sh

# 2. Access PostgreSQL
sudo -u postgres psql

# 3. Drop and recreate database (in psql)
DROP DATABASE IF EXISTS gitcraft_studio;
CREATE DATABASE gitcraft_studio OWNER gitcraft;
GRANT ALL PRIVILEGES ON DATABASE gitcraft_studio TO gitcraft;
\q

# 4. Run migrations
cd apps/api
npx prisma migrate deploy
npx prisma generate

# 5. Create initial users (optional)
cd apps/api
npx tsx scripts/init-db.ts

# 6. Restart services
cd ../..
./start-all.sh

Option 3: Preserve User Data, Reset Everything Else

# 1. Export user data
cd apps/api
npx tsx scripts/export-users.ts > users-backup.json

# 2. Reset database
cd ..
./cleanup.sh --reset-db

# 3. Re-initialize
./init.sh

# 4. Import user data
cd apps/api
npx tsx scripts/import-users.ts < users-backup.json

Option 4: Reset Specific Tables Only

cd apps/api

# Reset only tasks and related data
npx prisma db execute --file scripts/reset-tasks.sql

# Reset only repositories
npx prisma db execute --file scripts/reset-repositories.sql

# Reset only Claude sessions
npx prisma db execute --file scripts/reset-claude-sessions.sql

πŸ—„οΈ Database Backup & Restore

Create Backup

# Full database backup
pg_dump -U gitcraft -h localhost gitcraft_studio > backup_$(date +%Y%m%d_%H%M%S).sql

# Compressed backup
pg_dump -U gitcraft -h localhost gitcraft_studio | gzip > backup_$(date +%Y%m%d_%H%M%S).sql.gz

Restore from Backup

# From regular backup
psql -U gitcraft -h localhost gitcraft_studio < backup_20250127_120000.sql

# From compressed backup
gunzip -c backup_20250127_120000.sql.gz | psql -U gitcraft -h localhost gitcraft_studio

⚠️ Important Notes

  1. Data Loss Warning: Database rebuild will delete ALL data including:

    • User accounts
    • Tasks and task history
    • Repository configurations
    • Claude sessions
    • Tech stack templates
  2. Git Repositories: Physical git repositories in git-repositories/ are NOT affected by database reset but their database records will be lost

  3. Environment Variables: Your .env configuration will be preserved

  4. Recommended Approach: Always use ./cleanup.sh --reset-db followed by ./init.sh for cleanest results

πŸ’¬ Claude Integration

🎯 Complete GitCraft AI Studio + Claude Integration Workflow

Follow this step-by-step guide to integrate a new repository with Claude:

Step 1: Create GitHub Repository

If you haven't created a repository on GitHub yet:

  1. Go to GitHub and create a new repository
  2. Do NOT initialize with README, .gitignore, or license
  3. Copy the repository URL

Step 2: Initialize Empty Repository (if needed)

If your GitHub repository has no commits:

# Navigate to where you want to create the repository
cd ~/projects  # or your preferred directory

# Create and initialize the repository
mkdir your-repository-name
cd your-repository-name
echo "# your-repository-name" >> README.md
git init
git add README.md
git commit -m "first commit"
git branch -M main
git remote add origin https://github.com/username/your-repository-name.git
git push -u origin main

Step 3: Register Repository in GitCraft AI Studio

  1. Open GitCraft AI Studio: http://localhost:3000
  2. Navigate to /repositories
  3. Click "Clone Repository" button
  4. Fill in the form:
    • Repository URL: https://github.com/username/your-repository-name.git
    • Name: Your repository display name
    • Description: Brief description
    • Directory Name: Auto-filled from URL (customizable)
    • Access Token: Required for private repositories
  5. Click "Clone" to register

Step 4: Setup Git Configuration

  1. Go to the repository edit page: /repositories/[id]/edit
  2. In "Git Troubleshooting" section, click "Setup Git"
  3. This will:
    • Initialize Git repository (if needed)
    • Create initial commit (if needed)
    • Configure remote settings
    • Update branch information

Step 5: Configure Claude Integration

  1. Navigate to /claude-integration
  2. In "Target Repository Selection":
    • Select your repository from the dropdown
    • Click "Confirm Selection"
  3. This will:
    • Set the repository as Claude integration target
    • Create .claude/commands/instructions.md file automatically
    • Configure auto-commit and task creation

Step 6: Start Claude CLI Session

# Navigate to your repository directory
cd /path/to/GitCraft-AI-Studio/git-repositories/your-repository-name

# Start Claude CLI
claude

# Load GitCraft instructions
/instruction

This will:

  • Load custom GitCraft commands (recap, commit)
  • Configure language settings (Japanese responses if configured)
  • Enable command tracking and auto-commit features

Step 7: Work with Claude

Now you can work normally with Claude. All commands will be:

  • Tracked in real-time
  • Auto-committed after 3 seconds
  • Auto-pushed to GitHub (if authenticated)
  • Converted to tasks automatically

πŸš€ Quick Setup

# One-time setup for conversation auto-save
./setup-claude-conversation-autosave.sh
source ~/.bashrc

# Start Claude with auto-save and tracking
gc  # or gitcraft-claude

πŸ“ Features Overview

Conversation Auto-save

  • πŸš€ Automatic Recording: All Claude CLI conversations saved automatically
  • πŸ“Š AI Summaries: Auto-generated summaries at session end
  • πŸ’Ύ Dual Storage: Local files + GitCraft database
  • πŸ” Search & Browse: Find past sessions with search functionality
  • πŸ“ˆ Usage Analytics: Track productivity patterns
  • 🌐 Web UI: View sessions at /claude-integration

Command Tracking

  • πŸ“ Real-time Monitoring: Track all Claude tool usage
  • πŸ”„ Auto-commit: Automatic Git operations triggered by ALL commands
  • 🎯 Task Creation: Convert sessions to tasks instantly
  • πŸ“Š Session Browser: Search and analyze past sessions
  • πŸ”§ Hook System: Custom automation with tool hooks
  • ⚑ Fast Response: 5-second (default) and can set by user delay for command batching
  • πŸ“¦ Smart Commits: Includes untracked files automatically

πŸ—‚οΈ Session Management

Commands

gc-sessions       # List all sessions
gc-latest         # Show latest session summary
gc-show <ID>      # Show specific session details
gc-search "query" # Search sessions
gc-stats          # Show statistics

Session Storage Structure

.claude-sessions/2024-01-20T10-30-00-000Z-a1b2c3d4/
β”œβ”€β”€ metadata.json         # Session metadata
β”œβ”€β”€ conversation.log      # Full conversation log
β”œβ”€β”€ commands.json         # Executed commands
└── summary.json          # AI-generated summary

πŸ”„ Auto-Commit Feature (Enhanced)

How It Works

  1. Start Session: Click "Start Tracking" in Claude Integration page
  2. Select Repository: Choose from dropdown or use current
  3. Work with Claude: ALL commands trigger auto-commit (not just file changes)
  4. Auto Task Creation: Task created after 3 seconds of ANY command
  5. Auto Operations:
    • βœ… Creates task with comprehensive command history
    • βœ… Commits ALL files including untracked with git add .
    • βœ… Pushes to GitHub (if authenticated)
    • βœ… Marks task as COMPLETED
    • βœ… 30-second minimum between auto-commits (prevents spam)

GitHub Authentication

Option 1: Personal Access Token (Recommended)

# Create token at: https://github.com/settings/tokens/new
# Scopes: repo (full control)

# Configure Git
git config --global credential.helper store
git push origin main
# Username: your-github-username
# Password: your-personal-access-token

Option 2: SSH Key

ssh-keygen -t ed25519 -C "your-email@example.com"
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_ed25519
# Add public key to GitHub settings

πŸ› οΈ Advanced Configuration

Environment Setup

# apps/api/.env
ANTHROPIC_API_KEY="claude"        # For Claude CLI
# OR
ANTHROPIC_API_KEY="sk-ant-..."    # For Anthropic API

PM2 for Persistent Tracking

# Start with PM2 (included in start-all.sh)
pm2 start claude-auto-track.js --name claude-track
pm2 save
pm2 startup

# Monitor
pm2 logs claude-track
pm2 status

Claude Workflow Configuration (.claude-instructions)

1. Regular Work - Normal conversation for code creation/editing
2. Session End - User says "recap" β†’ Claude lists commands
3. Command Execution - User says "commit" β†’ Claude executes commands

Manual Command Logging

# For testing or manual tracking
node track-claude-command.js <tool> <action> [params]

# Examples:
node track-claude-command.js Edit "Updated auth" file:auth.ts
node track-claude-command.js Bash "Run tests" command:"pnpm test"

πŸ› Troubleshooting Claude Integration

Session Not Tracking

  • βœ… Ensure ./start-all.sh is running
  • βœ… Check PM2 status: pm2 status
  • βœ… Verify .claude-commands.log exists
  • βœ… Check API logs: tail -f apps/api/dev.log

Auto-Commit Not Working

  • βœ… Click "Start Tracking" before working with Claude
  • βœ… Select repository from dropdown
  • βœ… Wait 3 seconds after ANY command for auto-task
  • βœ… Check Git auth: git push origin main
  • βœ… Auto-commit now triggers on ALL commands (not just file changes)
  • βœ… Untracked files are automatically included with git add .

Common Fixes

# Clear Git lock
rm -f .git/index.lock

# Reset Claude tracking
pm2 restart claude-track

# Check system health
./check-system.sh

πŸ’» Development

Development Commands

# Type checking
pnpm type-check

# Linting and formatting
pnpm lint
pnpm format

# Build all apps
pnpm build

# Run specific app
pnpm --filter web dev
pnpm --filter api dev

# Run tests
pnpm test

Database Commands

# Open Prisma Studio
cd apps/api && npx prisma studio

# Run migrations
cd apps/api && npx prisma migrate dev

# Reset database
cd apps/api && npx prisma migrate reset

# Generate Prisma client
cd apps/api && npx prisma generate

Utility Scripts

# User management
cd apps/api && npx tsx scripts/list-users.ts
cd apps/api && npx tsx scripts/create-test-user.ts

# Repository management
cd apps/api && npx tsx scripts/list-repositories.ts
cd apps/api && npx tsx scripts/cleanup-repo.ts
cd apps/api && npx tsx scripts/update-repo-paths.ts

# Task management
cd apps/api && npx tsx scripts/check-completed-tasks.ts

Environment Variables

See Environment Variables Guide for complete documentation.

Key variables:

  • ANTHROPIC_API_KEY - Claude API key or "claude" for CLI
  • DATABASE_URL - PostgreSQL connection string
  • NEXTAUTH_SECRET - Authentication secret
  • SMTP_* - Email configuration (optional)

πŸ› Troubleshooting

🚧 Features Under Development

Notifications

The notification system is currently under development. While settings can be configured in the Settings β†’ Notifications panel, the following features may not work as expected:

  • Desktop notifications
  • Sound notifications
  • Task completion alerts
  • Review request notifications

This feature will be fully implemented in a future release.

πŸ”§ Quick Fixes

System Health Check

# Run comprehensive system check
./check-system.sh

Port Already in Use

# Kill processes on specific ports
lsof -ti:3000 | xargs kill -9  # Web server
lsof -ti:4000 | xargs kill -9  # API server

# Or use the stop script
./stop-all.sh

Module Not Found

# Clear cache and reinstall
rm -rf node_modules .turbo pnpm-lock.yaml
pnpm install

npm error "Unsupported URL Type workspace:"

# This project uses pnpm workspaces, not npm
# Install pnpm if not already installed
npm install -g pnpm

# Then use pnpm instead of npm
pnpm install

PM2 not installed

# PM2 is optional but recommended for Claude tracking
# Install globally with sudo
sudo npm install -g pm2

# Or install locally and use npx
npm install pm2
npx pm2 status

πŸ—„οΈ Database Issues

Connection Failed

# Check PostgreSQL status
sudo service postgresql status

# Start PostgreSQL
sudo service postgresql start

# Verify connection
psql -U gitcraft -d gitcraft_studio -c "SELECT 1"

Migration Issues

# Reset database completely
./cleanup.sh --reset-db

# Manual reset
cd apps/api
npx prisma migrate reset --force
npx tsx scripts/init-db.ts

πŸ€– Claude Integration Issues

Session Not Tracking

# Check PM2 process
pm2 status

# Restart Claude tracker
pm2 restart claude-track

# Check log file exists
ls -la .claude-commands.log

# Monitor real-time logs
pm2 logs claude-track --lines 50

Auto-Commit Not Working

  1. Verify Setup:

    • βœ… Click "Start Tracking" before changes
    • βœ… Select repository from dropdown
    • βœ… Wait 3 seconds for auto-task creation
  2. Check Git Status:

    git remote -v     # Should show repository
    git status        # Should show changes
    git config --list # Check credentials
  3. Monitor Logs:

    # API server Git operations
    tail -f apps/api/dev.log | grep -E "(Git|commit|push)"
    
    # WebSocket events
    # Check browser console for real-time events

Git Lock File Error

# Remove lock file
rm -f .git/index.lock

# If in repository subdirectory
find . -name "index.lock" -delete

πŸ” Authentication Issues

Login Problems

  1. Environment Variables:

    # Verify matching secrets
    grep NEXTAUTH_SECRET apps/api/.env
    grep AUTH_SECRET apps/web/.env.local
  2. Clear Session:

    # Clear browser cookies
    # Or in incognito mode
  3. Create Initial User:

    cd apps/api
    # Create a new user with the signup API or through the web interface

GitHub Push Authentication

Personal Access Token Issues:

# Clear credentials
git config --global --unset credential.helper

# Set new helper
git config --global credential.helper store

# Test with new token
git push origin main
# Username: your-github-username
# Password: your-personal-access-token

SSH Key Issues:

# Test SSH connection
ssh -T git@github.com

# Add SSH key to agent
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_ed25519

# Verify remote URL
git remote set-url origin git@github.com:username/repo.git

🌐 WebSocket Connection Issues

# Check WebSocket server
curl http://localhost:4000/debug/websocket

# Monitor connections
tail -f apps/api/dev.log | grep WebSocket

# Restart services
./stop-all.sh && ./start-all.sh

πŸ“ Common Error Messages

Error Solution
EADDRINUSE Port in use, run ./stop-all.sh
ECONNREFUSED Database not running, start PostgreSQL
Invalid token Clear cookies, login again
Git push failed Check GitHub authentication
Command not tracked Ensure PM2 claude-track is running
Module not found Run pnpm install
ai-service-dev not found File removed, imports updated

πŸ†˜ Still Having Issues?

  1. Check Logs:

    # All logs
    tail -f apps/*/dev.log
    
    # PM2 logs
    pm2 logs
  2. Reset Everything:

    ./cleanup.sh --all --reset-db
    ./init.sh
    ./start-all.sh
  3. Report Issue:

    • Check existing issues: GitHub Issues
    • Include error logs and system info
    • Mention steps to reproduce

πŸ“ˆ Current Status

βœ… Fully Implemented

  • πŸ” Authentication: NextAuth.js with email/password, password reset
  • πŸ“‹ Task Management: 6-state workflow with priorities
  • πŸ€– AI Integration: 4 Claude models, streaming, context awareness
  • πŸ”„ Real-time Features: WebSocket collaboration, cursor tracking
  • πŸ—‚οΈ Repository Management: GitHub integration, local repo support, path editing
  • πŸ—„οΈ Database: PostgreSQL + Prisma ORM
  • βš™οΈ Settings: User preferences, tech stack templates
  • 🌐 i18n: Complete English & Japanese interface
  • πŸ“– Help System: Comprehensive 10-section documentation with search
  • πŸ“ Claude Integration: Command tracking, auto-save, session browser
  • πŸš€ Auto Operations: Git commit/push from Claude sessions
  • πŸ”§ Repository Path Management: Update repository paths in settings
  • 🚫 Duplicate Prevention: Check for existing repositories before cloning

🚧 Roadmap

  • Complete remaining 6 help pages (Tasks, Claude AI, Git Operations, Settings, Collaboration, API Reference)
  • GitLab and Bitbucket integration
  • Team collaboration features
  • Advanced AI code analysis
  • Plugin system
  • Mobile app
  • CI/CD integration

🀝 Contributing

We welcome contributions! Please follow these steps:

  1. Fork the repository
  2. Create a feature branch:
    git checkout -b feature/amazing-feature
  3. Commit your changes:
    git commit -m 'Add amazing feature'
  4. Push to the branch:
    git push origin feature/amazing-feature
  5. Open a Pull Request

Development Guidelines

  • Follow TypeScript best practices
  • Write tests for new features
  • Update documentation
  • Ensure all checks pass

πŸ“ˆ Changelog

Latest Updates (2025-05-27)

  • πŸ“– Comprehensive Help System: Added 10-section help documentation with search functionality
  • 🌐 Complete i18n: Full Japanese & English translations for all help content
  • πŸ” Advanced Search: Real-time filtering across all documentation
  • πŸ“± Responsive Design: Mobile-optimized help pages with expandable sections
  • 🎨 Enhanced UI: Modern help interface with copy-to-clipboard code blocks
  • πŸš€ Interactive Guides: Step-by-step installation and troubleshooting guides
  • πŸ”§ Troubleshooting System: 6 common issues with expandable solutions and commands
  • πŸ“Š Quick Navigation: Help section overview with visual icons and descriptions
  • πŸ—‚οΈ Repository Directory Structure: Removed random ID generation, now uses repository name directly
  • πŸ“ Repository Description: Fixed description field not being saved during creation/edit
  • 🎌 Multi-language Support: Added output language selection (Japanese/English) for AI-generated content
  • πŸ”§ Clone Directory Management: Added directory name field with automatic extraction from URL
  • πŸ“ Clone Path Preview: Shows destination path before cloning
  • πŸ”§ Repository Path Management: Added ability to update repository paths in settings
  • 🚫 Duplicate Repository Check: Prevent cloning same repository multiple times
  • πŸ—‘οΈ Repository Deletion: Added delete functionality with proper cleanup
  • πŸ“ Claude Workflow: Simplified commands - use "recap" and "commit"
  • 🧹 Code Cleanup: Removed development-only files and updated naming conventions
  • πŸ› Bug Fixes: Fixed import references to removed ai-service-dev files
  • πŸš€ Enhanced Auto-Git: Commands now trigger automatic Git commit/push
  • ⚑ Faster Response: Reduced delay from 5s to 3s for command batching
  • πŸ“¦ Include All Files: Untracked files automatically included with git add .
  • 🎯 Universal Triggers: ALL commands trigger auto-commit (not just file changes)
  • πŸ”„ Smart Batching: 30-second minimum between commits to prevent spam
  • πŸ“Š Better Descriptions: Comprehensive task descriptions with all command types

⚠️ Disclaimer

IMPORTANT: This software is provided "as is", without warranty of any kind, express or implied. The developers and contributors of GitCraft AI Studio assume no responsibility or liability for any damages, data loss, security breaches, or any other issues that may arise from using this software. Use at your own risk.

By using GitCraft AI Studio, you acknowledge that:

  • You are solely responsible for your code, data, and repository security
  • The automated Git operations may potentially cause data loss if not configured properly
  • AI-generated code should always be reviewed before deployment
  • You should maintain regular backups of your important code

πŸ“„ License

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

πŸ™ Acknowledgments

  • πŸ€– Built with Claude AI assistance
  • πŸ’œ Powered by Anthropic's Claude API
  • 🎨 UI components from shadcn/ui
  • 🎯 Icons from Lucide React
  • πŸš€ Built with Next.js and tRPC

πŸ“ž Support


GitCraft AI Studio - Empowering developers with AI-driven Git workflows

Made with ❀️ by the GitCraft team

About

AI-powered Git workflow platform with Claude AI integration. Features automated code generation, smart task management, real-time collaboration, and seamless GitHub integration.

Resources

Contributing

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages