Environment Setup for Alara
To use Alara effectively with your AI assistant (like Cursor or Claude) via its command-line tools or Python library, you need a Python environment set up with the necessary dependencies. This guide provides scripts and manual steps to get you ready.
Why is this needed?
Alara's tools rely on Python 3 and specific libraries to:
- Securely communicate with exchange APIs.
- Process and analyze trading data.
- Interact with your AI assistant's environment.
Setting up a dedicated environment ensures that Alara's dependencies don't conflict with other projects on your system.
Automated Setup (Recommended)
We provide scripts to simplify the setup on macOS, Linux, and Windows.
macOS / Linux (setup_alara.sh
)
- Download the script: Download setup_alara.sh
- Navigate to Download Directory: Open your terminal and use the
cd
command to go into the directory where you downloaded the file (e.g.,cd ~/Downloads
). - Make it executable: While inside the download directory, run:
chmod +x setup_alara.sh
- Run the script: Still inside the download directory, execute it:
./setup_alara.sh
Windows (setup_alara.bat
)
- Download the script: Download setup_alara.bat
- Navigate to Download Directory: Open Command Prompt or PowerShell and use the
cd
command to go into the directory where you downloaded the file (e.g.,cd Downloads
). - Run the script: While inside the download directory, execute it:
setup_alara.bat
Manual Setup
If you prefer manual setup or the scripts don't work:
- Install Python 3: If you don't have it, download and install Python 3 (version 3.8 or higher recommended) from python.org. Ensure it's added to your system's PATH during installation.
- Open Terminal/Command Prompt: Navigate to your desired project directory.
- Create Virtual Environment: Run
python3 -m venv .venv
(orpython -m venv .venv
/py -m venv .venv
on Windows). - Activate Environment:
- macOS/Linux:
source .venv/bin/activate
- Windows (cmd):
.venv\\Scripts\\activate.bat
- Windows (PowerShell):
.venv\\Scripts\\Activate.ps1
(You might need to adjust execution policy:Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
)
- macOS/Linux:
- Install Dependencies: Run
pip install alara-client requests pyjwt cryptography python-dotenv
(replace with actual package names).
Verification
After setup (automated or manual), with the virtual environment activated (you should see (.venv)
at the start of your terminal prompt), run:
alara-client --version
If the setup was successful, you should see the installed version number of the Alara client.
Next Steps
With your environment ready, you can now proceed to: