← Documentation

VS Code Extension

Optimize AI API costs directly in VS Code, Cursor, and other VS Code-based editors.

Download Extension

Version 0.1.0 — VS Code 1.85+

Download

Features

Response Caching

Cache AI responses locally for instant, zero-cost repeated queries

Security Scanning

Detect API keys and secrets before sending to AI providers

Cost Tracking

Real-time savings displayed in the status bar

Settings Sync

Automatically uses organization settings from the dashboard

Installation

Step 1: Download

Visit the download page and click Download to get the .vsix file.

Step 2: Install

  1. Open VS Code or Cursor
  2. Press Ctrl+Shift+P (or Cmd+Shift+P on Mac)
  3. Type Install from VSIX and press Enter
  4. Select the downloaded .vsix file
  5. Restart when prompted

Step 3: Authenticate

  1. Press Ctrl+Shift+P
  2. Type iri: Login and press Enter
  3. Sign in via the browser window
  4. Return to VS Code — you are connected

Look for iri: $0.00 saved in the status bar to confirm the extension is active.

Commands

Access via Command Palette (Ctrl+Shift+P):

iri: LoginConnect to your iri AI account
iri: LogoutDisconnect from iri AI
iri: Show SavingsView detailed cost savings
iri: Clear CacheClear cached responses
iri: Open SettingsConfigure optimization settings
iri: Toggle ProxyEnable or disable the proxy

Settings

Configure in VS Code settings (search for "iri"):

iri.enabledtrue

Enable the optimization proxy

iri.proxyPort9876

Local proxy server port

iri.caching.enabledtrue

Enable response caching

iri.caching.ttlHours24

Cache duration in hours

iri.compression.enabledtrue

Enable prompt compression

iri.compression.levelbalanced

Compression level

iri.security.scanSecretstrue

Scan for sensitive data

Command Line Installation

# VS Code
code --install-extension ~/Downloads/iri-optimizer.vsix
# Cursor
cursor --install-extension ~/Downloads/iri-optimizer.vsix

Troubleshooting

Status bar shows error

Run iri: Toggle Proxy twice (off then on). If it persists, run iri: Login again.

AI tools not being optimized

Some tools may need proxy configuration. Point them to http://localhost:9876

Port 9876 in use

Change iri.proxyPort in VS Code settings to a different number.

Login browser didn't open

Manually visit the URL shown in VS Code's Output panel (View > Output > iri AI).

Next Steps