Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
b5181a5
feat(tui): add interactive Terminal UI for mmore commands
perrin-arthur May 8, 2026
d85be08
fix(tui): address PR review feedback
perrin-arthur May 9, 2026
bbb5d91
feat(tui): full-pipeline wizard, extras detection, cancel-vs-quit
perrin-arthur May 12, 2026
628ca18
fix(tui): rename CancelledByUser→UserCancelledError, apply ruff format
perrin-arthur May 12, 2026
b2bae0a
Merge branch 'swiss-ai:master' into feat/tui
perrin-arthur May 12, 2026
9d996fa
fix: adding wizard config for single command
perrin-arthur May 12, 2026
09589e6
Merge branch 'feat/tui' of https://github.com/perrin-arthur/mmore int…
perrin-arthur May 12, 2026
c303eee
docs: for_devs updated
perrin-arthur May 12, 2026
61b773e
feat(tui): config preview, JSONL inspector, incremental resume, $EDIT…
perrin-arthur May 12, 2026
f521702
disable commands when pipeline extras are missing | big fix
Gsharpp May 12, 2026
0d78172
fix(tui): address Copilot review comments
perrin-arthur May 13, 2026
bb80849
fix(tui): expose merged_results_path helper in run_process + uv.lock
Gsharpp May 17, 2026
244a972
remove spinner + expose merged_results_path helper
Gsharpp May 18, 2026
072901b
warm pipeline dataclasses + factor run_step helper + update .gitignore
Gsharpp May 18, 2026
d665ee9
feat(tui): add setup wizard for deps install and .env generation
perrin-arthur May 19, 2026
47b8b12
style(tui): match GitHub logo colors in banner
perrin-arthur May 19, 2026
ca5479d
fix(tui): ruff lint and format
perrin-arthur May 19, 2026
a7fe73f
center banner, centralize _ask, add int/float prompts
Gsharpp May 22, 2026
c7f67c4
Update paper link from OpenReview to arXiv
fabnemEPFL May 12, 2026
d3fd965
Fix tests not passing in CI (#304)
JCHAVEROT May 13, 2026
c5415a2
Fix consumed file ID when upload fails (#299)
JCHAVEROT May 19, 2026
ca412b1
Fix #288 (#307)
fabnemEPFL May 19, 2026
4860624
Add workflow for Pyright type check (#300)
JCHAVEROT May 20, 2026
3bbf489
Merge remote-tracking branch 'origin/master' into feat/tui
JCHAVEROT May 28, 2026
9f4a0bf
address JCHAVEROT review comments on TUI
perrin-arthur May 28, 2026
1a68bd8
Update setup choice text in app.py
perrin-arthur May 28, 2026
25fcd5a
chores: fix linter
JCHAVEROT May 28, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ venv.bak/
# Milvus DB
db/
*.db
*.db.lock

# Project files
tmp/
Expand Down
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,22 @@ uv pip install "mmore[process,cpu]"

> :warning: **Check the instructions for contributors directly at [`docs/for_devs.md`](./docs/for_devs.md)**

### Interactive TUI

Prefer a guided experience over editing YAML by hand? Install the `tui` extra and launch the interactive Terminal UI:

```bash
uv sync --extra tui
mmore tui
```

From the launcher you can:

- run any stage (process / postprocess / index / rag / chat) interactively,
- chain the full pipeline (process → postprocess → index → chat),
- generate stage YAML configs through a guided wizard,
- pick from existing example configs without leaving the terminal.

### Minimal Example

You can use our predefined CLI commands to execute parts of the pipeline. Note that you might need to prepend `python -m` to the command if the package does not properly create bash aliases.
Expand Down
20 changes: 20 additions & 0 deletions docs/source/developer_documentation/for_devs.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ This guide will help you set up your development environment and contribute to t
- [Writing tests](#writing-tests)
- [🔀 Pull Request Process](#-pull-request-process)
- [PR checklist](#pr-checklist)
- [🖥️ Interactive TUI](#️-interactive-tui)
- [💡 Development tips](#-development-tips)
- [Working with `uv`](#working-with-uv)
- [❓ Questions](#-questions)
Expand Down Expand Up @@ -256,6 +257,25 @@ def test_something_on_gpu():
- [ ] Examples are provided for new features
- [ ] Commit messages are clear and descriptive

## 🖥️ Interactive TUI

MMORE ships with a Terminal UI that wraps the CLI commands behind guided menus and config wizards. Useful for trying the pipeline without writing YAML by hand.

Launch it from a project working directory:

```bash
mmore tui
```

From the main menu you can:

- **Run a single command** — pick any stage (`process`, `postprocess`, `index`, `retrieve`, `rag`, `ragcli`, `websearch`), then either select an existing YAML, generate one through a guided wizard, or type a path manually. Generated configs are written to `./tui-configs/` and validated against the stage's dataclass before running.
- **Run full pipeline** — chains `process → postprocess → index` using existing configs.
- **Build a full pipeline config (guided wizard)** — walks through the three stages in order, wiring the postprocess output JSONL into the index config automatically.
- **Chat with indexed documents** — shortcut to `ragcli`.

Stages whose extras are missing are disabled in the menu with an install hint (e.g. `uv sync --extra rag --extra cpu`). Press `Ctrl-C` inside any sub-flow to cancel back to the main menu; press it again at the main menu to quit.

## 💡 Development tips

### Working with `uv`
Expand Down
11 changes: 9 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ dependencies = [
"python-dotenv>=1.0",
"typing_extensions>=4.15.0,<5.0",
"PyYAML>=6.0",
"setuptools<81"
"setuptools<81",
]

[project.optional-dependencies]
Expand Down Expand Up @@ -128,8 +128,15 @@ api = [

# --- Composite + variant extras ---

tui = [
# Interactive terminal launcher (`mmore tui`)
"questionary>=2.0",
"rich>=13",
"uv",
]
Comment thread
fabnemEPFL marked this conversation as resolved.

all = [
"mmore[process,rag,api,websearch]",
"mmore[process,rag,api,websearch,tui]",
]

cpu = [
Expand Down
13 changes: 13 additions & 0 deletions src/mmore/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,19 @@ def ragcli(config_file: str):
my_rag_cli.launch_cli()


@main.command()
def tui():
"""Launch the interactive Terminal UI."""
try:
from .tui import run
except ModuleNotFoundError as e:
if e.name in ("questionary", "rich", "prompt_toolkit"):
click.echo("TUI dependency missing. Install with: uv sync --extra tui")
raise SystemExit(1)
raise
run()
Comment thread
JCHAVEROT marked this conversation as resolved.


@main.group()
def colpali():
"""ColPali pipeline commands for PDF processing, indexing, and retrieval."""
Expand Down
14 changes: 11 additions & 3 deletions src/mmore/run_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,19 @@ class ProcessInference:
previous_results: Optional[str] = None


def merged_results_path(output_path: str) -> str:
"""Path where `process` writes its final merged JSONL.

Single source of truth for downstream tooling (TUI, scripts) that needs
to locate the JSONL produced by a `process` run from its config.
"""
return os.path.join(output_path, "merged", "merged_results.jsonl")


def _write_merged_results(output_path, reused_samples, dispatched=True):
"""Merge per-processor JSONL files and reused samples into a single output."""
merged_output_path = os.path.join(output_path, "merged")
output_file = os.path.join(merged_output_path, "merged_results.jsonl")
os.makedirs(merged_output_path, exist_ok=True)
output_file = merged_results_path(output_path)
os.makedirs(os.path.dirname(output_file), exist_ok=True)

total_results = 0
with open(output_file, "w") as f:
Expand Down
3 changes: 3 additions & 0 deletions src/mmore/tui/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from mmore.tui.app import run

__all__ = ["run"]
Loading
Loading