Metadata-Version: 2.4
Name: mira-transplier
Version: 0.1.0
Summary: LLM context transpiler that builds a synced .mira workspace view for codebases.
Author: Ramunas
Keywords: llm,codebase,transpiler,context,cli
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Operating System :: Microsoft :: Windows
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Software Development :: Documentation
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.10
Description-Content-Type: text/markdown

# mira-transplier

`mira-transplier` turns a script or repository into a synced `.mira` view that is easier for coding agents and LLMs to navigate with less noise.

## What MIRA builds

When you run MIRA on a folder, it generates a `.mira` directory with:

- `project.mira` for the compact file tree and public command surface
- `GUIDE.txt` for public commands plus admin commands
- per-file chunk metadata, skeletons, and indexes
- history baselines and runtime state for edits and managed terminals

MIRA keeps source and `.mira` in sync, supports history and restore, and works with regular code files, metadata-only document files, and generic 100-line chunking for unsupported text formats such as `.java`.

## Install

```bash
pip install mira-transplier
```

## Basic usage

Build the `.mira` view for the current folder:

```bash
mira .
```

Build a different folder:

```bash
mira path/to/project
```

Run a MIRA command from inside a built workspace:

```bash
mira !project
mira !list
mira !expand 12_3
mira !edit 12_3+ "new lines"
```

If inline text is omitted and stdin is piped, MIRA reads the piped text automatically.

## Main command groups

- project navigation: `!project`, `!explore`, `!expand`, `!find_line`, `!search`
- edits and history: `!edit`, `!diff`, `!history`, `!restore`
- workspace metadata: `!memory`, `!goals`, descriptions
- managed terminals: `!terminals`, `!terminal`

## Admin commands

Admin commands stay in `.mira/GUIDE.txt` and are hidden from the public command surface.

- `!index`, `!index add <path>`, `!index remove <path>`
- `!environment [path|clear]`

`!environment` lists detected virtual environments in the workspace by checking for activation scripts in `Scripts`. You can also configure a custom environment root with a full absolute path. Once configured, `project.mira` shows the selected environment as:

```text
ENVIRONMENT: .venv (C:\path\to\workspace\.venv)
```

## Notes

- folder indexing is shallow: subfolders need their own index entry
- dotfiles are ignored by default except `.gitignore`
- `!create` and `!delete` accept relative paths, leading-slash paths, and absolute workspace paths
- `!delete` also accepts file IDs

## Requirements

- Python 3.10+
- Windows is the primary tested target right now
