Metadata-Version: 2.4
Name: neurobyte
Version: 0.1.1
Summary: Export Jupyter notebooks into narrated, cell-labeled text.
Author: Pedro Paris
License: MIT
Requires-Python: >=3.11
Requires-Dist: nbformat>=5.10.4
Requires-Dist: typing-extensions>=4.10.0
Provides-Extra: dev
Requires-Dist: black>=24.0.0; extra == 'dev'
Requires-Dist: mypy>=1.8.0; extra == 'dev'
Requires-Dist: pytest>=8.0.0; extra == 'dev'
Requires-Dist: ruff>=0.6.0; extra == 'dev'
Requires-Dist: types-setuptools; extra == 'dev'
Provides-Extra: ipython
Requires-Dist: ipython>=8.20.0; extra == 'ipython'
Description-Content-Type: text/markdown

# Neurobyte

**Export Jupyter notebooks into narrated, cell-labeled text for LLM contexts.**

## Features

*   **Clean Export**: Extracts code cells from `.ipynb` files.
*   **Narrative Summary**: Generates a header paragraph summarizing the code's intent.
*   **Neurobyte Outline**: Adds a structured outline with markdown headers.
*   **Redaction**: Automatically redacts sensitive patterns (API keys, BQ table IDs).
*   **JSON Output**: Machine-readable format for indexing and search.
*   **Markdown Cells**: Include `# headers` in the outline.
*   **Custom Redaction**: Add your own regex patterns.
*   **Cell Selection**: Export specific cell ranges.

## Installation

```bash
pip install neurobyte
```

## Usage

### CLI

```bash
# Basic export
python -m neurobyte export notebook.ipynb

# Specify output file
python -m neurobyte export notebook.ipynb -o summary.txt

# JSON output
python -m neurobyte export notebook.ipynb --json

# Include markdown cells
python -m neurobyte export notebook.ipynb --include-markdown

# Custom redaction pattern
python -m neurobyte export notebook.ipynb --redact-pattern 'client_id=\d+'

# Export specific cells
python -m neurobyte export notebook.ipynb --cells 1-5

# Disable redaction
python -m neurobyte export notebook.ipynb --no-redact
```

### Python API

```python
import neurobyte as nb
from neurobyte.export import ExportOptions

# Basic export
nb.export_notebook("notebook.ipynb", "export.txt")

# With options
opts = ExportOptions(
    output_format="json",
    include_markdown=True,
    redact_secrets=True,
    extra_redact_patterns=["client_id=\\d+"],
    cell_indices=[1, 2, 3],
)
nb.export_notebook("notebook.ipynb", "export.json", options=opts)

# Export from live session (requires IPython)
nb.export_here("session.txt")
```
