Project-Level Configuration
Tracing is always configured per-project. Each project traces to its own Infinium agent:
cd /path/to/project-a
infinium-copilot init
# Enter Project A's Agent ID and Secret
cd /path/to/project-b
infinium-copilot init
# Enter Project B's Agent ID and Secret
| Location | Contents |
|---|---|
.infinium/config.json in project root | Agent ID, base URL, trace granularity |
./hooks.json in project root | Copilot CLI hook config (entries for sessionStart, sessionEnd, userPromptSubmitted, preToolUse, postToolUse, errorOccurred) |
Add
.infinium/to your.gitignoreto keep credentials out of version control.hooks.jsonis project-specific and can be committed if you want your team to share the configuration.
Resolution Order
When a hook fires, the connector resolves credentials in this order:
- Project config —
.infinium/config.jsonat or above the working directory - Environment variables — Override project config (for CI/Docker)
Credential Storage
| Data | Storage | Security |
|---|---|---|
| Agent ID | Config file (JSON) | Non-sensitive identifier |
| Agent Secret | OS keyring | Encrypted by the operating system |
| Base URL | Config file (JSON) | Non-sensitive |
The connector never stores your agent secret in a file. It uses the OS keyring:
- Windows: Windows Credential Manager
- macOS: Keychain
- Linux: Secret Service (GNOME Keyring, KDE Wallet)
Updating Credentials
infinium-copilot update-credentials
Or pass flags directly:
infinium-copilot update-credentials --agent-id "new-id" --agent-secret "new-secret"
Pause and Resume
Temporarily disable tracing without removing your configuration:
# Pause — hooks stay installed but traces are skipped
infinium-copilot pause
# Resume — traces start sending again
infinium-copilot resume
Check current state with infinium-copilot status.
Trace Granularity
Choose during init, or change later via env vars:
- Per-session (default) — one summary trace per Copilot session on
sessionEnd - Per-turn — a trace after every
postToolUseevent (noisy but detailed) - Both — per-turn traces and a final session summary
Per-session is the default because Copilot sessions can be long-running and per-turn flushing produces a lot of traces.
Environment Variables
All settings can be overridden with environment variables. This is useful for CI/CD, Docker, or headless environments where the interactive wizard can’t run.
Credentials
| Variable | Description | Default |
|---|---|---|
INFINIUM_AGENT_ID | Agent ID | From config file |
INFINIUM_AGENT_SECRET | Agent secret | From OS keyring |
INFINIUM_BASE_URL | API base URL | https://platform.i42m.ai/api/v1 |
Connector Behavior
| Variable | Description | Default |
|---|---|---|
CONNECTOR_QUIET | Suppress output (true/false) | false |
CONNECTOR_FLUSH_ON_STOP | Per-turn flush on postToolUse | false |
CONNECTOR_FLUSH_ON_SESSION_END | Summary flush on sessionEnd | true |
CONNECTOR_SESSION_TTL | Stale session cleanup threshold (seconds) | 1800 |
CONNECTOR_SESSION_DIR | Override temp directory for session files | System temp |
CONNECTOR_MAX_INPUT_PREVIEW | Max characters of prompt preview | 200 |
CONNECTOR_MAX_OUTPUT_PREVIEW | Max characters of tool-output preview | 300 |
HTTP Client
| Variable | Description | Default |
|---|---|---|
INFINIUM_TIMEOUT | Request timeout in seconds | 30.0 |
INFINIUM_MAX_RETRIES | Max retry attempts | 3 |
INFINIUM_VERIFY_SSL | Verify SSL certificates | true |
CI/Docker Example
export INFINIUM_AGENT_ID="your-agent-id"
export INFINIUM_AGENT_SECRET="your-agent-secret"
# Non-interactive setup
infinium-copilot init \
--agent-id "$INFINIUM_AGENT_ID" \
--agent-secret "$INFINIUM_AGENT_SECRET" \
--no-interactive
Uninstall
Completely remove the connector:
infinium-copilot uninstall
This removes:
- Infinium hook entries from
hooks.json(other hook entries are preserved) - The
hooks.jsonfile if all entries were ours - Credentials (config file + keyring secret)
To skip the confirmation prompt:
infinium-copilot uninstall -y
You can reinstall at any time with pip install infinium-copilot-cli-connector and infinium-copilot init.