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

code-star-cli

CI CD Black Ruff

CodeStar is an advanced coding assistant powered by StarCoder 2, a state-of-the-art Large Language Model for Code (Code LLM) trained on over 600 programming languages from a diverse set of permissively licensed data, including GitHub code, Arxiv, and Wikipedia. With a robust architecture featuring approximately 15 billion parameters and trained on over 4 trillion tokens, StarCoder 2 utilizes Grouped Query Attention and a context window of 16,384 tokens, making it specifically optimized for enhanced performance in coding tasks.

CodeStar excels in a variety of programming benchmarks, demonstrating superior capabilities compared to existing open Code LLMs and even matching or surpassing some closed models. Users can leverage CodeStar for code autocompletion, code generation, and natural language explanations of code snippets, although it is important to note that it is not an instruction model, and commands may not always yield the desired results.

CodeStar has shown remarkable proficiency in completing coding tasks, particularly on benchmarks like HumanEval, where it has achieved a state-of-the-art score for open models. It also supports multilingual programming, allowing it to perform well across various languages and datasets.

Beyond code generation, CodeStar is designed to function as a technical assistant, capable of addressing programming-related queries and providing insightful responses. This functionality is powered by a specialized prompt that enables the model to effectively assist users in their coding endeavors.

CodeStar is built on a foundation of responsible AI development, with a focus on safety and privacy. The training data has undergone rigorous cleaning to remove Personal Identifiable Information (PII), ensuring a secure user experience.

With its strong performance and versatility, CodeStar is poised to be an invaluable tool for developers, empowering them to enhance their coding efficiency and creativity.

Features

  • AI-Powered Code Completions: Context-aware code suggestions to help you write code faster and with fewer errors.
  • Natural Language Processing: Interact with the assistant using natural language queries for explanations, debugging help, and more.
  • Multi-Language Support: Work seamlessly across various programming languages.
  • Seamless Integration: Easily integrates into your existing development environment.
  • Learning and Adaptation: Continuously improves suggestions based on user interactions.

Join us in revolutionizing the coding experience!

Getting Started

To begin, install the package:

pip install code-star-cli

Export your HF_TOKEN as an environment variable, you can get your token from HuggingFace:

Bash:

export HF_TOKEN=hf_**********************************

Powershell:

$env:HF_TOKEN = "hf_**********************************"

You are now ready to utilize the application.

Usage Instructions

Assistance

To obtain help, please execute the following command:

code-star --help

Command Generation

You can generate shell commands using natural language as follows:

code-star ai 'bash list all processes that use more than 10% of memory'

Interactive Chat

Engage in a conversation with CodeStar using the following command:

code-star chat --

To export your chat history, use:

code-star chat -e chat-history.json

To import a previous chat history, execute:

code-star chat -h chat-history.json

If you wish to import chat history and subsequently export it after your chat session, utilize:

code-star chat -h chat-history.json -e chat-history.json

Code Completions

Retrieve code completions from CodeStar with the following command:

code-star completions 'fn read_file(path: PathBuf)'

Code Enhancements

Utilize CodeStar to apply best practices for improving code quality as shown below:

code-star enhance app.py

Code Scanning

Conduct code scanning with CodeStar by executing:

code-star scan hello.py

License

Licensed under 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.0.tar.gz (8.2 kB view details)

Uploaded Source

Built Distribution

code_star_cli-0.2.0-py3-none-any.whl (10.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: code_star_cli-0.2.0.tar.gz
  • Upload date:
  • Size: 8.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.10.12 Linux/6.8.0-1014-azure

File hashes

Hashes for code_star_cli-0.2.0.tar.gz
Algorithm Hash digest
SHA256 8fb6a29f88a111c02d8a095bf3a6d0f94e9417c5ec7e4563540bc60dd50239dd
MD5 666da9653e29f76d5e5b875f32c887bc
BLAKE2b-256 940571eaf5710a5632cde3dc022f231f322049a53015c26ae390176437a33b42

See more details on using hashes here.

File details

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

File metadata

  • Download URL: code_star_cli-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 10.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.10.12 Linux/6.8.0-1014-azure

File hashes

Hashes for code_star_cli-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fb0e1a2d4a6d2eea5ecc4c746a29b83cf0954afb18a24da032c5017d5b67547e
MD5 cab06182967b9dd71c85b044d7bda537
BLAKE2b-256 2fa5c428238c04a6121f0127be2a4222afe6a0db40af52bd643cfd11696f2067

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