Lists available projects configured in the projects.json file
Lists files in a specified project directory
Reads the content of a specified file
Writes content to a specified file
Creates a summary of a specified file
Queries Perplexity API (requires PERPLEXITY_API_KEY)
Code Assistant is a powerful CLI tool built in Rust that helps developers with code-related tasks. It offers intelligent codebase exploration, file management capabilities, and interactive communication features. The assistant can autonomously navigate through project structures, read and modify files, and maintain an efficient working memory of the codebase. It also provides a Model Context Protocol server mode, enabling integration with MCP clients like Claude Desktop.
Code Assistant is a powerful tool that helps developers interact with their codebase more efficiently. It can autonomously explore codebases, manage files, and provide intelligent assistance for coding tasks. The tool offers both an agent mode for direct interaction and an MCP server mode that integrates with MCP clients like Claude Desktop.
To install Code Assistant, you'll need to have Rust installed on your system. Follow these steps:
Clone the repository:
git clone https://github.com/stippi/code-assistant
Navigate to the project directory:
cd code-assistant
Build the project:
cargo build --release
The executable will be available at target/release/code-assistant
To use Code Assistant in MCP server mode, you need to configure your projects. Create a file at ~/.config/code-assistant/projects.json
with the following structure:
{
"project-name": {
"path": "/absolute/path/to/project"
},
"another-project": {
"path": "/absolute/path/to/another/project"
}
}
This configuration allows the tool to access your projects without exposing absolute paths to LLM providers. You can edit this file without restarting the MCP server.
To use Code Assistant with Claude Desktop:
claude_desktop_config.json
file:{
"mcpServers": {
"code-assistant": {
"command": "/path/to/code-assistant/target/release/code-assistant",
"args": [
"server"
],
"env": {
"PERPLEXITY_API_KEY": "pplx-...",
"SHELL": "/bin/zsh"
}
}
}
}
Note: The PERPLEXITY_API_KEY
is optional and enables the perplexity_ask
tool. The SHELL
environment variable should be set to your login shell when configuring the env
section.
Code Assistant can run in two different modes:
Run Code Assistant directly from the command line:
code-assistant --task "Your task description" [OPTIONS]
Available options include:
--path <PATH>
: Path to the code directory (default: current directory)--task <TASK>
: Task to perform on the codebase--ui
: Start with GUI interface--continue-task
: Continue from previous state--verbose
: Enable verbose logging--provider <PROVIDER>
: LLM provider to use--model <MODEL>
: Model name to use--base-url <URL>
: API base URL for the LLM providerRun Code Assistant as an MCP server:
code-assistant server
This mode allows Code Assistant to be used as a plugin in MCP clients like Claude Desktop, providing tools for file operations, codebase exploration, and more.