CLIPlanned

CLI Installation

Install the OptixLog CLI to start auto-instrumenting your Python code

CLI Installation

Important: This documentation describes the intended behavior of the CLI. However, the CLI is currently not functional and is under active development. Please use the SDK directly for now.

Install the OptixLog CLI to start auto-instrumenting your Python code.

Prerequisites

  • Node.js 18+ (for development builds)
  • npm or yarn package manager
  • Python 3.8+ (for running instrumented code)

Linux

# Download binary
wget https://github.com/yourusername/optixlog-cli/releases/latest/download/optixlog-linux-x64

# Make executable
chmod +x optixlog-linux-x64

# Move to PATH
sudo mv optixlog-linux-x64 /usr/local/bin/optixlog

# Verify
optixlog --version

macOS

# Download binary
curl -L https://github.com/yourusername/optixlog-cli/releases/latest/download/optixlog-macos-x64 -o optixlog

# Make executable
chmod +x optixlog

# Move to PATH
sudo mv optixlog /usr/local/bin/

# Verify
optixlog --version

Windows

# Download binary
Invoke-WebRequest -Uri https://github.com/yourusername/optixlog-cli/releases/latest/download/optixlog-windows-x64.exe -OutFile optixlog.exe

# Add to PATH (or move to a directory in PATH)
# Then verify
optixlog --version

Development Installation

For development or if binaries aren't available:

# Clone repository
git clone https://github.com/yourusername/coupler.git
cd coupler/optixlog-cli

# Install dependencies
npm install

# Build
npm run build

# Link globally (makes 'optixlog' command available)
npm link

Verification

Check that the CLI is installed correctly:

optixlog --version

Expected output:

0.2.0

Test help command:

optixlog --help

PATH Configuration

If the optixlog command is not found:

Linux/macOS

  1. Find installation location:

    which optixlog
    # or
    npm list -g optixlog-cli
  2. Add to PATH (if needed):

    # Add to ~/.bashrc or ~/.zshrc
    export PATH="$PATH:/path/to/optixlog"
  3. Reload shell:

    source ~/.bashrc  # or source ~/.zshrc

Windows

  1. Find installation location:

    where.exe optixlog
  2. Add to PATH:

    • Open System Properties → Environment Variables
    • Add the directory containing optixlog.exe to PATH
    • Restart terminal

SDK Integration

The CLI automatically manages the Python SDK:

# Check if SDK is installed
optixlog check-sdk

# Install SDK if missing
optixlog install-sdk

The CLI will:

  • Detect if SDK is installed
  • Offer to install it automatically
  • Use local SDK path for development
  • Fall back to PyPI for production

Troubleshooting

Command Not Found

Issue: optixlog: command not found

Solutions:

  1. Verify installation:

    npm list -g optixlog-cli
  2. Re-link:

    cd /path/to/optixlog-cli
    npm link
  3. Check PATH:

    echo $PATH  # Linux/macOS
    echo %PATH%  # Windows

Permission Denied

Issue: Permission denied when running binary

Solutions:

  1. Make executable:

    chmod +x optixlog
  2. Use sudo (if needed):

    sudo chmod +x /usr/local/bin/optixlog

SDK Not Found

Issue: CLI can't find Python SDK

Solutions:

  1. Check Python:

    python --version
    which python
  2. Install SDK manually:

    pip install optixlog
  3. Use CLI to install:

    optixlog install-sdk

Next Steps

On this page