/cmf:cmf-initfrom cmf
Sets up CMF in a project: creates Python environment, installs cmflib, and configures storage backend (local, S3, MinIO, SSH, OSDF). Linux only.
Ships in cmf. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
macOS is not supported. cmflib does not install or run on macOS. See open issues #185 and #263 for status. Use a Linux machine or a Linux VM/container instead.
Install cmflib into a Python environment, initialize a storage backend, and verify the setup. If CMF is already initialized, skip to Verify initialization.
CMF requires Python 3.9–3.11 (3.10 recommended).
Detect available tools and ask the user which they prefer:
which uv && echo "uv available" || echo "uv not found"
which conda && echo "conda available" || echo "conda not found"
# venv is always available via Python's standard library
| Tool | Priority | Command |
|---|---|---|
| uv | Preferred — offer to install if missing | uv venv .cmf --python 3.10 && source .cmf/bin/activate |
| conda | Next — use if uv unavailable | conda create -n cmf python=3.10 && conda activate cmf |
| venv | Always available fallback | python3.10 -m venv .cmf && source .cmf/bin/activate |
If uv is not installed, offer to install it (manages Python versions automatically):
curl -LsSf https://astral.sh/uv/install.sh | sh # Linux
# or: pip install uv
If none of the above apply, skip environment creation and install directly with pip install cmflib (requires system Python 3.9–3.11).
See references/init-commands.md for full OS-specific setup and a guided walkthrough.
pip install cmflib
python -c "from cmflib.cmf import Cmf; print('OK')"
| Backend | Use when |
|---|---|
local | Single-machine development |
minios3 | Shared MinIO server (S3-compatible) |
amazons3 | AWS S3 production storage |
sshremote | Artifacts on a remote machine over SSH |
osdfremote | OSDF distributed research data federation |
cmf initcmf init local \
--path /path/to/artifact-storage \
--git-remote-url https://github.com/your-org/your-repo.git
Optional: add --cmf-server-url http://<server>:80 to point at a shared CMF Server.
# MinIO
cmf init minios3 \
--url http://<minio-host>:9000 \
--endpoint-url http://<minio-host>:9000 \
--access-key-id <key> \
--secret-access-key <secret> \
--git-remote-url https://github.com/your-org/your-repo.git
# Amazon S3
cmf init amazons3 \
--url s3://your-bucket/path \
--access-key-id <key> \
--secret-access-key <secret> \
--git-remote-url https://github.com/your-org/your-repo.git
cmf init sshremote \
--path ssh://user@host:/path/to/storage \
--git-remote-url https://github.com/your-org/your-repo.git
Three authentication options — see references/init-commands.md for full parameter table.
Option 1 — pre-generated token (recommended):
cmf init osdfremote \
--path https://fdp-origin.labs.hpe.com:8443/fdp-hpe/cmf_test \
--cache https://osdf-director.osg-htc.org/ \
--access-token ~/.fdp/osdf_token \
--git-remote-url https://github.com/your-org/your-repo.git
cmf init show # should display remote, git URL, and optional server URL
The mlmd file is created automatically on the first pipeline run, not by cmf init itself.
cmf: command not found — ensure the virtual environment is activated; verify with cmf --versionpython --version; create a new env targeting 3.10 (uv venv .cmf --python 3.10 or conda create -n cmf python=3.10)python3.10 not found (venv) — install via system package manager (sudo apt install python3.10) or use uv/conda which manage Python versions automaticallygit remote add origin <url> firstdvc --version; reinstall with pip install cmflib--url matches the server address and port--path; contact your OSDF origin administratorDocs: Getting Started · Storage Backends · OSDF Setup · Full Tutorial
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
7 skills in this plugin
/cmfUse when working with the Common Metadata Framework (CMF) — initializing CMF in a project, instrumenting ML pipeline code, syncing metadata and artifacts with a CMF Server, querying lineage and artifacts, or setting up the CMF MCP server for AI assistant integration. Routes to the appropriate specialized skill based on the task.
/cmf-instrumentUse when adding CMF metadata tracking to existing Python ML pipeline code, or writing new CMF-instrumented pipeline stages from scratch. Covers the Cmf() API: create_context, create_execution, log_dataset, log_model, log_metric, commit_metrics, log_execution_metrics, and finalize(). Includes copy-paste templates for common ML pipeline stages.
/cmf-mcpUse when setting up the CMF MCP server so an AI coding assistant can query CMF metadata using natural language, or when the CMF MCP server is already running and the user wants to use it from their coding agent. Covers Docker deployment, per-agent configuration (Claude Code, GitHub Copilot, Cursor, Codex), and example prompts.
/cmf-queryUse when querying CMF metadata programmatically — listing pipelines, stages, executions, artifacts; tracing lineage; comparing hyperparameters across runs; or exporting metadata for analysis. Uses the CmfQuery Python API or CLI listing commands.
/cmf-serverUse when deploying the CMF Server locally with Docker Compose, or connecting to an existing shared CMF Server. Covers creating the .env file, starting the container stack, verifying the web UI, and pointing cmflib clients at the server. If a server is already running and credentials are available, skip to the connection section.
/cmf-syncUse when pushing or pulling CMF metadata and artifacts between a local environment and a CMF Server or central artifact repository (S3, MinIO, SSH, OSDF, local). Covers `cmf metadata push/pull`, `cmf artifact push/pull`, `cmf repo push/pull`, and collaborative team workflows. Assumes `cmf init` has been run.
npx claudepluginhub hewlettpackard/cmf --plugin cmfOther plugins' skills for the same job