CLI Installation
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)
Binary Installation (Recommended)
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 --versionmacOS
# 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 --versionWindows
# 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 --versionDevelopment 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 linkVerification
Check that the CLI is installed correctly:
optixlog --versionExpected output:
0.2.0Test help command:
optixlog --helpPATH Configuration
If the optixlog command is not found:
Linux/macOS
-
Find installation location:
which optixlog # or npm list -g optixlog-cli -
Add to PATH (if needed):
# Add to ~/.bashrc or ~/.zshrc export PATH="$PATH:/path/to/optixlog" -
Reload shell:
source ~/.bashrc # or source ~/.zshrc
Windows
-
Find installation location:
where.exe optixlog -
Add to PATH:
- Open System Properties → Environment Variables
- Add the directory containing
optixlog.exeto 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-sdkThe 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:
-
Verify installation:
npm list -g optixlog-cli -
Re-link:
cd /path/to/optixlog-cli npm link -
Check PATH:
echo $PATH # Linux/macOS echo %PATH% # Windows
Permission Denied
Issue: Permission denied when running binary
Solutions:
-
Make executable:
chmod +x optixlog -
Use sudo (if needed):
sudo chmod +x /usr/local/bin/optixlog
SDK Not Found
Issue: CLI can’t find Python SDK
Solutions:
-
Check Python:
python --version which python -
Install SDK manually:
pip install http://optixlog.com/optixlog-0.0.4-py3-none-any.whl -
Use CLI to install:
optixlog install-sdk