Skip to content

swapnildahiphale/claude-code-jarvis-hooks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

3 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿค– Claude Code Jarvis Hooks

"Sir, the code is polished and waitingโ€”shall we embrace the future?" - Enhance your Claude Code experience with intelligent voice notifications.

๐ŸŽฌ Demo

Claude Code Jarvis Demo

๐ŸŽฌ Watch the Demo: Claude Code with JARVIS-like Voice Notifications
Experience enhanced development workflow with intelligent voice feedback

๐Ÿš€ What is Claude Code Jarvis?

Claude Code Jarvis is a sophisticated hook system that enhances your Claude Code CLI experience with intelligent voice notifications. Get spoken feedback when Claude needs your input with AI-generated messages and multiple TTS providers.

โœจ Key Features

  • ๐ŸŽ™๏ธ Voice Notifications - Get spoken alerts when Claude needs your input
  • ๐ŸŽญ AI-Generated Messages - Witty, professional notification messages
  • ๐Ÿ”„ Multi-Provider TTS - Works with ElevenLabs, OpenAI, and local TTS
  • ๐Ÿ“Š Operation Logging - Tracks notification events
  • โšก Seamless Integration - Works transparently with Claude Code

๐ŸŽฏ Why Use Jarvis Hooks?

Before Jarvis

  • Silent CLI interactions
  • No audio feedback when Claude needs input
  • Generic notifications

After Jarvis

  • "Sir, your expertise is needed" ๐Ÿ””
  • Voice notifications when Claude waits for input ๐ŸŽต
  • AI-generated witty notification messages ๐ŸŽญ

๐Ÿ”ง Installation & Setup

Prerequisites

Quick Start

  1. Clone the repository

    git clone https://github.com/swapnildahiphale/claude-code-jarvis-hooks.git
    cd claude-code-jarvis-hooks
  2. Set up environment variables

    cp .env.example .env
    # Edit .env with your API keys
  3. Configure your API keys

    # Required for AI-generated messages
    CLAUDE_HOOKS_OPENAI_API_KEY=your_openai_api_key_here
    
    # Optional: For premium voice quality
    ELEVENLABS_API_KEY=your_elevenlabs_api_key_here
    ELEVENLABS_VOICE_ID=your_voice_id_here
    
    # Personalization
    ENGINEER_NAME=YourName
  4. Activate the hooks

    # Copy this folder to your project's .claude directory
    # The hooks will automatically activate when using Claude Code

๐ŸŽฎ Usage

Automatic Operation

Once installed, Jarvis hooks work automatically with Claude Code:

# Normal Claude Code usage
claude

# Jarvis automatically:
# โœ… Provides voice notifications when Claude needs input
# โœ… Generates AI-powered notification messages
# โœ… Handles stop events with voice feedback

Manual Testing

# Test voice notifications
uv run .claude/hooks/utils/tts/elevenlabs_tts.py "Test message"

# Test AI message generation
uv run .claude/hooks/utils/llm/oai.py --completion
uv run .claude/hooks/utils/llm/oai.py --notification

# Test notification hook
uv run .claude/hooks/notification.py --notify

๐Ÿ—๏ธ Architecture

Hook System

graph TD
    A[Claude Code Notification Event] --> B[notification.py]
    B --> C[Voice Notification]
    
    D[Claude Code Stop Event] --> E[stop.py]
    E --> F[Voice Notification]
Loading

Component Structure

.claude/
โ”œโ”€โ”€ hooks/
โ”‚   โ”œโ”€โ”€ notification.py      # Voice notifications
โ”‚   โ”œโ”€โ”€ stop.py              # Stop event notifications
โ”‚   โ”œโ”€โ”€ subagent_stop.py     # Subagent stop notifications
โ”‚   โ””โ”€โ”€ utils/
โ”‚       โ”œโ”€โ”€ llm/             # AI message generation
โ”‚       โ”‚   โ”œโ”€โ”€ oai.py       # OpenAI integration
โ”‚       โ”‚   โ””โ”€โ”€ anth.py      # Anthropic fallback
โ”‚       โ””โ”€โ”€ tts/             # Text-to-speech
โ”‚           โ”œโ”€โ”€ elevenlabs_tts.py
โ”‚           โ”œโ”€โ”€ openai_tts.py
โ”‚           โ””โ”€โ”€ pyttsx3_tts.py
โ”œโ”€โ”€ settings.json            # Hook configuration

๐ŸŽจ AI-Generated Notifications

Jarvis generates sophisticated notification messages with:

  • Calm, articulate tone with subtle Irish accent
  • Quietly confident with gentle wit
  • Professional yet approachable style
  • Precise diction and poised pacing

Sample Notification Messages

  • "Sir, your input is neededโ€”lest I proceed without divine guidance."
  • "Swapnil, your input is kindly requestedโ€”no pressure, Sir."
  • "The code is polished and waitingโ€”shall we embrace the future, Sir?"
  • "All set, Swapnilโ€”ready for whateverโ€™s next with quiet confidence."

๐Ÿ“Š Logging & Monitoring

All operations are logged to logs/:

  • notification.json - Voice notifications
  • stop.json - Stop event notifications
  • chat.json - Chat-related events

๐Ÿ› ๏ธ Configuration

Environment Variables

# Core Configuration
ENGINEER_NAME=YourName                    # For personalized messages
CLAUDE_HOOKS_OPENAI_API_KEY=sk-...        # OpenAI API key
CLAUDE_HOOKS_OPENAI_MODEL=gpt-4.1-nano   # Model selection

# Voice Configuration
ELEVENLABS_API_KEY=sk_...                 # ElevenLabs API key
ELEVENLABS_VOICE_ID=HzHW0uLdA9prFl1Z5krC # Voice selection
ELEVENLABS_MODEL_ID=eleven_turbo_v2_5     # Model selection

Permissions

Configure allowed tools in .claude/settings.json:

{
  "permissions": {
    "allow": [
      "Bash(mkdir:*)",
      "Bash(uv:*)",
      "Write",
      "Edit"
    ]
  }
}

๐Ÿ”„ Fallback System

Jarvis uses intelligent fallbacks:

  1. ElevenLabs TTS (Premium quality) โ†’
  2. OpenAI TTS (Good quality) โ†’
  3. pyttsx3 (Local, no API required)

๐Ÿค Contributing

  1. Fork the repository
  2. Create your 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

๐Ÿ“„ License

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

๐Ÿ™ Acknowledgments

  • Anthropic for the amazing Claude Code CLI
  • OpenAI for powering the AI personality
  • ElevenLabs for premium voice synthesis
  • Iron Man for the JARVIS inspiration

๐Ÿš€ Ready to enhance your development workflow?

"Sir, your workspace awaitsโ€”shall we craft something remarkable?"

About

Claude Code hooks that talk

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages