cli
slmn <tool> [args...] dispatcher – one binary, one shell permission, every tool below reachable by name. Tools are plain functions from the other notebooks (nbtools, misc, remote); this notebook just routes argv to them and prints what they return.
The tool registry
TOOLS is the single source of truth for what slmn can dispatch: a name -> function map. Adding a tool here (and, if you want it over MCP, to the list in 03_mcp.ipynb) is all it takes to wire it up – the dispatcher below is generic.
argv -> function dispatch
main() looks the tool up by name and hands the rest of argv to _call_cli, which parses it against the function’s own type-hinted signature (via fastcore’s anno_parser) – so each tool’s parameters are its command-line flags, no per-tool arg-parsing code. insert_cells is the one special case: its sources argument is a list, which doesn’t map cleanly onto flags, so those cells are read from stdin instead.
main
def main():Entry point for the slmn console script: slmn <tool> [args...]. Prints the tool’s return value (if any); tools themselves never print.