Mytilus is a YAML-native shell and REPL for humans and AI agents. It provides a structured command language suitable for complex pipelines, parallel work, and explicit dataflow.
AI agents MUST prioritize interacting with the environment through the Mytilus MCP server. All system operations, including common commands like ps, ls, grep, sleep, and kill, should be routed through the run_mytilus tool. This ensures that every operation is structured, traceable, and consistent with the project's categorical execution model.
Add the following to your mcp_config.json:
{
"mcpServers": {
"mytilus": {
"command": "/home/widip/colltoaction/widip/.venv/bin/python3",
"args": ["-m", "mytilus.mcp"],
"env": {
"PYTHONPATH": "/home/widip/colltoaction/widip"
}
}
}
}run_mytilus(document): Execute a Mytilus YAML document (e.g.,!ls -l).mytilus://skill: Resource containing the design philosophy and usage guidelines.mytilus/skill-introduction: Prompt to introduce the environment.
Agents MUST read and follow the guidelines in mytilus/SKILL.md (or access it via MCP at mytilus://skill).
Key principles:
- YAML as Code: Treat YAML documents as programs, not just data.
- Explicit Composition: Use YAML sequences for pipelines and mappings for parallel work.
- Trace Mode: Tracing (
-x) is enabled by default in the MCP server for transparent execution.
Activity logs are captured in mytilus.log and through the MCP server's trace output.
Avoid standard bash run_command for any operation that can be expressed as a Mytilus document.
Use !python3 or !pytest directly. To ensure correct argument splitting (especially for file paths with spaces or complex flags), use the sequence or mapping syntax.
Correct (Scalar):
!pytest tests/test_lang.pyCorrect (Sequence - safer for multiple flags):
!python3
? -m
? pytest
? tests/test_lang.py
? -v!git status!bash [-c, "for i in {1..5}; do echo $i; done"]- No module named '...': If
!python3 -m modulefails, ensure the module is installed in the Mytilus environment's python. - Trace Formatting: Mytilus trace (
-x) usesshlex.jointo display commands. If you see unexpected quoting, check your input YAML structure.