Your customizable codding assistant in your CLI
Project description
CodePilot CLI
Introduction
The CodePilot CLI is a sophisticated command-line interface designed to empower developers by streamlining and automating essential coding tasks. Leveraging state-of-the-art AI models, CodePilot offers a comprehensive suite of features aimed at enhancing code quality, generating documentation, writing tests, conducting code reviews, and identifying security vulnerabilities.
Key Features
- Streamlined Development: Automate repetitive tasks to focus on more strategic work.
- Code Quality Enhancement: Receive suggestions for code improvements and best practices.
- Documentation Generation: Quickly generate comprehensive and accurate documentation.
- Automated Testing: Save time by creating test cases with minimal effort.
- Security Scanning: Detect potential vulnerabilities in your codebase.
- Real-time Chat: Engage in real-time discussions with CodePilot for instant assistance.
Demonstration
To gain a deeper understanding of CodePilot CLI's capabilities, we invite you to watch our interactive demonstration video on YouTube.
Installation
Installing the CodePilot CLI is straightforward. Use the following pip
command to install the tool:
pip install code-pilot-cli
Environment Configuration
To authenticate and utilize the CLI effectively, set your Hugging Face token as an environment variable. You can obtain your token from Hugging Face.
Bash
export HF_TOKEN=hf_**********************************
PowerShell
$env:HF_TOKEN = "hf_**********************************"
Usage
Command Structure
code-pilot [OPTIONS] COMMAND [ARGS]...
Available Commands
ai
: Interact with CodePilot using natural language prompts.chat
: Engage in a real-time chat session with CodePilot.completions
: Generate code completions from provided snippets.document
: Automatically generate comprehensive documentation for code.enhance
: Improve code quality by aligning it with best practices.review
: Perform detailed code reviews to identify areas for enhancement.scan
: Detect security vulnerabilities within your code.test
: Automatically generate tests for your code.
Command Details
code-pilot ai
Interact with CodePilot using natural language prompts.
Usage:
code-pilot ai "Build an Expo to-do app using TypeScript and expo-router" -o response.md
Options:
-c, --code FILENAME
: Include a code file in your prompt.-o, --output FILENAME
: Save the response to a file.-m, --model TEXT
: Specify the AI model to use.-t, --max-tokens INTEGER
: Set the maximum number of tokens in the response.
code-pilot chat
Initiate a chat session with CodePilot to receive real-time assistance.
Usage:
code-pilot chat -e chat_history.json -h chat_history.json
Options:
-e, --export FILENAME
: Export chat history to a file.-h, --history FILENAME
: Import chat history from a file.-m, --model TEXT
: Specify the AI model to use.-t, --max-tokens INTEGER
: Set the maximum number of tokens in the response.
code-pilot completions
Generate code completions from code snippets.
Usage:
code-pilot completions "fn say_hello(name: String) -> String:" -l rust -o code-completions.md
Options:
-c, --code TEXT
: Provide a code snippet.-f, --file FILENAME
: Read code from a file.-l, --lang TEXT
: Specify the programming language.-o, --output FILENAME
: Save the response to a file.-m, --model TEXT
: Specify the AI model to use.-t, --max-tokens INTEGER
: Set the maximum number of tokens in the response.
code-pilot document
Generate documentation for specified code files.
Usage:
code-pilot document src/lib.rs -o code-docs.md
Options:
-o, --output FILENAME
: Save the documentation to a file.-m, --model TEXT
: Specify the AI model to use.-t, --max-tokens INTEGER
: Set the maximum number of tokens in the response.
code-pilot enhance
Improve code quality by applying best practices.
Usage:
code-pilot enhance app/models.py -m meta-llama/Llama-3.2-3B-Instruct -o enhancements.md
Options:
-o, --output FILENAME
: Save the improvements to a file.-m, --model TEXT
: Specify the AI model to use.-t, --max-tokens INTEGER
: Set the maximum number of tokens in the response.
code-pilot review
Conduct a thorough code review to identify areas for improvement.
Usage:
code-pilot review code.py -m meta-llama/Llama-3.2-3B-Instruct -o code-review.md
Options:
-o, --output FILENAME
: Save the review to a file.-m, --model TEXT
: Specify the AI model to use.-t, --max-tokens INTEGER
: Set the maximum number of tokens in the response.
code-pilot scan
Identify security vulnerabilities present in your code.
Usage:
code-pilot scan src/main.rs -m meta-llama/Llama-3.2-3B-Instruct -o code-scan.md
Options:
-o, --output FILENAME
: Save the results to a file.-m, --model TEXT
: Specify the AI model to use.-t, --max-tokens INTEGER
: Set the maximum number of tokens in the response.
code-pilot test
Automatically generate tests for your code.
Usage:
code-pilot test App.tsx -m meta-llama/Llama-3.2-3B-Instruct
Options:
-o, --output FILENAME
: Save the generated tests to a file.-m, --model TEXT
: Specify the AI model to use.-t, --max-tokens INTEGER
: Set the maximum number of tokens in the response.
Contribution Guide
We welcome contributions to the CodePilot CLI project. To get started, please refer to the Contribution Guide.
Support and Feedback
If you encounter any issues or have suggestions for improvements, please don't hesitate to reach out to us via our GitHub Issues.
License
The CodePilot CLI is distributed under the MIT License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file code_pilot_cli-0.2.1.tar.gz
.
File metadata
- Download URL: code_pilot_cli-0.2.1.tar.gz
- Upload date:
- Size: 9.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.4 CPython/3.10.12 Linux/6.5.0-1025-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5c5730f7f29b04a06ae2ea9856759e1b3169ae740c72df85c655dee29795b8c6 |
|
MD5 | 212336ae03ac75abf81b8088c33d9c51 |
|
BLAKE2b-256 | 402b114a070a42f095a9ecc73ff36219e29e9715d2f8fc9a2c9da7b8236dd00a |
File details
Details for the file code_pilot_cli-0.2.1-py3-none-any.whl
.
File metadata
- Download URL: code_pilot_cli-0.2.1-py3-none-any.whl
- Upload date:
- Size: 16.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.4 CPython/3.10.12 Linux/6.5.0-1025-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2f2cb906c63aba076c7b5be6aa2a001afb5d495bcc986160f7c793003fe8ffb9 |
|
MD5 | e87af2aac098fa26712e07f881415905 |
|
BLAKE2b-256 | 2b4bafdf2144cafd33b285462fafb6a9c9beca3cb6786f8ed65a17b19c410ec4 |