Connect Your Coding Assistant & Code Repository
Connect an AI coding assistant and your code repository — GitHub or GitLab — to see how your team uses AI coding tools and what those tools deliver. In under 10 minutes you have the assistant connected and your usage dashboards live — per-tool and per-developer usage and cost against API-equivalent value. Per-developer productivity metrics that pair AI spend with the pull requests your developers ship appear once your code host is connected and its first sync completes.
You will connect the assistant first — that alone populates the usage dashboards — then connect your code repository to add the per-developer productivity view.
Before you begin
You need a Revenium account.
How it works
You connect a coding assistant, which sends usage telemetry to Revenium.
Revenium groups that usage by tool, team, and developer, and estimates its API-equivalent value.
You connect GitHub or GitLab, which adds shipped pull requests as an output signal.
Revenium cross-references spend against delivery and shows per-developer productivity metrics.
1. Get your metering key
In Revenium, open Connections → SDK Setup and copy your metering key (it begins with rev_mk_). This key authenticates telemetry from your coding assistant into your Revenium account. Keep it handy for the next step.
2. Connect your coding assistant
Revenium connects Claude Code, Codex, Gemini CLI, GitHub Copilot, and Cursor. In Connections, each assistant has a ready-to-paste setup prompt — select your tool, copy the prompt, and paste it into that assistant. The prompt already contains your key and the exact commands, so this is the quickest path. Repeat for each assistant you want to track.
Four of the five are set up from the command line, using one package:
Each assistant then has its own setup command:
Claude Code
revenium-metering setup --api-key <your-key>
Codex
revenium-codex setup --api-key <your-key>
Gemini CLI
revenium-gemini setup --api-key <your-key>
After setup, reload your environment so the assistant picks up the new configuration — the setup output tells you how (for example source ~/.claude/revenium.env for Claude Code, or exec $SHELL for Codex). Then confirm it worked:
Cursor and GitHub Copilot are different — they need no CLI install. Both are synced by Revenium directly: in the dashboard open Connections → Providers, click Link Provider, and select the provider.
Cursor — enter your Cursor team API key (a personal user key will not work). Revenium then syncs Cursor usage every 5 minutes.
GitHub Copilot — enter a GitHub token plus your organization slug. Use a fine-grained token with the organization permissions Organization Copilot metrics and Administration (both read-only), or a classic token with
admin:organdmanage_billing:copilot. Revenium then refreshes Copilot usage once daily. Copilot Business or Enterprise must be active on your organization and the Copilot usage metrics policy enabled in your GitHub org settings.
Run a short session in your assistant. Usage appears in Revenium after the next telemetry flush.
3. Connect your code repository for per-developer attribution
Your code host adds output data — merged pull requests, or merged requests on GitLab — so you can measure delivery next to spend. Revenium connects to GitHub and GitLab; the walkthrough below uses GitHub, and the GitLab flow is the same shape.
In Revenium, open Connections → Integrations, where GitHub, GitLab, and Slack are connected.
On the GitHub card, choose Connect and enter your GitHub organization.
Provide a read-only token. Revenium gives you a Create a pre-filled token on GitHub button that pre-selects exactly the permissions needed — Pull requests and Metadata (read-only) under Repository permissions, plus Members (read-only) under Organization permissions. If you only have a classic token,
repo(orpublic_repofor public-only orgs) plusread:orgalso works, though it grants more than Revenium needs.Choose the repositories to track, or connect the whole organization — pull requests are counted across every repo in the org.
Save the connection.
For GitLab, connect a personal access token with the read_api and read_user scopes; Revenium then counts merged merge requests per user across your group.
For per-developer attribution to line up, the email addresses on your developers' commits should match the email addresses Revenium has for those developers. Org members are auto-mapped by email, and you can edit the mapping for anyone who does not match automatically.
The first sync is not instant — give it a few minutes before you expect to see pull request data.
Revenium splits AI-assisted from human-authored work using the Co-Authored-By trailers at the bottom of commits. The default pattern is noreply@anthropic.com, which covers Claude Code. If your team uses other AI assistants that sign commits, add their signatures — one pattern per line — on the same card; work without a matching trailer simply counts as human-authored.
4. See your dashboards and productivity metrics
Open Intelligence → AI Assistants in the sidebar.
The Overview shows every connected tool side by side — active users and total cost per tool for the period you select, plus aggregate adoption, sessions per user, usage trend, and API-equivalent value.
Each tool has its own per-tool dashboard with a per-user breakdown: who is using it, how many sessions they run, how many tokens they consume, and what that costs.
On the Claude Code tab, once your code host is connected, the Value by User table gains three productivity columns:
ColumnWhat it showsPRs Merged
Pull requests the developer merged in the period
PRs with Claude
Pull requests where a commit was AI co-authored
Cost/PR
AI spend divided by pull requests merged
Connect GitLab instead and the same columns count merged merge requests, labelled MRs and Cost/MR.
The By Employee tab rolls every connected assistant and direct API spend up to the individual — the view for chargebacks and for spotting concentrated spend. Start with the Attribution Coverage figure, which tells you how much of your identifiable AI spend is tied to a known person.
That is the full picture: usage, cost, and per-developer delivery, all in one place.
Where to go next
Analyze AI tooling spend — go deeper on who is using which assistant, how intensively, and whether the seats you bought are earning their cost.
Set budgets and alerts — put caps on that spend and get told in Slack when a team or tool spikes.
Instrument your own code or API traffic
The steps above connect off-the-shelf coding assistants. If instead you want to meter an application you build — your own AI calls or API traffic — Revenium acts as zero-latency middleware: install the SDK, set your keys, and wrap your client.
Install the SDK
Set environment variables
Wrap your client
Requires ESM — set
"type": "module"inpackage.json, or wrap the call in anasyncfunction.
For deeper attribution, budgets, and monetization, continue with Attribute Your Usage, Set Budgets & Alerts, and Monetize Your Apps.
Last updated
Was this helpful?