Skip to main content

Tooling for running AI coding agents in CI/CD environments

Project description

agentic-ci

Tooling for running AI coding agents in CI/CD environments. Handles container setup, telemetry collection, streaming output, and process lifecycle so your CI workflows don't have to.

Install

pip install ./agentic-ci/

Commands

agentic-ci setup

Bootstrap a CI container for running Claude Code. Installs system dependencies, creates a non-root user (claude-ci), and installs Claude Code.

WORKSPACE_DIR=/workspace agentic-ci setup

agentic-ci run

Run Claude Code with telemetry and streaming output. Starts an OTEL collector, runs Claude with stream-json output, displays human-readable progress, and prints a token/cost summary.

When run as root, automatically re-execs as claude-ci.

agentic-ci run "your prompt here" /path/to/workdir
agentic-ci run "prompt" . --model claude-sonnet-4-6

agentic-ci stream

Parse Claude Code stream-json from stdin into human-readable CI logs with token tracking.

claude -p "prompt" --output-format stream-json | agentic-ci stream

agentic-ci otel-collect

Start a lightweight OTLP HTTP/JSON receiver for capturing token and cost metrics. Binds to an OS-assigned port and writes it to $OTEL_PORT_FILE for discovery.

agentic-ci otel-summary

Print a human-readable token/cost summary from an OTEL JSONL log.

agentic-ci otel-summary /path/to/claude-otel.jsonl

agentic-ci extract

Extract a structured JSON result from Claude's stream-json output.

agentic-ci extract stream-capture.jsonl output-dir/

Environment Variables

Variable Default Used by
WORKSPACE_DIR /workspace setup, run
CLAUDE_MODEL claude-opus-4-6 run
OTEL_LOG_FILE /tmp/claude-otel.jsonl otel-collect
OTEL_RATE_FILE /tmp/claude-otel-rate.json otel-collect, stream
OTEL_COLLECTOR_PORT 4318 otel-collect
OTEL_PORT_FILE otel-collect
STREAM_CAPTURE_FILE <run_tmp>/claude-stream-capture.jsonl run

Python API

All commands are also importable:

from agentic_ci.runner import run
from agentic_ci.stream import StreamProcessor
from agentic_ci.otel_summary import print_summary

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

agentic_ci-0.1.0.tar.gz (17.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

agentic_ci-0.1.0-py3-none-any.whl (19.7 kB view details)

Uploaded Python 3

File details

Details for the file agentic_ci-0.1.0.tar.gz.

File metadata

  • Download URL: agentic_ci-0.1.0.tar.gz
  • Upload date:
  • Size: 17.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.13

File hashes

Hashes for agentic_ci-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c2274e5847aa1268f76267bc1d29e9d24386e94c11395392cbeac169e49049e3
MD5 f6ba42b4b1111d7378a1c2a5cc47c203
BLAKE2b-256 2e31ffc3f6772bcae617eed493b694fb4d12cbd041fe21e46f2f92c232e1536e

See more details on using hashes here.

File details

Details for the file agentic_ci-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: agentic_ci-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 19.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.13

File hashes

Hashes for agentic_ci-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f76840c2977753540edc02086e2a5d42b11b78dde45ee19d6921983b3152c0af
MD5 993250af9e8f113f3bef57a9326707bd
BLAKE2b-256 3f74f247203b6d3017d4505a0ea092b2acdf891f1aa1087eab0ffcc6ff7e1142

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page