Skip to main content

Cross-AI CLI communication tool for kitty terminal

Project description

ai-comm

Cross-AI CLI communication tool for Kitty terminal. Enables AI assistants running in separate Kitty windows to communicate with each other.

Why ai-comm?

When working with multiple AI coding assistants, you may want them to collaborate—code review across models, second opinions on architecture, or delegating specialized tasks.

Why terminal text instead of MCP or black magic?

  • Stability: AI CLI tools evolve rapidly, with many still at 0.x and frequently introducing breaking changes. Terminal UI, being user-facing, remains far more stable.
  • Lightweight: MCP tools consume significant context (often tens of thousands of tokens at startup) and can cause attention dilution. ai-comm uses simple shell commands with minimal overhead.
  • No infrastructure: Each AI CLI maintains its own context. No need for external services like Redis to synchronize state across tools.
  • Composability: Shell pipelines and REPL patterns combine naturally, leveraging what CLIs already do well.

Setup

1. Install ai-comm

# From PyPI
uv tool install ai-comm

# Or from GitHub
uv tool install git+https://github.com/a322655/ai-comm.git

2. Configure Kitty

Enable remote control in ~/.config/kitty/kitty.conf:

allow_remote_control socket-only
listen_on unix:/tmp/kitty-${USER}

3. Configure Your AI

Add instructions to your AI’s project file (CLAUDE.md, AGENTS.md, GEMINI.md, etc.) or skills system. An example Claude Code skill is provided in skills/ai-comm/.

Usage

  1. Open multiple AI CLIs in separate Kitty windows:

    claude    # Window 1
    codex     # Window 2
    gemini    # Window 3
    
  2. Ask your AI to collaborate:

    “Use ai-comm to ask Codex to review src/main.py”

    The AI discovers available windows and sends the request:

    ai-comm list-ai-windows
    #   ID  CLI         TITLE                           CWD
    #   11  codex       Reviewing authentication        /home/user/project
    #   21  gemini      Analyzing database schema       /home/user/project
    
    ai-comm send "Review src/main.py for bugs" -w 11
    # Returns Codex's response
    
  3. For long responses, instruct the target AI to write to a file:

    ai-comm send "Write analysis to report_$(date +%Y%m%d_%H%M%S).md" -w 11
    

Supported CLIs

CLI Notes
Claude Code
Codex CLI
Gemini CLI
Aider Auto-prefixes /ask
Cursor Agent
OpenCode Uses export for responses

Troubleshooting

“Window not found”: Ensure the AI CLI is running in Kitty and remote control is enabled. Run ai-comm list-ai-windows to verify.

Empty responses: For long outputs, ask the AI to write to a file instead of returning directly.

“Kitty I/O timeout”: Check if Kitty is responsive; try restarting it.

Development

git clone https://github.com/a322655/ai-comm.git
cd ai-comm
uv sync

uv run ai-comm --help
uv run ruff check src/
uv run mypy src/

Adding a New CLI

  1. Add entry in src/ai_comm/registry.py
  2. Create adapter in src/ai_comm/adapters/<name>.py (class {Name}Adapter)
  3. Add detection in src/ai_comm/kitten/ai_comm_kitten.py

License

MIT

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

ai_comm-0.2.7.tar.gz (39.6 kB view details)

Uploaded Source

Built Distribution

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

ai_comm-0.2.7-py3-none-any.whl (28.7 kB view details)

Uploaded Python 3

File details

Details for the file ai_comm-0.2.7.tar.gz.

File metadata

  • Download URL: ai_comm-0.2.7.tar.gz
  • Upload date:
  • Size: 39.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.24 {"installer":{"name":"uv","version":"0.9.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for ai_comm-0.2.7.tar.gz
Algorithm Hash digest
SHA256 a824660daf1d61278219a00c859193c4ebf64aa53aa411c6ad86df18e8d3a8fe
MD5 5506df5eee295f1a944a78fbe896ea8e
BLAKE2b-256 78e6922c8642082bce8fe2090ac746d8a7594ce8ad120c4074ea28da231ec50b

See more details on using hashes here.

File details

Details for the file ai_comm-0.2.7-py3-none-any.whl.

File metadata

  • Download URL: ai_comm-0.2.7-py3-none-any.whl
  • Upload date:
  • Size: 28.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.24 {"installer":{"name":"uv","version":"0.9.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for ai_comm-0.2.7-py3-none-any.whl
Algorithm Hash digest
SHA256 44138cf9342f5d305b1ed67d13ae7a9d280a945db90e7b55e1bb9431f3a41783
MD5 b5faa65422a8534c7e738c673237e668
BLAKE2b-256 d536bb09f8d73f80c7eaabb407fb97bd2337c537d27676915fd3ba79b0a9b9e3

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