Documentation
Everything you need to get started with the MTHDS hub and CLI.
What are Methods?
Methods are reusable AI pipelines and workflows. You can install, share, and run them to compose AI tasks in a structured, reproducible way.
Repository Structure
Methods are installed from public GitHub repositories. A method repository follows a simple convention: a methods/ folder at the root, with each subfolder representing a package of methods. Each subfolder must contain a valid METHODS.toml manifest along with all the .mthds files that make up the package.
Method names are snake_case (e.g., doc_summarizer). The directory name must match the name field exactly.
my-repo/
└── methods/
├── doc_summarizer/ # name = "doc_summarizer"
│ ├── METHODS.toml
│ ├── summarize.mthds
│ └── summarize_batch.mthds
└── classifier/ # name = "classifier"
├── METHODS.toml
└── classify.mthdsRunning npx mthds install installs all valid packages found in the repository's methods/ folder. You can use either the short address (org/repo) or the full GitHub URL. To install a single package, use the --method flag:
npx mthds install org/repo --method <name>npx mthds install https://github.com/org/repo --method <name>METHODS.toml
Every package is described by a METHODS.toml manifest that declares metadata, dependencies, and exports. The optional main_pipe field designates the package's entry point — the pipe that runs when you invoke npx mthds run method <name>. It must reference a pipe listed in the [exports] section. Here is an example:
[package]
name = "doc_summarizer"
address = "github.com/acme/summarizer"
version = "1.0.0"
description = "Summarize long documents into concise bullet points."
authors = ["Alice <alice@acme.com>"]
license = "MIT"
main_pipe = "summarize"
[exports.summarization]
pipes = ["summarize", "summarize_batch"]CLI
The mthds CLI lets you install, set up, and run methods from your terminal.
Install all packages from a GitHub repo
npx mthds install org/repoOr use the full GitHub URL
npx mthds install https://github.com/org/repoInstall a single method by name
npx mthds install org/repo --method <name>Install from a local directory
npx mthds install --local /path/to/repoSet up a runner
npx mthds runner setup <runner>Execute a method
npx mthds run method <name>Rankings
Methods on the hub are ranked by number of installs. The most installed methods appear first on the home page. Each valid package in a repository gets its own entry in the rankings.
Only installs from public GitHub repositories are tracked and appear in the rankings. Local installs (--local) and private repositories are never sent to the hub.
To add a new method to the rankings, install it with the CLI. It will appear in the hub within a few minutes.
Publishing Updates
When a method is first installed from a public GitHub repository, the hub validates the .mthds files and generates a flowchart diagram. After that, re-validation and diagram regeneration are only triggered when the version changes.
The hub checks for version changes every minute. If the version in your METHODS.toml has not changed since the last check, nothing happens — the hub does not re-fetch files or re-validate. This means you must bump the version to publish any update, even if you only changed pipe definitions or fixed a typo.
# 1. Update the version in METHODS.toml
[package]
version = "1.1.0" # bumped from 1.0.0
# 2. Re-install to publish the update
npx mthds install org/repo --method my_methodAfter a version bump and install, the hub will re-validate all .mthds files, update the validation status badge, and regenerate the pipeline diagram within a few minutes.
Telemetry
When you install a method from a public GitHub repository, the CLI sends an anonymous event with the package metadata (name, address, version, description, and manifest data) to power the hub rankings. No personal or device information is collected.
No telemetry is sent for local installs (--local) or private repositories.
You can disable telemetry entirely with the CLI or by setting DISABLE_TELEMETRY=1 in ~/.mthds/.env.local. You can also prefix any command with the environment variable:
npx mthds telemetry disableor
DISABLE_TELEMETRY=1 npx mthds install org/repo