
Product
Introducing Immutable Scans
Scan results now load faster and remain consistent over time, with stable URLs and on-demand rescans for fresh security data.
code-star-cli
Advanced tools
CodeStar is an advanced AI-powered coding assistant designed to enhance developer productivity by providing intelligent code suggestions and natural language interactions. Built on Hugging Face's StarCoder 2 (15B) and StarChat 2 15B.
Welcome to the CodeStar CLI, a cutting-edge AI-powered development tool designed to elevate your coding efficiency and productivity. By leveraging the capabilities of StarCoder 2, a sophisticated Large Language Model (LLM) tailored for coding tasks, CodeStar offers AI-driven code completions, natural language interaction, extensive multi-language support, and seamless integration into your development workflow.
CodeStar CLI can be easily installed using pip:
pip install code-star-cli
After installation, set your HF_TOKEN as an environment variable. You can obtain your token from HuggingFace's Settings page:
Shell:
export HF_TOKEN=hf_your_token_here
PowerShell:
$env:HF_TOKEN = "hf_your_token_here"
code-star [OPTIONS] COMMAND [ARGS]...
--install-completion: Install shell completion for CodeStar.--show-completion: Show shell completion setup instructions.--help: Display this help message and exit.ai: Interact with CodeStar using natural language.chat: Initiate a chat session with CodeStar.completions: Generate code completions from snippets.document: Add comprehensive documentation to provided code.enhance: Improve code quality according to best practices.review: Conduct detailed code reviews to identify areas for improvement.scan: Analyze code for security vulnerabilities.test: Generate tests for the provided code.code-star aiInteract with CodeStar using natural language prompts.
Usage:
code-star ai [OPTIONS] PROMPT
Options:
PROMPT: Required natural language prompt.-c, --code FILENAME: Include a specific code file in the prompt.-o, --output FILENAME: Specify an output file to write the response.-t, --max-tokens INTEGER: Limit the maximum tokens in the response. Default is 2048.--help: Display help message.code-star chatInitiate a chat session with CodeStar, with options to import and export chat history.
Usage:
code-star chat [OPTIONS]
Options:
-e, --export FILENAME: Export chat history to a file.-h, --history FILENAME: Import previous chat history from a file.-t, --max-tokens INTEGER: Set the maximum tokens in the response. Default is 2048.--help: Display help message.code-star completionsGenerate code completions based on the provided code snippet.
Usage:
code-star completions [OPTIONS] CODE
Options:
CODE: Required code snippet to complete.-l, --lang TEXT: Specify the language of the code snippet.-o, --output FILENAME: Output the response to a file.-t, --max-tokens INTEGER: Set the maximum tokens in the response. Default is 128.--help: Display help message.code-star documentAdd comprehensive documentation to the provided code.
Usage:
code-star document [OPTIONS] CODE
Options:
CODE: Required file containing code to document.-o, --output FILENAME: Output the response to a file.-t, --max-tokens INTEGER: Set the maximum tokens in the response. Default is 2048.--help: Display help message.code-star enhanceEnhance code quality using best practices suggested by CodeStar.
Usage:
code-star enhance [OPTIONS] CODE
Options:
CODE: Required file containing code to enhance.-o, --output FILENAME: Output the response to a file.-t, --max-tokens INTEGER: Set the maximum tokens in the response. Default is 2048.--help: Display help message.code-star reviewPerform a detailed code review to analyze quality and adhere to best practices.
Usage:
code-star review [OPTIONS] CODE
Options:
CODE: Required file containing code to review.-o, --output FILENAME: Output the response to a file.-t, --max-tokens INTEGER: Set the maximum tokens in the response. Default is 2048.--help: Display help message.code-star scanConduct a security scan on the provided code.
Usage:
code-star scan [OPTIONS] CODE
Options:
CODE: Required file containing code to scan.-o, --output FILENAME: Output the response to a file.-t, --max-tokens INTEGER: Set the maximum tokens in the response. Default is 2048.--help: Display help message.code-star testGenerate tests for the provided code.
Usage:
code-star test [OPTIONS] CODE
Options:
CODE: Required file containing code to generate tests for.-o, --output FILENAME: Output the response to a file.-t, --max-tokens INTEGER: Set the maximum tokens in the response. Default is 2048.--help: Display help message.We welcome contributions to improve CodeStar CLI. Please refer to our Contributing Guide for details on how to get started.
This project adheres to the Contributor Covenant Code of Conduct. By participating, you are expected to uphold this code.
For any questions or support, please contact us at Github.
CodeStar CLI is distributed under the MIT License.
FAQs
CodeStar is an advanced AI-powered coding assistant designed to enhance developer productivity by providing intelligent code suggestions and natural language interactions. Built on Hugging Face's StarCoder 2 (15B) and StarChat 2 15B.
We found that code-star-cli demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Scan results now load faster and remain consistent over time, with stable URLs and on-demand rescans for fresh security data.

Product
Socket's new Alert Details page is designed to surface more context, with a clearer layout, reachability dependency chains, and structured review.

Product
Campaign-level threat intelligence in Socket now shows when active supply chain attacks affect your repositories and packages.