Catalog PyPI
Back to packageRELEASE DETAILS

0.1.0

PyPI

afterlight

Universal agent context tracking. Know what codebase the agent is working in.

agentaiclaudecontextmcp
Published17 Mar 2026
Direct dependencies0
Transitive dependenciesNot calculated

README

Version 0.1.0 documentation

trace

Universal agent context tracking.

When an AI agent works on code, trace records which project it's in. Any tool — MCP servers, hooks, scripts — can read ~/.trace/active_project to know the current context.

Install

pip install trace

How it works

A Claude Code hook fires on every file operation (Read, Edit, Write). It extracts the git root from the file path and writes it to ~/.trace/active_project. That's it.

Any tool can read this file. No coordination needed.

Python API

from trace_pkg import active_project

project = active_project()  # Path("/Users/you/your-project") or None

CLI

trace          # print active project
trace set .    # manually set active project

Claude Code setup

Add to ~/.claude/settings.json:

{
  "hooks": {
    "PostToolUse": [
      {
        "matcher": "Read|Edit|Write|Glob|Grep",
        "hooks": [
          {
            "type": "command",
            "command": "trace-hook",
            "async": true
          }
        ]
      }
    ]
  }
}

Why

MCP servers need to know what project the agent is working in. Without trace, each server has to guess from cwd, env vars, or explicit configuration. With trace, there's one source of truth that updates automatically.

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 0

Native requirements
0 direct targetsNot calculated transitive count
No declared dependencies in this collected response

Declarations describe requirements; they are not a resolved dependency graph.

Distribution files

2 collected
afterlight-0.1.0-py3-none-any.whl

bdist_wheel · 4.79 KB · Python py3

Source file
afterlight-0.1.0.tar.gz

sdist · 3.97 KB · Python source

Source file

Repository

PENDING
aardpark/trace

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 21:14 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:5e10e8a3c7d0f4d30ccb89ce614e2a37ba6880d7703eda07c2421ae2ce4e015e

Other collected versions

View all collected versions →