Publish the developer plugin
-
Turn on the plugin. In the dashboard, open Setup, then Git integration, and turn on Publish the git hook plugin to this account. Or run:
CALL AGENTLEDGER.core.publish_plugin();This adds a Cortex Extension, already configured for your app, which the app keeps up to date on every upgrade.
core.unpublish_plugin()removes it. -
Give developers the reporter role:
GRANT APPLICATION ROLE AGENTLEDGER.APP_REPORTER TO ROLE <developer_role>; -
Each Cortex Code developer installs the plugin, once:
cortex plugin install AGENTLEDGER.PLUGINS.AGENTLEDGER -c <snowflake_connection>Replace
AGENTLEDGERwith your app's name if you chose another. The plugin reports each session's repository, branch and commit, never remote URLs or file contents.
Claude Code, Cursor CLI and Gemini CLI
Their sessions never reach Snowflake telemetry, so each developer installs the agentledger CLI, which hooks them:
uv tool install agentledger-cli # or: pipx install agentledger-cli
agentledger install # add --app <name> if your app isn't AGENTLEDGER
agentledger install checks that the developer's Snowflake connection can reach the app, installs the Cortex Code plugin too, and adds hooks for each of Claude Code, Cursor CLI and Gemini CLI it finds. After each turn, those sessions are queued and loaded into the app in the background. agentledger status checks the setup.
Updating the plugin
Updating the plugin after an app upgrade
cortex plugin check shows the update and cortex plugin update agentledger installs it.
Next steps
- Sync pull requests so branch spend appears against the pull requests it shipped.
- See how sessions become cost per branch.
- Check what git reports contain.