Skip to main content

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.

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

code_star_cli-0.2.4.tar.gz (9.4 kB view details)

Uploaded Source

Built Distribution

code_star_cli-0.2.4-py3-none-any.whl (15.0 kB view details)

Uploaded Python 3

File details

Details for the file code_star_cli-0.2.4.tar.gz.

File metadata

  • Download URL: code_star_cli-0.2.4.tar.gz
  • Upload date:
  • Size: 9.4 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

Hashes for code_star_cli-0.2.4.tar.gz
Algorithm Hash digest
SHA256 fd48bab0059d07bfb276b8714bba5b9c1212c3ce583cd6677ab7c815995356de
MD5 c05b89c0c9352f23eefb98bc869f594c
BLAKE2b-256 a0e5c217a69d68bdbb95d4f8dd18faa8806283cc91b4a4e0aba8462fe389cf1c

See more details on using hashes here.

File details

Details for the file code_star_cli-0.2.4-py3-none-any.whl.

File metadata

  • Download URL: code_star_cli-0.2.4-py3-none-any.whl
  • Upload date:
  • Size: 15.0 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

Hashes for code_star_cli-0.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 187d0470626d0737e88154bf0b27e6a717d973ccc1cdd0cb85e3fd6802786554
MD5 07c8341f59cf53087ed364353e454c6b
BLAKE2b-256 f5959bc4dfaec60951cff52cf0f0fef14480011526b399eb63579463aa4c102f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page