Bito CLI (Command Line Interface) provides a command line interface to the Bito AI chat functionality. Over time, CLI will add more functions and new command options to support complex automation and workflows.
This is a very early Alpha version. We would love to get your feedback on the new features or improvements. Please write us at founders@bito.ai or support@bito.ai.
Terminal
- Bash (for Mac and Linux)
- CMD (for Windows)
-
Execute Chat: Run
bito
command on command prompt to get started. Ask anything you want help with such asawk command to print first and last column
.Note: Bito CLI supports long prompts through multiline input. To complete and submit the prompt, press
Ctrl+D
. Enter/Return key adds a new line to the input. -
Exit Bito CLI: To quit/exit from Bito CLI, type
quit
and pressCtrl+D
. -
Terminate: Press
Ctrl+C
to Bito CLI.
Check out the video below to get started with Bito CLI
BitoCLI.-.install.and.use.mp4
We recommend you use the following methods to install Bito CLI.
sudo curl https://alpha.bito.ai/downloads/cli/install.sh -fsSL | bash
(curl will always download the latest version)
Arch and Arch based distro users can install it from AUR
yay -S bito-cli
or paru -S bito-cli
Note for the Mac Users: You might face issue related to verification for which you will have to manually do the steps from here (we are working on fixing it as soon as possible).
- Install the Bito CLI through MSI using this installer.
- On Windows 11 you might get notification related to publisher verification. Click on "Show more" or "More info" and click on "Run anyway" (we are working on fixing this as soon as possbile).
- Once the installation is complete, start a new command prompt and run
bito
to get started.
sudo curl https://alpha.bito.ai/downloads/cli/uninstall.sh -fsSL | bash
(this will completely uninstall Bito CLI and all of its components)
For Windows you can uninstall Bito CLI just like you do for any other software uninstall from control panel. You can still refer the link provided here.
While it's not recommended, you can download the Bito CLI binary from our repository, and install is manually. The binary is available for Linux and Mac OS, x86 and ARM architecture.
- Download Bito CLI binary specific to your OS platform from here (Please download the latest version for all new updates).
- Start the terminal, go to the location where your downloaded the binary, move the downloaded file (in the command below use bito-* filename you have downloaded) to filename bito
mv bito-<os>-<arch> bito
- Make the file executable using following command
chmod +x ./bito
- Copy the binary to /usr/local/bin using following command
sudo cp ./bito /usr/local/bin
- Set PATH variable so that Bito CLI is always accessible.
PATH=$PATH:/usr/local/bin
- Run Bito CLI with
bito
command. If PATH variable is not set, you will need to run command with the complete or relative path to the Bito executable binary.
- For using bito CLI, always move to the directory containing bito CLI prior to running it.
- Set PATH variable so that bito CLI is always accessible.
- Follow the instructions as per this link
- Edit the "Path" variable and add new path of the location where bito CLI is installed on your machine.
-
On MAC/Linux: run
bito --help
orbito config --help
-
On Windows: run
bito --help
orbito config --help
-
run
bito -v
orbito --version
to print the version number of Bito CLI installed currently. -
run
bito –p writedocprompt.txt -f mycode.js
for non-interactive mode in Bito (where writedocprompt.txt will contain your prompt text such as "Explain the code below in brief" and mycode.js will contain the actual code on which the action is to be performed). -
run
bito –p writedocprompt.txt
to read the content at standard input in Bito (where writedocprompt.txt will contain your prompt text such as "Explain the code below in brief" and input provided will have the actual content on which the action is to be performed). -
run
cat file.txt | bito
to directly cat a file and pipe it to bito and get instant result for your query. -
run
cat inventory.sql | bito -p testdataprompt.txt > testdata.sql
to redirect your output directly to a file (where -p can be used along with cat to perform prompt related action on the given content). -
run
cat inventory.sql | bito -c runcontext.txt -p testdataprompt.txt > testdata.sql
to store context/conversation history in non-interactive mode in fileruncontext.txt
to use for next set of commands in case prior context is needed. Ifruncontext.txt
is not present it will be created. Please provide a new file or an existing context file created by bito using-c
option. With-c
option now context is supported in non-interactive mode -
run
echo "give me code for bubble sort in python" | bito
to instantly get response for your queries using Bito CLI.
-
run
bito -v
orbito --version
to print the version number of Bito CLI installed currently. -
run
bito –p writedocprompt.txt -f mycode.js
for non-interactive mode in Bito (where writedocprompt.txt will contain your prompt text such as "Explain the code below in brief" and mycode.js will contain the actual code on which the action is to be performed). -
run
bito –p writedocprompt.txt
to read the content at standard input in Bito (where writedocprompt.txt will contain your prompt text such as "Explain the code below in brief" and input provided will have the actual content on which the action is to be performed). -
run
type file.txt | bito
to take input from file in windows and pipe it to bito and get instant result for your query. -
run
type inventory.sql | bito -p testdataprompt.txt > testdata.sql
to redirect your output directly to a file (where -p can be used along with type to perform prompt related action on the given content). -
run
type inventory.sql | bito -c runcontext.txt -p testdataprompt.txt > testdata.sql
to store context/conversation history in non-interactive mode in fileruncontext.txt
to use for next set of commands in case prior context is needed. Ifruncontext.txt
is not present it will be created. Please provide a new file or an existing context file created by bito using-c
option. With-c
option now context is supported in non-interactive mode -
run
echo "give me code for bubble sort in python" | bito
to instantly get response for your queries using Bito CLI.
Use {{%input%}}
macro in the prompt file to refer to the contents of the file provided via -f option
Example: To check if a file contains JS code or not, you can create a prompt file checkifjscode.txt with following prompt:
Context is provided below within contextstart and contextend
contextstart
{{%input%}}
contextend
Check if content provided in context is JS code.
Here are two examples for you to see My Prompt in action:
- How to Create Git Commit Messages and Markdown Documentation with Ease using Bito CLI My Prompt:
- How to generate test data using Bito CLI My Prompt:
-
run
bito config -l
orbito config --list
to list all config variables and values. -
run
bito config -e
orbito config --edit
to open the config file in default editor.
bito:
access_key: ""
email: first.last@mycompany.com
preferred_ai_model: ADVANCED
settings:
auto_update: true
max_context_entries: 20
By default AI Model Type is set to ADVANCED
and it can be overridden by running bito -m <BASIC/ADVANCED>
Model type is used for AI query in the current session. Model type can be set to BASIC/ADVANCED, which is case insensitive.
Access Key can be created at Bito Web UI and used in Bito CLI.
To create an access key, do the following:
- Login into your account at: https://alpha.bito.ai
- Once logged in open: https://alpha.bito.ai/home/settings/advanced
- Click on the "Create new key" button under section "Bito Access Key" to create a new key and copy it.
- Make sure to protect your key and do not check it in, into any code to avoid accidental leakage.
- In case you think your key is compromised, you can delete the existing key and create new key anytime.
Access Key is an alternate authentication mechanism to Email & OTP based aunthentication.
Access Key can be persisted in Bito CLI by running bito config -e
Such persisted Access Key can be over-ridden by running bito -k <access-key>
or bito --key <access-key>
for the transient session.
- Unicode characters (using other languages) might not be readily supported on command prompt if you are on Windows 10 or below. You can run command
chcp 936
in cmd prior to using bito to support unicode characters in Windows 10 or below (To undo the settings done here you can follow this link). - IF you are on Windows 11 then you shouldn't encounter any such issues.
Copyright (C) 2021, Bito Inc - All Rights Reserved