Installation

pip install infinium-cline-connector

Requirements: Python 3.9 or higher, Cline VS Code extension v3.36+.

The connector depends on infinium-o2 (the Infinium Python SDK), click (CLI framework), and keyring (secure credential storage). These are installed automatically.

Enable Cline Hooks

Cline’s hook system is an opt-in feature. Enable it once in VS Code:

Settings → Extensions → Cline → Features → Enable Hooks

Without this setting turned on, Cline will not fire any of the hooks the connector needs.

Setup

Navigate to your project and run the setup wizard:

cd /path/to/your/project
infinium-cline init

The wizard asks for two things:

  1. Agent ID — Your Infinium agent ID (from the platform)
  2. Agent Secret — Your agent secret (stored securely in the OS keyring)
  Infinium Cline Connector
  ========================

  Enter your Infinium Agent ID: a1b2c3d4-...
  Enter your Infinium Agent Secret: ****

  Config saved to:    .infinium/config.json
  Secret stored in:   OS keyring (secure)
  Hooks written to:   .clinerules/hooks

  IMPORTANT: Enable hooks in Cline:
    VS Code → Settings → Extensions → Cline → Features → Enable Hooks

  Setup complete! Cline will now send traces to Infinium.

That’s it. Now just use Cline as you normally would — every task in this project is automatically traced to Infinium.

If infinium-cline is not found, use python -m infinium_cline_connector instead. You may need to add Python’s Scripts directory to your system PATH.

Verify Your Connection

After setup, send a test trace to confirm everything works:

infinium-cline test

You should see:

  Agent ID:  a1b2c3d4-...
  API URL:   https://platform.i42m.ai/api/v1
  Sending test trace...

  Connection verified! Trace ID: abc123...
  Your setup is working correctly.

If the test fails, check the Troubleshooting guide.

How Tracing Works

Once set up, tracing is fully automatic. There’s nothing extra to run or remember — just use Cline as normal.

  1. You start a Cline task in VS Code
  2. Cline fires hook scripts from .clinerules/hooks/ for each event
  3. The connector writes {"cancel": false, "contextModification": null, "errorMessage": null} to stdout — Cline requires this response on every hook call
  4. Events accumulate in a temporary session JSONL file
  5. On TaskComplete / TaskCancel, a detached background worker aggregates events into a structured trace and reads ui_messages.json for token usage
  6. The trace is sent to your Infinium agent via the API
  7. Maestro analyzes the trace and produces a quality score

You’ll see your traces appear in the Infinium platform within seconds.

Check Your Status

At any time, verify your configuration:

infinium-cline status
  Infinium Cline Connector Status
  --------------------------------
  Tracing:       active
  Agent ID:      a1b2c3d4-...
  Secret:        configured
  API URL:       https://platform.i42m.ai/api/v1
  Granularity:   per-session (on TaskComplete/TaskCancel)
  Config from:   project (.infinium/config.json)
  Hooks:         .clinerules/hooks

View Trace History

See what traces have been sent:

infinium-cline history
  Last 3 trace(s):

  Time                 Steps Tools Errors Status   Trace ID
  -------------------- ----- ----- ------ -------- ------------
  2026-04-18 14:32         8     5      0 sent     a3f2c891...
  2026-04-18 13:10         3     2      0 sent     b7d4e012...
  2026-04-18 11:45        12     8      1 sent     c9a1f234...

Next Steps