from slmn.misc import gpu_free
gpu_free()2
slmn CLI, or expose them over an optional MCP server (slmn-mcp) for any MCP-speaking client.
slmn is a small collection of independent tools, each in its own notebook/module:
| module | what it does |
|---|---|
nbtools |
read, grep, and edit Jupyter notebook cells by id – no hand-rolled JSON surgery |
misc |
read a PDF’s text; check whether a local GPU is free |
remote |
launch and monitor background jobs on a remote host over ssh; fetch a URL; check a repo’s GitHub CI |
[publish](https://drscotthawley.github.io/slmn/publish.html#publish) |
automate the nbdev edit->ship loop: clean/export, a reviewed commit, push, wait for CI, and (on a feature branch) merge a PR to main |
dead_drop |
file-based async IPC – one side drops a message file, another picks it up (with a streaming variant) |
cli |
the slmn <tool> [args...] dispatcher that exposes all of the above from the shell |
mcp |
an optional server exposing the same tools to any MCP client (slmn-mcp) |
Every tool is a plain, type-hinted function. That single definition is what the CLI turns into command-line flags and what the MCP server turns into a tool schema – so the three ways to call a tool (below) never drift apart.
slmn isn’t on PyPI or conda yet, so install it from GitHub. The default install is “lite” – just the tools and the slmn CLI:
The MCP server is optional; add the mcp extra if you want it (it pulls in fastmcp and friends):
The same tools are reachable three ways.
Import them directly:
From the shell, via the slmn dispatcher (run slmn with no arguments for the tool list):
Over MCP (with the mcp extra installed), registered with any MCP-speaking client:
Full documentation is hosted on the project’s GitHub pages; the source for each page is the correspondingly-named notebook under nbs/.
slmn is built with nbdev: the notebooks under nbs/ are the source of truth, and the slmn/ package is generated from them. To hack on it, install in editable mode:
Edit the notebooks, then regenerate the package, run the tests, and ship – all via slmn’s own publish tool (nbdev-clean/export -> reviewed commit -> push -> wait for CI -> merge a PR to main):