General Introduction
Sidekick CLI is an open source command line tool designed to streamline the project development and deployment process for developers with AI assistance. It is supported by Claude Code, Copilot and Cursor The Sidekick CLI is inspired by the Sidekick Language Model, which provides similar functionality but allows users to freely choose a Large Language Model (LLM) provider to avoid vendor lock-in.The Sidekick CLI has been designed with a "CLI-first" design and supports Model Context Protocol (MCP) servers, which extends the capabilities of AI interactions. Sidekick CLI is a "CLI-first" design that supports Model Context Protocol (MCP) servers, extending AI interaction capabilities. Sidekick CLI is designed to be "CLI-first" and supports Model Context Protocol (MCP) servers to extend AI interaction capabilities. It is suitable for independent developers or small teams to quickly configure a project, deploy to a VPS, and provide code generation and debugging support through AI. The project is currently in Beta, hosted on GitHub, maintained by developer Gavin Vickery (geekforbrains), and licensed under the MIT license, and community contributions and feedback are welcome.
Function List
- AI-assisted development: Generate code, debug issues, or query documentation with natural language hints and support for multiple LLM providers.
- Flexible model switching: Seamlessly switch between different AI models in the same session, adapting to the needs of different tasks.
- MCP Server Support: Connect to external tools and data sources to enhance AI capabilities, such as GitHub code retrieval.
- Project guidance document: By
SIDEKICK.md
Customize the project's technology stack and development preferences. - VPS One Click Deployment: Automatically configure your VPS environment, install Docker and Traefik, and support HTTPS domain names.
- Undo: Use
/undo
Quickly undo incorrect changes caused by AI. - Cost and Token Tracking: Monitor LLM usage costs and token consumption and set budget limits.
- telemetry control: By
--no-telemetry
Disable Sentry bug tracking and usage analysis. - Command Acknowledgement Control: Support
/yolo
Mode Skip Confirmation, or press Session Adjustment to confirm the setting.
Using Help
Installation process
The Sidekick CLI is easy to install, and supports the use of the pip
or source code installation. Below are the detailed steps:
- Checking system requirements
Ensure that Python 3.8+ and thepip
Windows users are advised to install Git Bash or WSL for a better terminal experience. macOS and Linux users require no additional configuration. - Installation via pip
Run the following command to install the Sidekick CLI:pip install sidekick-cli
After the installation is complete, check the version:
sidekick --version
- Installation from source(for developers)
Clone a GitHub repository:git clone https://github.com/geekforbrains/sidekick-cli.git cd sidekick-cli
Install the dependencies:
pip install .
If development mode is required (code changes take effect in real time), run:
pip install -e .
- initial configuration
Run the Sidekick CLI for the first time:sidekick
The system prompts to configure the LLM provider (e.g., OpenAI, Anthropic). Configuration information is stored in the
~/.config/sidekick.json
. Example Configuration:{ "llm_providers": { "openai": { "api_key": "<你的API密钥>", "model": "gpt-4" } }, "mcpServers": { "fetch": { "command": "uvx", "args": ["mcp-server-fetch"] } } }
You can manually edit the file to add more LLM providers or MCP Server.
- Verify Installation
Run the following command to confirm that the Sidekick CLI is working properly:sidekick --version
If the version number is returned (e.g.
0.1.0
), the installation was successful.
Function Operation Guide
1. AI-assisted development
The core function of the Sidekick CLI is AI-assisted development. Run the following command to generate code:
sidekick generate --prompt "编写一个 Flask REST API"
The AI generates the code when prompted and saves it to a specified file. You can also debug the code:
sidekick debug --file app.py
This command analyzes the code, points out errors and suggests fixes. If AI modifications cause problems, you can use the undo function:
sidekick /undo
Undo restores the most recent changes and is good for quick bug fixes.
2. Flexible model switching
The Sidekick CLI allows switching AI models within a session. View available models:
sidekick /model
Example output:
0: gpt-4 (OpenAI)
1: claude-3 (Anthropic)
Switch to a specific model:
sidekick /model 0
This function is suitable for selecting a more appropriate model based on the task requirements.
3. MCP server support
The MCP server extends the capabilities of the Sidekick CLI. For example, configure the GitHub MCP server to retrieve code:
{
"mcpServers": {
"github": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "<你的GitHub令牌>"
}
}
}
}
After saving, run the following command to test the MCP function:
sidekick fetch --repo <GitHub仓库地址>
The MCP server gives AI direct access to external data sources, enhancing code generation and analysis.
4. Project guidance document
The Sidekick CLI supports the creation of the SIDEKICK.md
file that defines the project's technology stack and development preferences. Example SIDEKICK.md
::
# Sidekick Guide
- Tech Stack: Python, Flask, PostgreSQL
- Coding Style: PEP 8
- Project Structure: MVC
- Preferred LLM: gpt-4
Once created, the Sidekick CLI adjusts the AI behavior based on this file. Run the following command to apply the guide:
sidekick init
5. VPS one-click deployment
Sidekick CLI simplifies VPS deployment for Ubuntu 20.04+ systems. Run the following command:
sidekick deploy --vps <VPS_IP地址>
The Sidekick CLI will automatically:
- Configure SSH and user permissions.
- Install Docker and Traefik.
- Set HTTPS (used by default)
sslip.io
(free domain name).
Check deployment status:
sidekick status
Update the application:
sidekick deploy --update
This feature supports zero downtime deployment and is suitable for fast go-live projects.
6. Cost and token tracking
The Sidekick CLI provides LLM usage monitoring. View current consumption:
sidekick cost
Output includes token counts and cost estimates. Set the budget:
sidekick cost --set-budget 20.0
The Sidekick CLI warns when costs are close to budget.
7. Telemetric control
The Sidekick CLI enables Sentry telemetry by default to collect error and usage data. Disable telemetry:
sidekick --no-telemetry
This command ensures that privacy-sensitive users can completely disable data collection.
8. Command Acknowledgement Control
To speed up the operation, enable the "yolo" mode to skip the confirmation:
sidekick /yolo
Restore confirmation:
sidekick /yolo off
You can also set the default behavior via a configuration file:
{
"skip_confirm": true
}
Common commands
/help
: Displays all commands./clear
: Clears the message history./compact
: Summarizes the message history and clears old records./dump
: Displays the current message history (for debugging).exit
: Exit the Sidekick CLI.
caveat
- API Key Security: To ensure that
~/.config/sidekick.json
in the key is not compromised. - VPS Requirements: Deployment requires open SSH ports (default 22) and public IPs.
- Beta Phase Limit: There may be bugs in the current version, so keep an eye on the GitHub repository for updates.
application scenario
- Rapid Prototyping
Developers need to prototype web apps quickly. the Sidekick CLI generates code and automates configuration through AI, taking the process from idea to deployment in a matter of days. - Low Cost VPS Deployment
Small teams looking to run applications on low-budget VPS. the Sidekick CLI provides one-click deployment and cost tracking to ensure efficient utilization of resources. - AI-driven learning
Beginners learn new frameworks with the AI features of the Sidekick CLI. Enter natural language prompts to generate sample code and debugging features to understand the logic.
QA
- Does the Sidekick CLI need to be always connected?
Yes, the AI functionality relies on the LLM provider's API and requires a network connection.The MCP server and VPS deployments also require a network connection. - How do I disable telemetry?
(of a computer) runsidekick --no-telemetry
or insidekick.json
set up in"telemetry": false
The - Which LLM providers are supported?
Currently supports OpenAI, Anthropic, etc., and will be added in the future. Ollama and other local models (see Roadmap). - How do I contribute code?
Clone the repository and install development dependencies (make install
), submit the Pull Request to GitHub.