LLM context transpiler that builds a synced .mira workspace view for codebases.
Project description
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.mirafor the compact file tree and public command surfaceGUIDE.txtfor 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 adaptive generic chunking for unsupported text formats such as .java.
Install
pip install mira-transplier
Basic usage
Build the .mira view for the current folder:
mira .
Build a different folder:
mira path/to/project
Run a MIRA command from inside a built workspace:
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.
You only need to run mira . once per workspace. After that, MIRA syncs source edits, chunk edits, creates, deletes, comments, and environment changes back into .mira automatically.
Later syncs only reparse touched source files, keep stable file IDs, and rewrite only the generated .mira artifacts whose content actually changed.
Main command groups
- project navigation:
!project,!explore,!expand,!find_line,!search - edits and history:
!edit,!diff,!history,!restore - workspace metadata:
!memory,!goals, descriptions, chunk comments - 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|create <name>]
!environment lists detected virtual environments in the workspace by checking for activation scripts in Scripts. !environment create <name> creates a new virtual environment directly in the workspace root and configures it immediately. You can also configure a custom environment root with a full absolute path. Once configured, project.mira shows the selected environment as:
ENVIRONMENT: .venv (C:\path\to\workspace\.venv)
Chunk comments
Chunk comments are metadata, not source code. They appear in skeleton structure lines and stay attached when the commented chunk keeps the same code but moves to a different chunk ID.
!add_comment <chunk_id> [text]!edit_comment <chunk_id> [text]!delete_comment <chunk_id>
When a commented chunk is edited and its code changes, MIRA prompts to update the comment. When edited or inserted chunks do not have a comment yet, MIRA can prompt to add one.
Generic chunking
Unsupported code-like text files use adaptive generic chunking.
- target chunk size: 100 lines
- minimum preferred size before cutting early: 80 lines
- hard maximum when no blank boundary exists: 500 lines
- chunk boundaries prefer blank lines, and can extend up to 50 extra lines to land on a double-blank boundary
- blank separator lines stay at the end of the previous chunk so the next chunk does not begin with empty lines
Notes
- folder indexing is shallow: subfolders need their own index entry
- dotfiles are ignored by default except
.gitignore !createand!deleteaccept relative paths, leading-slash paths, and absolute workspace paths!deletealso accepts file IDs
Requirements
- Python 3.10+
- Windows is the primary tested target right now
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mira_transplier-0.3.0.tar.gz.
File metadata
- Download URL: mira_transplier-0.3.0.tar.gz
- Upload date:
- Size: 48.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
42b88511ff9215ccf7f0486efc3b37d2804fa4e7668033c93661e6240c42a03b
|
|
| MD5 |
a0c1cff77ea6016aa0c55c3ad2699201
|
|
| BLAKE2b-256 |
a3324dca06556e4fb993cf7ec9eb652be8afcd9a304c73c64b677917ca8a07e0
|
File details
Details for the file mira_transplier-0.3.0-py3-none-any.whl.
File metadata
- Download URL: mira_transplier-0.3.0-py3-none-any.whl
- Upload date:
- Size: 49.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5fa0af047bd3f35e4af9f28e626f858c750b98260a0c8dc7103cc4db441b9f34
|
|
| MD5 |
b9723e5993c10ffda95004f1591c1068
|
|
| BLAKE2b-256 |
0490fd1c70f453b0d97b8094c41f7855fcdca8ce667abc4c1cfdde7331b3e7d1
|