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.

Don't worry if you're not familiar with Python! We've provided scripts to automate most of the process.

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)

  1. Download the script: Download setup_alara.sh
  2. 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).
  3. Make it executable: While inside the download directory, run: chmod +x setup_alara.sh
  4. Run the script: Still inside the download directory, execute it: ./setup_alara.sh

Windows (setup_alara.bat)

  1. Download the script: Download setup_alara.bat
  2. 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).
  3. 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:

  1. 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.
  2. Open Terminal/Command Prompt: Navigate to your desired project directory.
  3. Create Virtual Environment: Run python3 -m venv .venv (or python -m venv .venv / py -m venv .venv on Windows).
  4. 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)
  5. 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: