Metadata-Version: 2.4
Name: muni
Version: 0.2.3
Summary: Muni CLI — manage tools, jobs, spaces, and more
Author-email: BioArena <support@muni.bio>
License-Expression: MIT
Project-URL: Homepage, https://muni.bio
Project-URL: Repository, https://github.com/bioArena/muni-cli
Project-URL: Issues, https://github.com/bioArena/muni-cli/issues
Keywords: bioarena,muni,cli,bioinformatics,protein-design
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Science/Research
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.11
Description-Content-Type: text/markdown
Requires-Dist: realtime<3,>=2.28.0
Provides-Extra: completion
Requires-Dist: argcomplete>=3; extra == "completion"

# Muni CLI

Muni is the command-line interface for the Muni platform. Use it to discover available
tools, submit jobs, monitor runs, download outputs, and work with spaces and
canvas nodes from your terminal.

## Install

```bash
pipx install muni
```

Or install into an existing environment:

```bash
pip install muni
```

Requires Python 3.11 or newer.

## Log in

```bash
muni login
```

On a server or SSH session without a browser:

```bash
muni login --device
```

Check the active account:

```bash
muni whoami
```

## Common Workflow

Find a tool:

```bash
muni tools
muni tools --category protein-design
muni tools -q rfd3
```

Inspect tool inputs:

```bash
muni tool rfd3 --inputs
muni tool rfd3 --examples
```

Submit a job:

```bash
muni run rfd3 pdb_id=1UBQ num_designs=5
```

Submit and wait for completion:

```bash
muni run rfd3 pdb_id=1UBQ num_designs=5 --follow
```

Submit parameters from JSON:

```bash
muni run rfd3 --params-file params.json --follow
```

Run a batch from JSONL:

```bash
muni run ipsae --batch jobs.jsonl --follow
cat jobs.jsonl | muni run ipsae --batch - --follow
```

Check status and retrieve outputs:

```bash
muni status job_<uuid>
muni wait job_<uuid>
muni results job_<uuid>
muni results job_<uuid> --fields rank,sequence
muni files job_<uuid>
muni download-all job_<uuid> -o ./results/
```

## Pipeline Workspaces

Create and validate an agent-ready pipeline workspace:

```bash
muni pipeline init ./my-pipeline
cd ./my-pipeline
muni pipeline check --json
```

The JSON check response is compact by default: it reports pipeline identity,
tools, stage order, issues, compiler provenance, artifact digests, and written
paths. The complete manifest and run plan are still written under
`.muni/build/`; use `muni pipeline check --json --full` when those large values
must also be returned on stdout. `muni pipeline dashboard push` compiles and
saves dashboard source through the canonical Muni app/Canvas path, then writes
the full server-returned artifact locally while printing only a bounded
hash/version/diagnostics summary. Successful checks record a short-lived server
receipt, and `muni pipeline release` obtains and submits a fresh receipt before
publishing.

## Spaces and Canvas Nodes

List and choose a workspace:

```bash
muni spaces
muni spaces -q protein --limit 50
muni spaces --roles       # show your email and role in each space
muni spaces --all --json  # fetch every matching page
muni space use             # choose interactively
muni space use "My Space"  # or pass a name/ID
muni page use              # choose a page in the active space
```

Once selected, `muni run`, `muni job materialize`, `muni nodes`, and
`muni node` default to that active space/page. Canvas-targeted `muni run`
creates and submits a real job node so completion can add deterministic result
nodes to the canvas. Use `--space-id` or `--page-id` to override one command,
or `muni space use none` / `muni run ... --no-space` for API-only jobs.

Control result-node creation explicitly when needed:

```bash
muni run rfd3 pdb_id=1UBQ --auto-materialize
muni run rfd3 pdb_id=1UBQ --no-auto-materialize
```

`--auto-materialize` requires a selected space/page and cannot be combined with
`--no-space`, `--no-nodes`, or the legacy `--no-result-nodes` flag. Omitting
both Boolean flags preserves the existing default.

List nodes on the active page:

```bash
muni nodes
muni nodes search "PXDesign"
```

Create or inspect nodes:

```bash
muni node create table "Results"
muni node create structure "TREM2 rank 1" --file ./rank_1.cif
muni node read <node_id>
muni node submit <node_id> --wait
```

## Command Reference

| Command | What it does |
| --- | --- |
| `muni login` | Authenticate the CLI |
| `muni whoami` | Show the current account |
| `muni balance` | Show credit balance |
| `muni tools` | List available tools |
| `muni tool <name>` | Show details for one tool |
| `muni run <tool> KEY=VALUE` | Submit a job |
| `muni jobs` | List recent jobs |
| `muni jobs --tool ipsae` | Filter recent jobs by tool |
| `muni status <job_id>` | Check a job |
| `muni wait <job_id>` | Wait for one or more jobs |
| `muni results <job_id>` | Print job results |
| `muni files <job_id>` | List job output files |
| `muni download <job_id> <path>` | Download one output file |
| `muni download-all <job_id>` | Download all output files |
| `muni spaces` | List spaces with pagination |
| `muni spaces -q <query>` | Search spaces by name or member email |
| `muni spaces --roles` | List spaces with your email and role |
| `muni space <subcommand>` | Manage a space |
| `muni nodes` | List canvas nodes |
| `muni node <subcommand>` | Create, read, edit, connect, or run nodes |

Run `muni --help` or `muni <command> --help` for the full set of options.

## License

MIT
