Metadata-Version: 2.4
Name: causality-ai
Version: 0.1.0a1
Summary: Plain-text character, word, and line counts
License-Expression: MIT
Classifier: Development Status :: 3 - Alpha
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# causality-ai

Version 0.1.0a1 is a small, standalone plain-text statistics utility. It reports
character, word, and line counts. This alpha has no causal-inference or machine
learning functionality. Python 3.11 or later; no third-party dependencies.

```sh
python -m pip install causality-ai==0.1.0a1
causality-ai notes.txt
printf 'hello world\n' | causality-ai -
```

```python
from causality_ai import text_stats

assert text_stats("hello world\n") == {"characters": 12, "words": 2, "lines": 1}
```

Characters are Unicode code points, including newline characters, rather than
bytes or displayed glyphs. Words are whitespace-separated tokens (`str.split`).
Lines follow `str.splitlines`: empty text has zero lines and a trailing newline
does not add an empty line. Files must be UTF-8; file bytes are decoded without
newline conversion. The utility reads the whole text into memory.

The command prints a JSON object. Missing files or invalid UTF-8 produce an error
on stderr and exit status 2. `python -m causality_ai` is also supported.

The API may change during alpha development. Licensed under MIT; see LICENSE.
