🚀 Launch Week Day 4:Introducing the Alert Details Page: A Better Way to Explore Alerts.Learn More →
Socket
Book a DemoInstallSign in
Socket

code-star-cli

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

code-star-cli

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.

pipPyPI
Version
0.2.4
Maintainers
1

CodeStar CLI: An AI-Powered Development Tool for Enhanced Productivity

CI CD Black Ruff PyPI - Version PyPI - Python Version PyPI - Downloads PyPI - Format PyPI - Implementation PyPI - License

Overview

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.

Key Features

  • Contextual Code Completions: Receive precise and contextually relevant code suggestions, accelerating your development process with minimal errors.
  • Natural Language Understanding: Engage with CodeStar using natural language for detailed explanations, debugging tips, and guidance.
  • Multi-Language Support: Write and run code in over 100 programming languages effortlessly with CodeStar's integration.
  • Continuous Learning: CodeStar continuously learns from your usage data to provide increasingly personalized and timely insights, enhancing your coding experience.

Installation

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"
    

Usage Instructions

General Usage

code-star [OPTIONS] COMMAND [ARGS]...

Options

  • --install-completion: Install shell completion for CodeStar.
  • --show-completion: Show shell completion setup instructions.
  • --help: Display this help message and exit.

Commands

  • 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.

Command Details

code-star ai

Interact 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 chat

Initiate 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 completions

Generate 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 document

Add 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 enhance

Enhance 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 review

Perform 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 scan

Conduct 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 test

Generate 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.

Contributing

We welcome contributions to improve CodeStar CLI. Please refer to our Contributing Guide for details on how to get started.

Code of Conduct

This project adheres to the Contributor Covenant Code of Conduct. By participating, you are expected to uphold this code.

Contact

For any questions or support, please contact us at Github.

License

CodeStar CLI is distributed under the MIT License.

FAQs

Did you know?

Socket

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.

Install

Related posts