Automated analysis with Stackspot AI offers capabilities such as code review generation, documentation creation, and much more.
Project description
StackSpot AI CLI
This CLI tool is designed to interact with StackSpot AI for code review and analysis. It is built using Python and managed with Poetry.
Table of Contents
Installation
Prerequisites
-
Python 3.8+
-
Stackspot AI Account
-
Quick command remote
pip install reviewer_stk_ai
Usage
You can use the CLI tool by running the cli.py script. The general command structure is:
reviewer_stk_ai [OPTIONS] COMMAND [ARGS]...
Command Options The CLI provides several options that can be passed globally or for specific commands:
-
--quick-command-id <string>: Remote quick command identifier on the STK AI portal (required). -
--client-id <string>: Client ID generated on the StackSpot AI platform (required). -
--client-secret <string>: Client secret generated on the StackSpot AI platform (required). -
--realm <string>: Domain where the token will be generated (default: "zup"). -
--retry-timeout <int>: Set the wait time (in seconds) between response checks (default: 10 seconds). -
--retry-max-attempts <int>: Set the number of retries to wait for the callback (default: 10). -
--host-stk-ai <string>: Host of the STK AI API (default: https://genai-code-buddy-api.stackspot.com). -
--host-token-stk-ai <string>: Host of the token API (default: https://idm.stackspot.com). -
--https-proxy <string>: Set the HTTPS proxy for requests. -
--http-proxy <string>: Set the HTTP proxy for requests. -
--report-filename <string>: Name of the report file (default: "report.txt"). -
--report-directory <string>: Directory where the report will be saved (default: "reports"). -
--ignored-directories <string>: List of directories to ignore. -
--ignored-files <string>: List of files to ignore. -
--extension <string>: File extension to be reviewed (default: ".py"). -
--directory <string>: Path to the directory where the files are located (default: "."). -
--debug/--no-debug: Enable or disable debug mode.
Commands
Command: review_changes
This command reviews changes between two branches in a Git repository. It compares the specified branches and analyzes the modified files.
Options:
--base-branch <string>: The branch that should be the base for comparison (default: "main").--compare-branch <string>: The branch to compare against the base (default: "develop").
Example:
reviewer_stk_ai review_changes --base-branch main --compare-branch feature-branch
Command: review_dir
This command reviews all files in a specified directory.
Example:
reviewer_stk_ai review_dir --directory ./src
Examples
Reviewing all files in the current directory:
reviewer_stk_ai review_dir
Comparing changes between branches and generating a report:
reviewer_stk_ai review_changes --base-branch main --compare-branch feature-branch --report-filename diff_report.txt
Ignoring specific directories and files during review:
reviewer_stk_ai review_dir --ignored-directories .git --ignored-files config.py
Configuration
You can configure environment variables to set default values for the options:
HTTPS_PROXY,HTTP_PROXY: Proxies for requests.CR_STK_AI_RETRY_TIMEOUT,CR_STK_AI_MAX_ATTEMPTS: Retry settings.CR_STK_AI_REALM,CR_STK_AI_HOST,CR_STK_AI_HOST_TOKEN: API configuration.CR_STK_AI_CLIENT_ID,CR_STK_AI_CLIENT_SECRET,CR_STK_AI_ID_QUICK_COMMAND: Authentication credentials.
License
This project is licensed under the MIT License. See the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file reviewer_stk_ai-1.1.0.tar.gz.
File metadata
- Download URL: reviewer_stk_ai-1.1.0.tar.gz
- Upload date:
- Size: 13.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.11.8 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fa1d00db2a7784a05529c3740e63305c4e8de9b0ba1dbe63c95c9e4210207a32
|
|
| MD5 |
07c61cf6d63253f7c128ea5266b12668
|
|
| BLAKE2b-256 |
622349283b8f169989c863032aac45ed00083ebdc784c74fc4387963863242d1
|
File details
Details for the file reviewer_stk_ai-1.1.0-py3-none-any.whl.
File metadata
- Download URL: reviewer_stk_ai-1.1.0-py3-none-any.whl
- Upload date:
- Size: 19.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.11.8 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
554a9cb6aaaa73d73e0851c6726b77ddacf7b18807fb65113a147eb55c11832d
|
|
| MD5 |
42d61f71124450eea03275f994881b51
|
|
| BLAKE2b-256 |
7d54aed72cbb42d575b898868fd6fc8423db3ed849157c0804c8f85e89e4889d
|