← All guides AI Release
RU Subscribe to @ai_releaseorg

How to Install BOSS AI: Team-Wide Usage and OKR Tracking for Codex and Claude Code

Updated: 02.12.2026 · AI Release · @ai_releaseorg
How to Install BOSS AI: Team-Wide Usage and OKR Tracking for Codex and Claude Code

TL;DR

What you will get

Quick start

cd ~/boss-ai && cp .env.example .env
docker compose up -d && docker compose ps
python3 usage_report.py --days 7 --out team-usage.csv
head -n 5 team-usage.csv

Details and verification are in the steps below.

Requirements and setup

Illustration: Requirements and setup
Illustration: Requirements and setup
ComponentWhy it is neededHow to check
Docker + Compose v2Runs BOSS AI as a container`docker compose version`
Python 3.9+Runs the usage collector`python3 --version`
`~/.claude/projects/*.jsonl`Claude Code token source`find ~/.claude/projects -name '*.jsonl' \wc -l`
`~/.codex/sessions/**/*.jsonl`Codex token source`find ~/.codex/sessions -name '*.jsonl' \wc -l`

Step 1. Confirm both agents are writing session data

Illustration: Step 1. Confirm both agents are writing session data
Illustration: Step 1. Confirm both agents are writing session data

What to do: verify that Claude Code and Codex CLI exist on the machine and that both have already produced session files.

command -v claude codex
claude --version
codex --version
find ~/.claude/projects -name '*.jsonl' | wc -l
find ~/.codex/sessions -name '*.jsonl' | head -n 3

Inspect one line so you know what the collector will parse:

head -n 1 ~/.claude/projects/*/*.jsonl | python3 -m json.tool | head -n 30

Example: the Claude Code output contains a block like "usage": {"input_tokens": 1204, "output_tokens": 318, "cache_read_input_tokens": 8192}, while a Codex rollout file contains a token-accounting event with its own counter names. The names differ between tools — that is why the collector in Step 3 matches counter keys by name instead of by fixed position.

Why: token accounting is only as complete as the transcripts on disk. If an agent has never run a session on this machine, there is nothing to count and BOSS AI will show an empty team.

If you are rolling this out beyond one laptop, pair the collector with the team-level setup described in Claude Code for Teams: Setting Up Subagents and a Shared AI Superagent so every teammate produces session data in the same place.

How to check: both command -v lines print a path (e.g. /usr/local/bin/claude), and both find commands print a number greater than 0.

Checklist before moving on:

Step 2. Install BOSS AI and mount the two agent directories

What to do: create the deployment directory, write the compose file, and start the service.

mkdir -p ~/boss-ai && cd ~/boss-ai
cat > docker-compose.yaml <<'YAML'
services:
  boss-ai:
    image: <boss-image>
    ports:
      - "<boss-port>:<boss-port>"
    environment:
      - CLAUDE_DATA_DIR=/data/claude
      - CODEX_DATA_DIR=/data/codex
    volumes:
      - ~/.claude:/data/claude:ro
      - ~/.codex:/data/codex:ro
      - boss-data:/var/lib/boss
volumes:
  boss-data:
YAML
docker compose up -d

Replace <boss-image> with the image tag and <boss-port> with the port from the release page. Keep the :ro suffix — BOSS AI only reads transcripts, and a read-only mount makes it impossible for the container to corrupt an agent's session files.

Why: the two volume mounts are the only part of this file that connects BOSS AI to your token data. Everything else (image, port, environment variable names) comes from the release you downloaded — if your release documentation uses different variable names, change them there rather than guessing.

Example: after docker compose up -d, docker compose logs --tail 20 boss-ai shows the service starting, and curl -s http://localhost:<boss-port>/ | head returns HTML. The exact health path is release-specific — check the documentation.

How to check: docker compose ps lists the boss-ai service with status Up (and (healthy) if the release defines a health check). If the container exits immediately, read the reason with docker compose logs boss-ai.

Step 3. Aggregate tokens per developer and cross-check the numbers

Illustration: Step 3. Aggregate tokens per developer and cross-check the numbers
Illustration: Step 3. Aggregate tokens per developer and cross-check the numbers

What to do: save this collector as usage_report.py in ~/boss-ai and run it.

#!/usr/bin/env python3
"""Aggregate Codex + Claude Code token usage per user into one CSV."""
import argparse, csv, getpass, json, pathlib, time

COUNTERS = ("input_tokens", "output_tokens", "cache_creation_input_tokens",
            "cache_read_input_tokens", "cached_input_tokens", "total_tokens")

def collect(obj, totals):
    if isinstance(obj, dict):
        for key, value in obj.items():
            if key in COUNTERS and isinstance(value, int):
                totals[key] = totals.get(key, 0) + value
            else:
                collect(value, totals)
    elif isinstance(obj, list):
        for item in obj:
            collect(item, totals)

def scan(root, tool, cutoff, rows):
    root = pathlib.Path(root).expanduser()
    if not root.exists():
        return
    for path in root.rglob("*.jsonl"):
        if path.stat().st_mtime < cutoff:
            continue
        totals = {}
        with path.open(encoding="utf-8", errors="replace") as handle:
            for line in handle:
                line = line.strip()
                if not line:
                    continue
                try:
                    collect(json.loads(line), totals)
                except json.JSONDecodeError:
                    continue
        if totals:
            rows.append({"user": getpass.getuser(), "tool": tool,
                         "session": path.name,
                         **{k: totals.get(k, 0) for k in COUNTERS}})

def main():
    parser = argparse.ArgumentParser()
    parser.add_argument("--days", type=int, default=7)
    parser.add_argument("--out", default="team-usage.csv")
    parser.add_argument("--claude-dir", default="~/.claude/projects")
    parser.add_argument("--codex-dir", default="~/.codex/sessions")
    args = parser.parse_args()

    cutoff = time.time() - args.days * 86400
    rows = []
    scan(args.claude_dir, "claude-code", cutoff, rows)
    scan(args.codex_dir, "codex", cutoff, rows)

    with open(args.out, "w", newline="", encoding="utf-8") as handle:
        writer = csv.DictWriter(handle, fieldnames=["user", "tool", "session", *COUNTERS])
        writer.writeheader()
        writer.writerows(rows)
    print(f"{len(rows)} sessions -> {args.out}")

if __name__ == "__main__":
    main()

Run it:

cd ~/boss-ai && python3 usage_report.py --days 7 --out team-usage.csv
head -n 3 team-usage.csv

Example: the shape of the file (your numbers will differ):

user,tool,session,input_tokens,output_tokens,cache_creation_input_tokens,cache_read_input_tokens,cached_input_tokens,total_tokens
alice,claude-code,9f3c1a2e-4b77-4d1e-9a55-0c1d2e3f4a5b.jsonl,1204,318,0,8192,0,0
alice,codex,rollout-2025-01-14T09-12-03.jsonl,2310,442,0,0,6144,0

The script reads counter keys by name, so it works even though Codex and Claude Code name their counters differently. That is why Step 1 asked you to inspect one raw line.

To produce the human-readable weekly summary:

python3 usage_report.py --days 7 --out team-usage.csv
python3 - <<'PY'
import csv, collections
totals = collections.defaultdict(lambda: collections.Counter())
with open("team-usage.csv", encoding="utf-8") as fh:
    for row in csv.DictReader(fh):
        for key in ("input_tokens", "output_tokens", "cache_read_input_tokens"):
            totals[(row["user"], row["tool"])][key] += int(row[key] or 0)
with open("team-usage.md", "w", encoding="utf-8") as out:
    out.write("| User | Tool | Input | Output | Cache read |\n|---|---|---|---|---|\n")
    for (user, tool), t in sorted(totals.items()):
        out.write(f"| {user} | {tool} | {t['input_tokens']} | {t['output_tokens']} | {t['cache_read_input_tokens']} |\n")
print(open("team-usage.md", encoding="utf-8").read())
PY

Wrap the two commands in a skill if you want teammates to run exactly the same thing instead of a copy-pasted shell history — see How to Create a Claude Skill: Step-by-Step Guide.

How to check: open any Claude Code session in the same project and run /cost inside it. Compare the token numbers it reports against the newest claude-code row for today's date in team-usage.csv. They should be in the same range; a row of zeros means the transcript for that session is older than --days or lives under a different HOME.

Troubleshooting

Problem. The container refuses to start because the port is taken

Problem. The collector finds nothing for a teammate

Problem. Rows appear but every counter is zero

Summary and next steps

BOSS AI now runs from Compose with read-only access to ~/.claude and ~/.codex, and usage_report.py produces team-usage.csv and team-usage.md covering every session from the last seven days. Next, schedule the collector weekly on each machine and push the CSV to a shared drive so one report covers the whole team.

FAQ

Does BOSS AI replace the /cost view inside Claude Code?

No. /cost shows the current session only; BOSS AI and the collector aggregate transcripts across sessions and across both Codex and Claude Code, which is what a team report needs.

Do cached input tokens count toward our spend?

They are recorded in separate counters (cache_read_input_tokens, cached_input_tokens) precisely because they are billed differently from fresh input. Keep them as their own column and check the documentation for your plan's rates.

Can one machine track the whole team?

Only the sessions stored on that machine. Each teammate's transcripts live under their own home directory, so either run the collector on every machine and merge the CSVs, or export each developer's directory to a shared location first.

What if a teammate uses a browser or IDE client with no local JSONL files?

There is nothing on disk to parse. Check that client's documentation for a usage export and treat it as a separate data source; do not assume BOSS AI will see those sessions.

🤖 AI summary

AI Release Knowledge Layer
Machine-readable description · Version 1.0

Status: practical guide. Some statements come from vendors; verify in your environment.

1. Summary

Time to complete: ~30 minutes (one machine), plus ~10 minutes per additional teammate. Difficulty: Intermediate — you need Docker, a shell and basic Python.

Inside: direct answers, key facts, entities, context, reliability, unknowns and sources.

Machine data: Citation Map JSON · JSON-LD · Semantic Embeddings — separate stage.

Full Knowledge Layer: sections 2–8

2. Direct answers

What is required?
OS: macOS 13+, Ubuntu 22.04+ or WSL2 on Windows 11. Native Windows without WSL2 cannot mount ~/.claude into a Linux container cleanly.; Docker Engine 24+ with the Compose v2 plugin. Check with docker compose version — the output must contain v2.; Python 3.9+ — check with python3 --version.; jq — check with jq… → details (AR-GUIDE-POSHAGOVOE-003)
How to do it?
Step 1. Confirm both agents are writing session data → Step 2. Install BOSS AI and mount the two agent directories → Step 3. Aggregate tokens per developer and cross-check the numbers → details (AR-GUIDE-POSHAGOVOE-004)
Which topics does it cover?
BOSS AI установка, учёт расхода токенов Claude Code, как отслеживать использование ИИ-агентов командой → details (AR-GUIDE-POSHAGOVOE-002)
What are the key points?
Time to complete: ~30 minutes (one machine), plus ~10 minutes per additional teammate. Difficulty: Intermediate — you need Docker, a shell and basic Python. → details (AR-GUIDE-POSHAGOVOE-007)

3. Key facts

  1. Time to complete: ~30 minutes (one machine), plus ~10 minutes per additional teammate. — evidence; status: заявление источника.
  2. Difficulty: Intermediate — you need Docker, a shell and basic Python. — evidence; status: заявление источника.
  3. You will need: macOS, Linux or WSL2; Docker Engine with the Compose plugin; Python 3.9+; jq; a Claude Code install (~/.claude/) and a Codex CLI install (~/.codex/) that have each run at least one real session; access to the BOSS AI release page. — evidence; status: заявление источника.
  4. OS: macOS 13+, Ubuntu 22.04+ or WSL2 on Windows 11. Native Windows without WSL2 cannot mount ~/.claude into a Linux container cleanly. — evidence; status: заявление источника.
  5. Docker Engine 24+ with the Compose v2 plugin. Check with docker compose version — the output must contain v2. — evidence; status: заявление источника.
  6. Python 3.9+ — check with python3 --version. — evidence; status: заявление источника.

4. Entities

EntityTypeRole
BOSS AI установкатема/инструментупоминается в заголовке, TL;DR или разделах гайда
учёт расхода токенов Claude Codeтема/инструментупоминается в заголовке, TL;DR или разделах гайда
как отслеживать использование ИИ-агентов командойтема/инструментупоминается в заголовке, TL;DR или разделах гайда
Windowsплатформа/технологияупоминается в заголовке, TL;DR или разделах гайда
Linuxплатформа/технологияупоминается в заголовке, TL;DR или разделах гайда
macOSплатформа/технологияупоминается в заголовке, TL;DR или разделах гайда
Dockerплатформа/технологияупоминается в заголовке, TL;DR или разделах гайда
Pythonплатформа/технологияупоминается в заголовке, TL;DR или разделах гайда
Claudeтема/инструментупоминается в заголовке, TL;DR или разделах гайда

5. Context

  • Guide — describes → How to Install BOSS AI: Team-Wide Usage and OKR Tracking for Codex and Claude Code (AR-GUIDE-POSHAGOVOE-001).
  • Guide — includes step → Step 1. Confirm both agents are writing session data (AR-GUIDE-POSHAGOVOE-001).

6. Reliability

Confirmed

No independent confirmation is provided; source claims and editorial conclusions are separated below.

Source claims

  • Product features, versions, prices and limits come from vendors and the guide.
  • Commands and steps are recommendations, not guaranteed results.

AI Release analysis

  • Structure, comparison and selection criteria are editorial.
  • The guide does not replace an independent audit or legal advice.

7. Unknowns

  • Current versions, prices and limits.
  • Independent benchmarks and quality checks.
  • Terms of use and data policy.

8. Sources

SourceTypeRole
No external links——

Cite as: AI Release. Пошаговое руководство: как установить BOSS AI и вести учёт расхода токенов Codex и Claude Code для всей команды. ai-release.org.