LunaRoute is a high-performance local proxy for AI coding assistants like Claude Code, OpenAI Codex CLI, and OpenCode. Get complete visibility into every LLM interaction with zero-overhead passthrough, comprehensive session recording, and powerful debugging capabilities.
git clone https://github.com/erans/lunaroute.gitLunaRoute is a high-performance local proxy for AI coding assistants like Claude Code, OpenAI Codex CLI, and OpenCode. Get complete visibility into every LLM interaction with zero-overhead passthrough, comprehensive session recording, and powerful debugging capabilities.
[{"step":"Install LunaRoute using the appropriate package manager for your system (e.g., `brew install lunaroute` for macOS or `pip install lunaroute` for Python environments).","tip":"Ensure you have Python 3.8+ installed if using the Python package. Verify installation with `lunaroute --version`."},{"step":"Configure your AI tool to route traffic through LunaRoute by setting the proxy environment variable. For OpenAI Codex CLI, use `export OPENAI_API_BASE=http://localhost:8080/v1`. For Claude Code, modify the config.json to include the proxy URL.","tip":"Use `lunaroute --init` to generate a default configuration file if you're unsure about the setup. The tool will guide you through the proxy port and logging directory selection."},{"step":"Start capturing sessions by running your AI tool as usual. LunaRoute will automatically intercept and log all LLM interactions to the specified directory (default: ~/.lunaroute/logs).","tip":"Use `lunaroute --watch` to monitor live session data in your terminal. This helps verify that the proxy is working before proceeding with analysis."},{"step":"Analyze the intercepted data using LunaRoute's built-in tools or export the logs to your preferred analysis platform. Use commands like `lunaroute --analyze --metric token-usage` or `lunaroute --export --format json` for further processing.","tip":"For large projects, filter sessions by date range or specific endpoints using `lunaroute --filter --since 2024-05-01 --endpoint /api/v1/data`. This reduces noise in your analysis."},{"step":"Implement optimizations based on the insights and monitor the impact using LunaRoute's continuous logging. Re-run analyses periodically to track improvements.","tip":"Set up automated alerts for critical metrics (e.g., latency >3s or token usage >2,000) using `lunaroute --alert --threshold latency:3s`. This ensures you catch regressions early."}]
No install command available. Check the GitHub repository for manual installation instructions.
git clone https://github.com/erans/lunarouteCopy the install command above and run it in your terminal.
Launch Claude Code, Cursor, or your preferred AI coding agent.
Use the prompt template or examples below to test the skill.
Adapt the skill to your specific use case and workflow.
Set up LunaRoute as a local proxy for [AI_TOOL_NAME] to intercept and log all LLM interactions for [PROJECT_NAME]. Configure the proxy to record sessions with [SESSION_FILTER_CRITERIA] and enable debugging mode. After setup, analyze the intercepted interactions to identify patterns in [SPECIFIC_METRIC] such as token usage, response latency, or error rates. Provide a summary report with actionable insights for optimizing [TARGET_AREA].
LunaRoute has been successfully configured as a local proxy for OpenAI Codex CLI, intercepting all interactions for the 'AcmeCorp-WebApp' project. Over the past 24 hours, 1,247 sessions were recorded with the following key metrics: **Token Usage Analysis:** - Average input tokens per session: 1,842 (target: <2,000) - Average output tokens per session: 421 (target: <500) - Highest token-consuming sessions identified in the 'authentication' and 'database' modules **Performance Insights:** - Median response latency: 1.8s (target: <2s) - 92% of sessions completed within 3s - Top 3 slowest endpoints: /api/v2/user-profile (avg 2.4s), /api/v1/data-sync (avg 2.1s) **Debugging Highlights:** - 47 sessions flagged for potential infinite loops in the 'recursive-search' function - 12 sessions terminated due to timeout errors (>10s) - Memory leaks detected in 3 sessions interacting with the 'image-processing' module **Actionable Recommendations:** 1. Optimize the 'authentication' module to reduce token usage by 15% through caching frequent queries 2. Implement a circuit breaker pattern for /api/v1/data-sync to prevent cascading failures 3. Add input validation to prevent infinite loops in recursive functions 4. Schedule memory profiling for the image-processing module during peak hours The full session logs are available in /var/log/lunaroute/acmecorp-webapp/2024-05-15.json for deeper analysis.
We create engaging workshops for companies and private events centred around plants, flowers and all things botanical.
AI assistant built for thoughtful, nuanced conversation
Advanced foundation models via API and ChatGPT
IronCalc is a spreadsheet engine and ecosystem
Enterprise workflow automation and service management platform
Automate your spreadsheet tasks with AI power
Take a free 3-minute scan and get personalized AI skill recommendations.
Take free scan