Korbit mentor CLI tool will allow you to analyze any local files.
Project description
Korbit AI Mentor
Korbit mentor CLI will allow you to analyze any local files of your computer. You must have an account on www.korbit.ai to use it.
How to
PIP
Using pip
you can install the CLI and start running analysis.
pip install korbit-mentor
Binary
Linux - MacOS
- Automatically installation
curl https://mentor-resources.korbit.ai/cli/installer.sh | bash
- Linux and Macos x86
wget https://mentor-resources.korbit.ai/cli/korbit-x86_64 -O /usr/bin/local/korbit
- MacOS arm64
wget https://mentor-resources.korbit.ai/cli/korbit-aarch64 -O /usr/bin/local/korbit
Windows
wget https://mentor-resources.korbit.ai/cli/korbit-win.exe -O korbit.exe
Usage
You can first use the following command to get an overview of what you can do with the korbit tool.
korbit --help
There are 2 steps in order to be able to scan your local files. First you will need to authenticate with your Korbit account. Second, you will need be able to specify the file or folder you want Korbit AI mentor to analyze for you.
Login
In order to use the CLI you will need to login using credentials generated on your https://mentor.korbit.ai account.
Generate keys
Go to your profile page, you will see a Secrets section. Click Create button.
Command
You need to use the command, this will propose you to input the secret id/key pair:
korbit login
Please enter your secret ID: Please enter your secret key:
Or you can directly specify the values as arguments
korbit login --secret_id=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx --secret_key=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
korbit login xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
This command will ask you to fill your secret_id and secret_key. We will see in the next section how to generate those.
If you want to learn more about the login command please user:
korbit login --help
You can also use environment variables to be logged in and run the scan command.
Doing the following will replace the need of running the korbit login
command.
export KORBIT_SECRET_ID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
export KORBIT_SECRET_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Scan
Now that you are all setup, you can start running your first scan:
korbit scan /path/to/folder ## Absolute path
korbit scan ../to/folder ## Relative path
korbit scan . ## Curent folder anlaysis
You can also see what are the available options with the scan command this way:
korbit scan --help
Output
We introduce the ability to run a scan headless, meaning that there will be no output in the terminal. But in the following default path:
# In the working directory where the korbit scan command has been executed.
cat .korbit/scan.log
If Korbit AI mentor find issues the command will exit with a specific code number (see --headless
option documentation).
korbit scan --help
This korbit scan --headless
flag option will be used mainly in CI/CD pipelines, to automatically stop it.
Along with the --headless command you can specify certain thresholds for only 2 metrics at the moment:
- confidence (scale 1-10): represents how confident Korbit AI Mentor is that a particular issue is real. A higher confidence score indicates a greater level of certainty that the identified issue is valid and requires attention.
- priority (scale 1-10): represents the level of importance or urgency assigned by Korbit AI Mentor to a particular issue. A higher priority score indicates a greater sense of urgency and the need for immediate attention to address the identified issue.
korbit scan --headless
Note: You can use the --thresholds-*
even if the scan isn't in headless mode, this will filter the issue found and display only the one that matters for you.
Progress view
After you start to run a korbit scan
command and that our system accepted the request (might take some time regarding load on our server), you will see in your terminal the progress of the scan. Each files will be updated in real time with their status.
Analysis in progress (1/1)
├── afile.js ⏳
└── afile.py ✅
Analyzing files (2)... ━━━━━━━━━━━━━━━━━━━━╺━━━━━━━━━━━━━━━━━━━ 50% -:--:--
Result
At the end when every file will be analyzed you will see in your terminal different tables containing the issues' descriptions and their placement in the given file. Along that will see the priority and confidence about that issue.
Category: Critical Errors
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━┓
┃ Error Description ┃ File Path ┃ Confidence ┃ Priority ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━┩
│ There is an error on the line X, because... │ folder/afile.js │ 10 │ 9 │
└────────────────────────────────────────────────────┴────────────────────────────┴────────────┴──────────┘
Contact
If you have any questions or need further assistance, feel free to reach out to us at support@korbit.ai.
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
Hashes for korbit_mentor-2.0.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b83486fc4efea46c832a539c6d59304055c22359ac04879723e50d14e673d964 |
|
MD5 | 3747f6313dfac29c0cfc89c3b1a3a914 |
|
BLAKE2b-256 | 3b33d2bafe1cb7500081670a913db96bbab1920a09813be86fabdaf0576d6580 |