@aemi-cli/aemi
v0.1.1
Published
LLM CLI routing tool with Telegram and Discord bot integration
Downloads
652
Maintainers
Readme
AEMI
Agent Mirror - AI agent routing tool with Telegram and Discord bot integration.
A CLI tool that relays AI agent responses through Telegram/Discord bots.
Origin
This project is a fork of kstost/cokacdir. It is based on the LLM CLI routing portion of the original project, with the TUI file manager removed to focus on bot relay functionality.
Features
- AI Agent Routing: Query AI agents and receive responses via
--prompt - Telegram Bot: Route AI agent through Telegram with
--routing telegram - Discord Bot: Route AI agent through Discord with
--routing discord - Multi-Bot: Run multiple Telegram bot tokens simultaneously
- Access Control:
--chat-id(Telegram) /--channel-id(Discord) required for routing
Usage
# Query Claude Code directly
aemi --prompt "explain this code"
# Start Telegram bot server with Claude (--chat-id required)
aemi --agent claude --routing telegram --token <TOKEN> --chat-id <CHAT_ID>
# Start Telegram bot server with Gemini
aemi --agent gemini --routing telegram --token <TOKEN> --chat-id <CHAT_ID>
# Start Discord bot server (--channel-id required)
aemi --agent claude --routing discord --token <TOKEN> --channel-id <CHANNEL_ID>
# Start Telegram bot server with Codex
aemi --agent codex --routing telegram --token <TOKEN> --chat-id <CHAT_ID>
# Start Discord bot server with Gemini
aemi --agent gemini --routing discord --token <TOKEN> --channel-id <CHANNEL_ID>
# Start Discord bot server with Codex
aemi --agent codex --routing discord --token <TOKEN> --channel-id <CHANNEL_ID>
# Start Telegram bot server with OpenCode
aemi --agent opencode --routing telegram --token <TOKEN> --chat-id <CHAT_ID>
# Start Discord bot server with OpenCode
aemi --agent opencode --routing discord --token <TOKEN> --channel-id <CHANNEL_ID>
# Start Telegram bot server with oh-my-pi (omp)
aemi --agent oh-my-pi --routing telegram --token <TOKEN> --chat-id <CHAT_ID>
# Start Discord bot server with oh-my-pi (omp)
aemi --agent oh-my-pi --routing discord --token <TOKEN> --channel-id <CHANNEL_ID>
# Run multiple Telegram bots simultaneously
aemi --agent claude --routing telegram --token <TOKEN1> <TOKEN2> <TOKEN3> --chat-id <CHAT_ID>Installation
Prerequisites
- Install the CLI tool for the agent you want to use (see Agent Types)
Install via npm
npm install -g @aemi-cli/aemiBuild from source
# Clone
git clone https://github.com/KyongSik-Yoon/aemi.git
cd aemi
# Build
cargo build --release
# Binary location
./target/release/aemiSee build_manual.md for detailed build instructions including cross-compilation.
Agent Types
| Agent | CLI Flag | Status | Priority |
|-------|----------|--------|----------|
| Claude Code | --agent claude | Available | - |
| Gemini CLI | --agent gemini | Available | - |
| Codex CLI | --agent codex | Available | - |
| OpenCode | --agent opencode | Available | - |
| oh-my-pi (omp) | --agent oh-my-pi | Available | - |
Prerequisites per Agent
Each agent requires its own CLI tool to be installed:
- Claude:
npm install -g @anthropic-ai/claude-code - Gemini:
npm install -g @google/gemini-cli - Codex:
npm install -g @openai/codex - OpenCode:
npm install -g opencode(or see opencode.ai for other methods) - oh-my-pi: install oh-my-pi and ensure
ompis in your PATH (omp --version)
Slash Commands
See docs/slash_commands.md for the full list of bot commands.
Debug Logging
Set AEMI_DEBUG=1 to write debug logs under ~/.aemi/debug/ (for example: oh-my-pi.log, discord.log, telegram.log).
Supported Platforms
- macOS (Apple Silicon & Intel)
- Linux (x86_64 & ARM64)
License
MIT License
Disclaimer
THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS, COPYRIGHT HOLDERS, OR CONTRIBUTORS BE LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
USE AT YOUR OWN RISK.
