A simple framework for using Claude Code or Codex CLI as the frontend to any cloud or local LLM on Apple Silicon. Connect locally via LiteLLM + MLX or LM Studio, or remotely via Z.AI, Gemini/Google AI Studio, DeepSeek, or OpenRouter.
git clone https://github.com/PatchedReality/ai-cli-switchboard.gitThe ai-cli-switchboard is an innovative automation skill designed to serve as a simple framework for utilizing Claude Code or Codex CLI as the frontend to any cloud or local large language model (LLM) on Apple Silicon. This skill allows users to connect either locally through LiteLLM + MLX or LM Studio, or remotely via platforms like Z.AI, Gemini/Google AI Studio, DeepSeek, or OpenRouter. By providing a seamless interface, it facilitates easier interaction with various LLMs, enhancing productivity in AI-driven projects. One of the key benefits of the ai-cli-switchboard skill is its ability to streamline the process of accessing and managing LLMs. Although the specific time savings are currently unknown, users can expect to significantly reduce the complexity and time associated with switching between different LLMs. This skill is particularly beneficial for developers, product managers, and AI practitioners who are looking to optimize their workflow automation. By simplifying the connection to multiple LLMs, it allows teams to focus on developing and deploying AI solutions rather than getting bogged down by technical challenges. The ai-cli-switchboard is suited for intermediate users who have a foundational understanding of AI technologies and command-line interfaces. It requires about 30 minutes to implement, making it a practical choice for teams looking to enhance their AI capabilities without extensive setup time. This skill fits seamlessly into AI-first workflows, enabling users to quickly adapt to different AI models and leverage their functionalities effectively. Practical use cases for the ai-cli-switchboard include data analysis, natural language processing, and machine learning model testing. For instance, a developer might use this skill to quickly switch between LLMs for testing various algorithms, while a product manager could leverage it to evaluate different AI solutions for product features. By integrating this automation skill into their toolkit, teams can enhance their efficiency and responsiveness in an increasingly AI-driven landscape.
[{"step":"Install and configure the ai-cli-switchboard framework.","action":"Run `pip install ai-cli-switchboard` and follow the setup guide for your local LLM provider (LiteLLM/MLX/LM Studio) or remote endpoint (Z.AI, etc.). Use the `--model` flag to specify the target LLM.","tip":"For Apple Silicon, use `litellm --model mlx-community/[MODEL_NAME]` for optimal performance. Test connectivity with `claude --model http://localhost:4000 --test`."},{"step":"Define the task and select the integration approach.","action":"Use the prompt template to craft a task-specific query. Decide whether to use a local LLM (for speed/privacy) or remote (for broader context).","tip":"For Sortd-related tasks, prioritize remote LLMs (e.g., Z.AI) if the documentation is complex or requires up-to-date external context."},{"step":"Execute the task and capture the output.","action":"Run the command in your terminal (e.g., `claude --model zai--mistralai/mistral-7b-instruct-v0.2 \"[TASK]\"`). Save the output to a file for review.","tip":"Use `--max-tokens 4096` for detailed responses. For large documents (e.g., Sortd’s API docs), split the task into chunks and process sequentially."},{"step":"Validate and refine the output.","action":"Cross-check the LLM’s recommendations against Sortd’s official documentation or your team’s workflows. Adjust parameters (e.g., `--temperature 0.7`) for more creative or precise outputs.","tip":"For sales workflows, use Sortd’s shared inbox features as a reference. Example: `claude --model local-llm \"How would you set up a shared inbox for a sales team using Sortd?\"`"},{"step":"Automate repetitive tasks.","action":"Use the ai-cli-switchboard to create scripts for recurring tasks (e.g., weekly lead follow-up reports). Save the script as `sortd-sales-report.sh` and run it via cron.","tip":"Example script:\n```bash\n#!/bin/bash\nclaude --model zai--mistralai/mistral-7b-instruct-v0.2 \\\n \"Generate a weekly report for Sortd sales board [BOARD_ID]. Include metrics: total leads, leads closed, average response time.\"\n```"}]
No install command available. Check the GitHub repository for manual installation instructions.
git clone https://github.com/PatchedReality/ai-cli-switchboardCopy 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.
Use the ai-cli-switchboard framework to connect [LOCAL_LLM_PROVIDER: LiteLLM/MLX/LM Studio] to [TARGET_LLM: Z.AI/Gemini/DeepSeek/OpenRouter] via Claude Code or Codex CLI. Execute the following task: [TASK: e.g., 'Analyze Sortd's Gmail integration documentation for sales workflows, then draft a 3-step implementation plan for a 5-person sales team using Sortd for lead follow-ups.']. Provide a step-by-step breakdown of the commands used, the LLM responses, and the final deliverable.
### ai-cli-switchboard Execution Log **Local Setup:** 1. Activated LiteLLM server on Apple Silicon (M2 Max) via Homebrew: ```bash brew install litellm litellm --model mlx-community/Mistral-7B-Instruct-v0.2 --port 4000 ``` 2. Configured Claude Code CLI to use the local endpoint: ```bash claude --model http://localhost:4000 --max-tokens 4096 ``` **Remote LLM Integration:** - Switched to Z.AI's `zai--mistralai/mistral-7b-instruct-v0.2` for broader context handling: ```bash claude --model zai--mistralai/mistral-7b-instruct-v0.2 --max-tokens 4096 ``` **Task Execution:** **Prompt:** *Analyze Sortd's Gmail integration documentation for sales workflows, then draft a 3-step implementation plan for a 5-person sales team using Sortd for lead follow-ups.* **LLM Response (Condensed):** Sortd’s documentation highlights three core sales workflows: 1. **Lead Triage:** Automatically categorize incoming leads (e.g., "Hot", "Warm", "Cold") using Sortd’s kanban-style boards. 2. **Follow-Up Automation:** Sync Sortd tasks with Google Calendar to trigger reminder emails via Gmail’s API. 3. **Collaboration:** Assign leads to team members with @mentions in Sortd’s shared inboxes (e.g., `[email protected]`). **Implementation Plan:** 1. **Week 1:** Configure Sortd boards to mirror the sales pipeline stages (e.g., "New Lead", "Contacted", "Meeting Scheduled", "Closed Won/Lost"). Use Sortd’s templates to auto-tag emails by sender domain or keywords (e.g., "demo request"). 2. **Week 2:** Integrate Sortd with Google Calendar using Zapier (Sortd → Zapier → Google Calendar) to auto-schedule follow-up tasks. Set up Gmail filters to route high-priority leads to the "Hot" board. 3. **Week 3:** Train the team on @mentions in Sortd’s shared inboxes. Assign a "Lead Owner" for each board and use Sortd’s analytics to track response times. **Deliverable:** A Notion page with the above plan, including screenshots of Sortd’s board setup and Zapier configuration steps. **Verification:** - Tested the plan with a mock lead (email from `[email protected]`). The email auto-appeared in Sortd’s "New Lead" board and was assigned to `[email protected]` via @mention. - Confirmed Zapier sync: A calendar event appeared for the follow-up task 3 days later. **Next Steps:** - Monitor Sortd’s analytics for bottlenecks (e.g., leads stuck in "Contacted" for >3 days). - Expand to include CRM sync (e.g., HubSpot) using Sortd’s API. --- *Execution time: 12 minutes. LLM used: Z.AI Mistral 7B.*
Take a free 3-minute scan and get personalized AI skill recommendations.
Take free scan