Skip to main content

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.

Metadata

Release files for code-star-cli 0.2.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for code-star-cli 0.2.4
File Size Uploaded
code_star_cli-0.2.4.tar.gz 9.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for code-star-cli 0.2.4
File Interpreter ABI Platform
code_star_cli-0.2.4-py3-none-any.whl Python 3 none any Details

Total release size: 24.4 kB

Release files / code_star_cli-0.2.4.tar.gz

Download URL code_star_cli-0.2.4.tar.gz
Size 9.4 kB
Tags Source
SHA-256 checksum
How to use checksums
fd48bab0059d07bfb276b8714bba5b9c1212c3ce583cd6677ab7c815995356de
BLAKE2b-256 checksum
How to use checksums
a0e5c217a69d68bdbb95d4f8dd18faa8806283cc91b4a4e0aba8462fe389cf1c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.4 CPython/3.10.12 Linux/6.5.0-1025-azure

Release files / code_star_cli-0.2.4-py3-none-any.whl

Download URL code_star_cli-0.2.4-py3-none-any.whl
Size 15.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
187d0470626d0737e88154bf0b27e6a717d973ccc1cdd0cb85e3fd6802786554
BLAKE2b-256 checksum
How to use checksums
f5959bc4dfaec60951cff52cf0f0fef14480011526b399eb63579463aa4c102f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.4 CPython/3.10.12 Linux/6.5.0-1025-azure

Release history Release notifications | RSS feed

This release

0.2.4 This release

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page