Skip to content

Integrations

karurikwao edited this page Jul 5, 2026 · 1 revision

Integrations

ContextClean is intended to fit into daily AI-agent workflows.

GitHub Actions

Use the first-party action wrapper:

- uses: karurikwao/contextclean@main
  with:
    log-file: failed-log.txt
    output: cleaned-context.md
    max-tokens: "8000"

Use ctxclean gha directly inside workflows when you install the CLI yourself:

ctxclean gha failed-log.txt --max-tokens 8000 --format markdown --output cleaned.md --force

AI Coding Agents

Typical flow:

ctxclean repo . --max-tokens 12000 --format markdown --output context.md --force
ctxclean gha build.log --max-tokens 8000 --output failed-log.md --force

Then provide the generated file to the agent.

MCP

Start stdio MCP mode:

ctxclean mcp

MCP tools:

  • contextclean_clean
  • contextclean_report

See docs/MCP_COMPATIBILITY.md in the repository for client-specific notes.

ctxrun

Wrap common commands:

ctxrun --max-tokens 8000 npm test
ctxrun --format markdown pytest
ctxrun --format markdown cargo test

This keeps successful output unchanged and only cleans failures.

Python Helper Scaffold

The Python wrapper lives under:

packages/python

It provides helper functions for calling the CLI from Python workflows. Publishing to PyPI is a later release step.

LangChain And LlamaIndex

Examples live under:

examples/langchain_helper.py
examples/llamaindex_helper.py

Use these as starting points for local preprocessing before loading documents or logs into an agent pipeline.

Clone this wiki locally