|
| 1 | +# Installation Guide for CAI Pro v0.6 |
| 2 | + |
| 3 | +← [Back to Installation Guide](../README.md#nut_and_bolt-install) |
| 4 | + |
| 5 | +## Welcome to CAI Pro! |
| 6 | + |
| 7 | +If your subscription is active, you have received a confirmation email. Then, get and save your API-Key and please follow these instructions to install CAI Pro on your system. |
| 8 | + |
| 9 | +### Important |
| 10 | + |
| 11 | +- Your API Key is personal and non-transferable. |
| 12 | +- It will be permanently linked to the first system where it is used. |
| 13 | + |
| 14 | +## System Requirements |
| 15 | + |
| 16 | +- OS: Ubuntu 24.04 (x86_64, 64-bit) |
| 17 | +- Language: English |
| 18 | +- Python: 3.8+ (installed automatically) |
| 19 | +- Memory: Minimum 4 GB RAM |
| 20 | + |
| 21 | +## Installation Steps |
| 22 | + |
| 23 | +- Create a folder in your preferred directory. |
| 24 | +- Open a terminal in that directory. |
| 25 | +- Create a virtual environment, activate it, and install CAI Pro with the following commands: |
| 26 | + - `sudo apt update` |
| 27 | + - `python3.12 -m venv cai_env` |
| 28 | + - `source cai_env/bin/activate` |
| 29 | + - `pip install --index-url https://packages.aliasrobotics.com:664/<api-key>/ cai-framework` |
| 30 | +- Important note: |
| 31 | + - The last command requires customization. Replace `<api-key>` with the API Key provided in the confirmation email for your subscription, for example: `sk--xxxxxxxxxxxxxxxx` |
| 32 | +- Once the installation is complete, run: |
| 33 | + - `cai –tui` |
| 34 | + |
| 35 | +## Accessing CAI |
| 36 | + |
| 37 | +- Command Line → run: `cai –tui` |
| 38 | + |
| 39 | +## Support |
| 40 | + |
| 41 | +If you encounter any issues, contact us at: [email protected] |
| 42 | + |
| 43 | +Although we do not provide official support for other operating systems, we offer the recommended installation steps below. |
| 44 | + |
| 45 | +## Installation Steps for Other OS |
| 46 | + |
| 47 | +### OS X |
| 48 | + |
| 49 | +```bash |
| 50 | +# Install homebrew |
| 51 | +/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" |
| 52 | + |
| 53 | +# Install dependencies |
| 54 | +brew update && \ |
| 55 | +brew install git [email protected] |
| 56 | + |
| 57 | +# Create virtual environment |
| 58 | +python3.12 -m venv cai_env |
| 59 | + |
| 60 | +# Install the package from the local directory |
| 61 | +source cai_env/bin/activate && pip install cai-framework |
| 62 | + |
| 63 | +# Generate a .env file and set up with defaults |
| 64 | +echo -e 'OPENAI_API_KEY="sk-1234"\nANTHROPIC_API_KEY=""\nOLLAMA=""\nPROMPT_TOOLKIT_NO_CPR=1\nCAI_STREAM=false' > .env |
| 65 | + |
| 66 | +# Launch CAI |
| 67 | +cai # first launch it can take up to 30 seconds |
| 68 | +``` |
| 69 | + |
| 70 | +### Windows WSL |
| 71 | + |
| 72 | +Go to the Microsoft page: https://learn.microsoft.com/en-us/windows/wsl/install |
| 73 | + |
| 74 | +Here you will find all the instructions to install WSL. From Powershell write: `wsl --install` |
| 75 | + |
| 76 | +```bash |
| 77 | +sudo apt-get update && \ |
| 78 | +sudo apt-get install -y git python3-pip python3-venv |
| 79 | + |
| 80 | +# Create the virtual environment |
| 81 | +python3 -m venv cai_env |
| 82 | + |
| 83 | +# Install the package from the local directory |
| 84 | +source cai_env/bin/activate && pip install cai-framework |
| 85 | + |
| 86 | +# Generate a .env file and set up with defaults |
| 87 | +echo -e 'OPENAI_API_KEY="sk-1234"\nANTHROPIC_API_KEY=""\nOLLAMA=""\nPROMPT_TOOLKIT_NO_CPR=1\nCAI_STREAM=false' > .env |
| 88 | + |
| 89 | +# Launch CAI |
| 90 | +cai # first launch it can take up to 30 seconds |
| 91 | +``` |
| 92 | + |
| 93 | +### Android |
| 94 | + |
| 95 | +We recommend having at least 8 GB of RAM: |
| 96 | + |
| 97 | +1. First of all, install userland: https://play.google.com/store/apps/details?id=tech.ula&hl=es |
| 98 | +2. Install Kali minimal in basic options (for free). [Or any other kali option if preferred] |
| 99 | +3. Update apt keys like in this example: https://superuser.com/questions/1644520/apt-get-update-issue-in-kali, inside UserLand's Kali terminal execute: |
| 100 | + |
| 101 | +```bash |
| 102 | +# Get new apt keys |
| 103 | +wget http://http.kali.org/kali/pool/main/k/kali-archive-keyring/kali-archive-keyring_2024.1_all.deb |
| 104 | + |
| 105 | +# Install new apt keys |
| 106 | +sudo dpkg -i kali-archive-keyring_2024.1_all.deb && rm kali-archive-keyring_2024.1_all.deb |
| 107 | + |
| 108 | +# Update APT repository |
| 109 | +sudo apt-get update |
| 110 | + |
| 111 | +# CAI requires python 3.12, lets install it (CAI for kali in Android) |
| 112 | +sudo apt-get update && sudo apt-get install -y git python3-pip build-essential zlib1g-dev \ |
| 113 | +libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libreadline-dev libffi-dev libsqlite3-dev \ |
| 114 | +wget libbz2-dev pkg-config |
| 115 | + |
| 116 | +wget https://www.python.org/ftp/python/3.12.4/Python-3.12.4.tar.xz |
| 117 | +tar xf Python-3.12.4.tar.xz |
| 118 | +cd Python-3.12.4 |
| 119 | +./configure --enable-optimizations |
| 120 | +sudo make altinstall # This command takes long to execute |
| 121 | + |
| 122 | +# Clone CAI's source code |
| 123 | +git clone https://github.com/aliasrobotics/cai && cd cai |
| 124 | + |
| 125 | +# Create virtual environment |
| 126 | +python3.12 -m venv cai_env |
| 127 | + |
| 128 | +# Install the package from the local directory |
| 129 | +source cai_env/bin/activate && pip3 install -e . |
| 130 | + |
| 131 | +# Generate a .env file and set up |
| 132 | +cp .env.example .env # edit here your keys/models |
| 133 | + |
| 134 | +# Launch CAI |
| 135 | +cai |
| 136 | +``` |
| 137 | + |
| 138 | +--- |
| 139 | + |
| 140 | +**[⬅️ Return to Main Installation Guide](../README.md#nut_and_bolt-install)** |
| 141 | + |
0 commit comments