eyelet


Nameeyelet JSON
Version 0.3.0 PyPI version JSON
download
home_pageNone
SummaryHook orchestration system for AI agents - Thread through the eyelet! (Work in Progress)
upload_time2025-07-29 21:51:50
maintainerNone
docs_urlNone
authorBrian Morin
requires_python>=3.11
licenseMIT
keywords hooks ai automation orchestration claude-code eyelet
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # ๐Ÿ”— Eyelet - Hook Orchestration for AI Agents

> "Thread through the eyelet!" - A sophisticated hook management system for AI agent workflows

[![Python](https://img.shields.io/badge/python-3.11%2B-blue)](https://www.python.org/)
[![PyPI version](https://badge.fury.io/py/eyelet.svg)](https://badge.fury.io/py/eyelet)
[![uv](https://img.shields.io/badge/uv-latest-green)](https://github.com/astral-sh/uv)
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
[![CI](https://github.com/bdmorin/eyelet/actions/workflows/ci.yml/badge.svg)](https://github.com/bdmorin/eyelet/actions/workflows/ci.yml)
[![Status](https://img.shields.io/badge/status-work%20in%20progress-orange)](https://github.com/bdmorin/eyelet)

## โš ๏ธ Work in Progress

**Note: Eyelet is under active development.** While core hook logging functionality is stable and working, we're currently building:
- SQLite database logging (in addition to JSON files)
- Advanced configuration management
- Query and analytics features
- Browser-based UI for log exploration

Feel free to use and contribute, but expect breaking changes as we evolve the API.

## ๐Ÿ“ฆ About

Eyelet provides comprehensive management, templating, and execution handling for AI agent hooks. Like an eyelet that securely connects hooks to fabric, Eyelet connects and orchestrates your AI agent's behavior through a reliable workflow system.

## ๐Ÿš€ Quick Start

```bash
# Install with uvx (recommended)
uvx eyelet

# Install universal logging for ALL hooks (recommended!)
uvx eyelet configure install-all

# Thread through the eyelet with the TUI
uvx eyelet

# Configure hooks for your project
uvx eyelet configure --scope project

# Deploy a template
uvx eyelet template install observability
```

## ๐ŸŽฏ Universal Hook Handler

Eyelet includes a powerful universal hook handler that logs EVERY Claude Code hook to a structured directory:

```bash
# Install logging for all hooks with one command
uvx eyelet configure install-all

# Your hooks will be logged to:
./eyelet-hooks/
โ”œโ”€โ”€ PreToolUse/
โ”‚   โ””โ”€โ”€ Bash/2025-07-28/
โ”‚       โ””โ”€โ”€ 20250728_133300_236408_PreToolUse_Bash.json
โ”œโ”€โ”€ PostToolUse/
โ”‚   โ””โ”€โ”€ Read/2025-07-28/
โ”œโ”€โ”€ UserPromptSubmit/2025-07-28/
โ”œโ”€โ”€ Stop/2025-07-28/
โ””โ”€โ”€ PreCompact/manual/2025-07-28/
```

Each log contains:
- Complete input data from Claude Code
- Environment variables and context
- Timestamps (ISO and Unix)
- Session information
- Tool inputs/outputs
- Python version and platform details

## ๐ŸŽฏ Features

- **Dynamic Hook Discovery** - Automatically detects new tools and generates all valid hook combinations
- **Beautiful TUI** - Navigate with a Textual-powered interface for reliable connections  
- **Template System** - Deploy pre-configured hook patterns with a single command
- **Workflow Engine** - Chain complex behaviors with conditional logic
- **Comprehensive Logging** - Track every hook execution in SQLite or filesystem
- **AI Integration** - Native Claude Code SDK support for intelligent workflows
- **Real-time Monitoring** - Watch hook executions as they happen

## ๐Ÿ“š Documentation

- [Installation Guide](docs/installation.md)
- [Hook Types & Matchers](docs/hooks.md)
- [Creating Workflows](docs/workflows.md)
- [Template Library](docs/templates.md)
- [API Reference](docs/api.md)

## ๐Ÿ› ๏ธ Commands

```bash
# Core Operations
uvx eyelet configure    # Configure hooks
uvx eyelet execute      # Run as hook endpoint
uvx eyelet logs         # View execution logs

# Discovery & Generation  
uvx eyelet discover     # Find available hooks
uvx eyelet generate     # Create hook combinations
uvx eyelet update       # Check for updates

# Templates & Workflows
uvx eyelet template list      # Browse available templates
uvx eyelet template install   # Deploy a template
uvx eyelet workflow create    # Build custom workflows
```

## ๐ŸŽจ Example Hook Configuration

```json
{
  "hooks": [{
    "type": "PreToolUse",
    "matcher": "Bash",
    "handler": {
      "type": "command", 
      "command": "uvx eyelet execute --workflow bash-validator"
    }
  }]
}
```

## ๐Ÿ” JSON Validation & Linting

Eyelet provides built-in validation for Claude settings files and VS Code integration:

```bash
# Validate your Claude settings
uvx eyelet validate settings

# Validate a specific file
uvx eyelet validate settings ~/.claude/settings.json
```

### VS Code Integration

The project includes a JSON schema for Claude settings files. VS Code users get:
- โœ… IntelliSense/autocomplete for hook configurations
- โœ… Real-time error detection
- โœ… Hover documentation

See [docs/vscode-json-linting.md](docs/vscode-json-linting.md) for setup instructions.

## ๐Ÿ”— Connection Philosophy

Eyelet embraces hardware connection terminology for reliable, secure attachment:

- **"Thread through the eyelet!"** - Launch the TUI
- **"Secure the connection!"** - Deploy templates  
- **"Check the connection log"** - View logs
- **"Scan for connection points"** - Discover new hooks
- **"Hold fast!"** - Maintain current configuration

## ๐Ÿงช Testing

Eyelet includes comprehensive testing tools to ensure your hooks are working correctly:

### Testing Hook Integration

```bash
# Run the interactive hook test
mise run test-hooks

# This will generate a unique test ID and guide you through testing all tools
# After running the test commands, verify with:
mise run test-hooks-verify zebra-1234-flamingo-5678

# View hook statistics
mise run hook-stats

# Generate a coverage report
mise run hook-coverage

# Clean old logs (older than 7 days)
mise run hook-clean
```

### Development Testing

```bash
# Run all tests
mise run test

# Run linting
mise run lint

# Run type checking
mise run typecheck

# Run all CI checks
mise run ci
```

### Manual Hook Testing

The `test_all_hooks.py` script provides comprehensive hook testing:
- Generates unique test identifiers for tracking
- Tests all Claude Code tools (Bash, Read, Write, Edit, etc.)
- Verifies hook logs contain expected data
- Provides coverage reports

## ๐Ÿค Contributing

We welcome contributions! Please open issues and pull requests on GitHub.

## ๐Ÿ“š Documentation

- **[Quickstart Guide](docs/QUICKSTART.md)** - Get up and running quickly
- **[Design Documents](docs/design/)** - Architecture and design decisions
- **[Setup Guides](docs/setup/)** - GitHub Actions and deployment setup

## ๐Ÿ“œ License

MIT License - see [LICENSE](LICENSE) for details.

## ๐Ÿ™ Acknowledgments

Built with love for the AI development community. Special thanks to the Anthropic team for Claude Code and its powerful hook system.

---

*"The strongest connections are forged under pressure." - Connect with Eyelet and explore the possibilities of AI agent orchestration.*

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "eyelet",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.11",
    "maintainer_email": null,
    "keywords": "hooks, ai, automation, orchestration, claude-code, eyelet",
    "author": "Brian Morin",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/51/9a/c823b2d7117956749641d13fe3e439f4a76f9f00e50f12011ff36d863f4c/eyelet-0.3.0.tar.gz",
    "platform": null,
    "description": "# \ud83d\udd17 Eyelet - Hook Orchestration for AI Agents\n\n> \"Thread through the eyelet!\" - A sophisticated hook management system for AI agent workflows\n\n[![Python](https://img.shields.io/badge/python-3.11%2B-blue)](https://www.python.org/)\n[![PyPI version](https://badge.fury.io/py/eyelet.svg)](https://badge.fury.io/py/eyelet)\n[![uv](https://img.shields.io/badge/uv-latest-green)](https://github.com/astral-sh/uv)\n[![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)\n[![CI](https://github.com/bdmorin/eyelet/actions/workflows/ci.yml/badge.svg)](https://github.com/bdmorin/eyelet/actions/workflows/ci.yml)\n[![Status](https://img.shields.io/badge/status-work%20in%20progress-orange)](https://github.com/bdmorin/eyelet)\n\n## \u26a0\ufe0f Work in Progress\n\n**Note: Eyelet is under active development.** While core hook logging functionality is stable and working, we're currently building:\n- SQLite database logging (in addition to JSON files)\n- Advanced configuration management\n- Query and analytics features\n- Browser-based UI for log exploration\n\nFeel free to use and contribute, but expect breaking changes as we evolve the API.\n\n## \ud83d\udce6 About\n\nEyelet provides comprehensive management, templating, and execution handling for AI agent hooks. Like an eyelet that securely connects hooks to fabric, Eyelet connects and orchestrates your AI agent's behavior through a reliable workflow system.\n\n## \ud83d\ude80 Quick Start\n\n```bash\n# Install with uvx (recommended)\nuvx eyelet\n\n# Install universal logging for ALL hooks (recommended!)\nuvx eyelet configure install-all\n\n# Thread through the eyelet with the TUI\nuvx eyelet\n\n# Configure hooks for your project\nuvx eyelet configure --scope project\n\n# Deploy a template\nuvx eyelet template install observability\n```\n\n## \ud83c\udfaf Universal Hook Handler\n\nEyelet includes a powerful universal hook handler that logs EVERY Claude Code hook to a structured directory:\n\n```bash\n# Install logging for all hooks with one command\nuvx eyelet configure install-all\n\n# Your hooks will be logged to:\n./eyelet-hooks/\n\u251c\u2500\u2500 PreToolUse/\n\u2502   \u2514\u2500\u2500 Bash/2025-07-28/\n\u2502       \u2514\u2500\u2500 20250728_133300_236408_PreToolUse_Bash.json\n\u251c\u2500\u2500 PostToolUse/\n\u2502   \u2514\u2500\u2500 Read/2025-07-28/\n\u251c\u2500\u2500 UserPromptSubmit/2025-07-28/\n\u251c\u2500\u2500 Stop/2025-07-28/\n\u2514\u2500\u2500 PreCompact/manual/2025-07-28/\n```\n\nEach log contains:\n- Complete input data from Claude Code\n- Environment variables and context\n- Timestamps (ISO and Unix)\n- Session information\n- Tool inputs/outputs\n- Python version and platform details\n\n## \ud83c\udfaf Features\n\n- **Dynamic Hook Discovery** - Automatically detects new tools and generates all valid hook combinations\n- **Beautiful TUI** - Navigate with a Textual-powered interface for reliable connections  \n- **Template System** - Deploy pre-configured hook patterns with a single command\n- **Workflow Engine** - Chain complex behaviors with conditional logic\n- **Comprehensive Logging** - Track every hook execution in SQLite or filesystem\n- **AI Integration** - Native Claude Code SDK support for intelligent workflows\n- **Real-time Monitoring** - Watch hook executions as they happen\n\n## \ud83d\udcda Documentation\n\n- [Installation Guide](docs/installation.md)\n- [Hook Types & Matchers](docs/hooks.md)\n- [Creating Workflows](docs/workflows.md)\n- [Template Library](docs/templates.md)\n- [API Reference](docs/api.md)\n\n## \ud83d\udee0\ufe0f Commands\n\n```bash\n# Core Operations\nuvx eyelet configure    # Configure hooks\nuvx eyelet execute      # Run as hook endpoint\nuvx eyelet logs         # View execution logs\n\n# Discovery & Generation  \nuvx eyelet discover     # Find available hooks\nuvx eyelet generate     # Create hook combinations\nuvx eyelet update       # Check for updates\n\n# Templates & Workflows\nuvx eyelet template list      # Browse available templates\nuvx eyelet template install   # Deploy a template\nuvx eyelet workflow create    # Build custom workflows\n```\n\n## \ud83c\udfa8 Example Hook Configuration\n\n```json\n{\n  \"hooks\": [{\n    \"type\": \"PreToolUse\",\n    \"matcher\": \"Bash\",\n    \"handler\": {\n      \"type\": \"command\", \n      \"command\": \"uvx eyelet execute --workflow bash-validator\"\n    }\n  }]\n}\n```\n\n## \ud83d\udd0d JSON Validation & Linting\n\nEyelet provides built-in validation for Claude settings files and VS Code integration:\n\n```bash\n# Validate your Claude settings\nuvx eyelet validate settings\n\n# Validate a specific file\nuvx eyelet validate settings ~/.claude/settings.json\n```\n\n### VS Code Integration\n\nThe project includes a JSON schema for Claude settings files. VS Code users get:\n- \u2705 IntelliSense/autocomplete for hook configurations\n- \u2705 Real-time error detection\n- \u2705 Hover documentation\n\nSee [docs/vscode-json-linting.md](docs/vscode-json-linting.md) for setup instructions.\n\n## \ud83d\udd17 Connection Philosophy\n\nEyelet embraces hardware connection terminology for reliable, secure attachment:\n\n- **\"Thread through the eyelet!\"** - Launch the TUI\n- **\"Secure the connection!\"** - Deploy templates  \n- **\"Check the connection log\"** - View logs\n- **\"Scan for connection points\"** - Discover new hooks\n- **\"Hold fast!\"** - Maintain current configuration\n\n## \ud83e\uddea Testing\n\nEyelet includes comprehensive testing tools to ensure your hooks are working correctly:\n\n### Testing Hook Integration\n\n```bash\n# Run the interactive hook test\nmise run test-hooks\n\n# This will generate a unique test ID and guide you through testing all tools\n# After running the test commands, verify with:\nmise run test-hooks-verify zebra-1234-flamingo-5678\n\n# View hook statistics\nmise run hook-stats\n\n# Generate a coverage report\nmise run hook-coverage\n\n# Clean old logs (older than 7 days)\nmise run hook-clean\n```\n\n### Development Testing\n\n```bash\n# Run all tests\nmise run test\n\n# Run linting\nmise run lint\n\n# Run type checking\nmise run typecheck\n\n# Run all CI checks\nmise run ci\n```\n\n### Manual Hook Testing\n\nThe `test_all_hooks.py` script provides comprehensive hook testing:\n- Generates unique test identifiers for tracking\n- Tests all Claude Code tools (Bash, Read, Write, Edit, etc.)\n- Verifies hook logs contain expected data\n- Provides coverage reports\n\n## \ud83e\udd1d Contributing\n\nWe welcome contributions! Please open issues and pull requests on GitHub.\n\n## \ud83d\udcda Documentation\n\n- **[Quickstart Guide](docs/QUICKSTART.md)** - Get up and running quickly\n- **[Design Documents](docs/design/)** - Architecture and design decisions\n- **[Setup Guides](docs/setup/)** - GitHub Actions and deployment setup\n\n## \ud83d\udcdc License\n\nMIT License - see [LICENSE](LICENSE) for details.\n\n## \ud83d\ude4f Acknowledgments\n\nBuilt with love for the AI development community. Special thanks to the Anthropic team for Claude Code and its powerful hook system.\n\n---\n\n*\"The strongest connections are forged under pressure.\" - Connect with Eyelet and explore the possibilities of AI agent orchestration.*\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Hook orchestration system for AI agents - Thread through the eyelet! (Work in Progress)",
    "version": "0.3.0",
    "project_urls": {
        "Documentation": "https://github.com/bdmorin/eyelet#readme",
        "Homepage": "https://github.com/bdmorin/eyelet",
        "Issues": "https://github.com/bdmorin/eyelet/issues",
        "Repository": "https://github.com/bdmorin/eyelet"
    },
    "split_keywords": [
        "hooks",
        " ai",
        " automation",
        " orchestration",
        " claude-code",
        " eyelet"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "56fa64883368c66f1d1c3ceef96cce17fb0a337405c0728f97fb6ac7ecc347a3",
                "md5": "bd2d911144128d00b38265f022ac0899",
                "sha256": "551607ca869e5970f8b92964523654a952f92f7bff0bbbc49cbefe8909abf42b"
            },
            "downloads": -1,
            "filename": "eyelet-0.3.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "bd2d911144128d00b38265f022ac0899",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.11",
            "size": 79089,
            "upload_time": "2025-07-29T21:51:49",
            "upload_time_iso_8601": "2025-07-29T21:51:49.550770Z",
            "url": "https://files.pythonhosted.org/packages/56/fa/64883368c66f1d1c3ceef96cce17fb0a337405c0728f97fb6ac7ecc347a3/eyelet-0.3.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "519ac823b2d7117956749641d13fe3e439f4a76f9f00e50f12011ff36d863f4c",
                "md5": "24542577e9a26a7c1c4fbc16bddeb851",
                "sha256": "f8c702e52cd66d48021e9bc1f7a5a5c87fc448e7cb93a949a132118d3a9086f4"
            },
            "downloads": -1,
            "filename": "eyelet-0.3.0.tar.gz",
            "has_sig": false,
            "md5_digest": "24542577e9a26a7c1c4fbc16bddeb851",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.11",
            "size": 96310,
            "upload_time": "2025-07-29T21:51:50",
            "upload_time_iso_8601": "2025-07-29T21:51:50.685694Z",
            "url": "https://files.pythonhosted.org/packages/51/9a/c823b2d7117956749641d13fe3e439f4a76f9f00e50f12011ff36d863f4c/eyelet-0.3.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-29 21:51:50",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "bdmorin",
    "github_project": "eyelet#readme",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "eyelet"
}
        
Elapsed time: 0.57720s