Skip to main content

CausalityOS

CausalityOS is a terminal-first developer tool for investigating why software projects behave differently after code, test, log, or Git history changes.

Current release: 0.10.0

Installation

After publication to PyPI:

python -m pip install causalityos

For local development from this repository:

python -m pip install -e ".[dev]"

First Commands

causality --help
causality --version
causality analyze .

The PyPI distribution is named causalityos. The Python import package and CLI module remain named causality:

import causality

print(causality.__version__)

CLI Overview

causality analyze .
causality investigate .
causality reason .
causality verify . --dry-run
causality causal . --json
causality diagnose .
causality fix .
causality llm status

Core command groups:

  • analyze: project structure, language counts, Git summary, code summary, and test discovery.
  • git: recent commits, commit details, file history, hotspots, and repository stats.
  • code: Python AST summaries, dependency graph, and impact analysis.
  • tests: pytest discovery, test execution, and test history.
  • logs: log level counting and error pattern fingerprinting.
  • investigate: multi-layer evidence collection.
  • reason: deterministic, evidence-grounded root-cause hypotheses.
  • verify: isolated Git worktree counterfactual verification.
  • causal: multi-evidence causal correlation.
  • diagnose: end-to-end autonomous diagnosis.
  • fix: autonomous repair proposal and isolated repair experiment.
  • llm: local LLM provider status.

Configuration

CausalityOS has no required API keys. The optional local LLM explanation layer uses Ollama through Python standard-library HTTP calls.

Optional environment variables:

  • CAUSALITY_LLM_PROVIDER: ollama by default, or mock for tests.
  • CAUSALITY_LLM_HOST: defaults to http://localhost:11434.
  • CAUSALITY_LLM_MODEL: defaults to qwen2.5:3b.
  • CAUSALITY_LLM_TIMEOUT: request timeout in seconds.

To use local LLM explanations, install Ollama separately and pull the configured model:

ollama pull qwen2.5:3b
causality llm status

Deterministic analysis works without Ollama.

Runtime Requirements

  • Python 3.11 or newer
  • Runtime Python packages: typer, rich
  • External command-line tools for selected features:
    • git for Git intelligence and counterfactual worktrees
    • pytest in the analyzed project environment when running causality tests run, verify, diagnose, or fix

Development extras are separate from runtime dependencies:

python -m pip install -e ".[test]"
python -m pip install -e ".[dev]"

Release Build

Build local distributions:

python -m build

Install a generated wheel into a clean environment:

python -m pip install dist/causalityos-0.10.0-py3-none-any.whl

Safety Model

CausalityOS avoids modifying the user's main working tree during analysis and verification. Counterfactual experiments use isolated Git worktrees or temporary directories. The fix command runs in safe mode by default and only applies a verified repair when --apply is explicitly passed.

Supported Platforms

CausalityOS is intended to run on Windows, macOS, and Linux with Python 3.11+. The code uses pathlib and platform-independent subprocess APIs.

Limitations

  • Python code intelligence is currently AST-based static analysis.
  • Runtime test intelligence uses pytest.
  • Git-dependent commands require a Git executable on PATH.
  • LLM explanations require a separately installed local Ollama service.

License

license = "MIT"

Download files

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

Source Distribution

causalityos-0.10.0.tar.gz (67.4 kB view details)

Uploaded Source

Built Distribution

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

causalityos-0.10.0-py3-none-any.whl (86.4 kB view details)

Uploaded Python 3

File details

Details for the file causalityos-0.10.0.tar.gz.

File metadata

  • Download URL: causalityos-0.10.0.tar.gz
  • Upload date:
  • Size: 67.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.10

File hashes

Hashes for causalityos-0.10.0.tar.gz
Algorithm Hash digest
SHA256 65b68b9265965393d24af0b1cdfbf61eefdecc0952f2f3617e00905b21fe6e5a
MD5 116d74e8501beb4fee2c372ef164d274
BLAKE2b-256 4710522efcb146c573010862c6253eec21192c9c0840b1c82e093636f0dab145

See more details on using hashes here.

File details

Details for the file causalityos-0.10.0-py3-none-any.whl.

File metadata

  • Download URL: causalityos-0.10.0-py3-none-any.whl
  • Upload date:
  • Size: 86.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.10

File hashes

Hashes for causalityos-0.10.0-py3-none-any.whl
Algorithm Hash digest
SHA256 40052d43bd6132223d1afdd222a463c0efdb578612c00cba48b27c7d15b4c563
MD5 bc6ce384e0d2d8e3e21fd067bbbd9c3a
BLAKE2b-256 54d89f4d86f53a119163cf60632852a63ed08da681e472de60364ef402d5d4cf

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.10.0 This release

2 files

Supported by

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