Skip to main content

somnus-metadata

The Somnus metadata standard (core somnus://metadata/core/2.0.0) and its stdlib-only toolkit.

Every managed file carries exactly one somnus: header. Markdown files use frontmatter or a hidden comment envelope. Code and config files use a comment envelope. All other files use a <file>.somnus.yaml sidecar. A global SQLite registry (~/.somnus/somnus.db) indexes identity, revisions, relations, claims, and conflicts. It contains no JSON.

Install

Requires Python 3.11+ and has no third-party dependencies.

uv tool install somnus-metadata
somnus --version

Alternatively, use pipx install somnus-metadata. For a Python virtual environment, use python -m pip install somnus-metadata.

The distribution is somnus-metadata; the command and Python import remain somnus. Do not install the unrelated PyPI distribution named somnus into this same environment: it owns the same command/import names.

For development from a source checkout, use uv tool install --editable .. The installed tool works outside this repository; register the project roots you want to manage with somnus init --root /path/to/project.

Somnus Metadata 2.0.0 implements metadata core 2.0.0. The material under archive/v2-proposal/ is historical, not the active release. The CLI, terminal UI and stdio MCP adapter share one backend. A distributable coding-agent plugin is not included in this release.

Quick start

somnus init --root .                 # create ~/.somnus, config.toml, registry; register this root
somnus new specification "My Spec"   # scaffold a conformant Markdown artifact
somnus check my-spec.md --level semantic
somnus stamp notes.py                # dry-run diff; add --write to apply
somnus index                         # reconcile roots into the registry
somnus ls
somnus q --conflicts
somnus set my-spec.md "classification.tags=memory, design"   # header edit, new revision
somnus edit                          # terminal UI

somnus brief prints an agent cheat sheet suitable for pasting into a repository's AGENTS.md.

MCP server

somnus mcp serves non-interactive commands (excluding edit and mcp itself) as Model Context Protocol tools over stdio. Each tool returns the command's text output. Register it with any MCP client by command:

somnus mcp                           # optional: somnus --actor NAME mcp

Exit codes: 0 ok, 1 validation errors, refusals, or conflicts, 2 usage or I/O errors.

Tests

PYTHONPATH=src python -m unittest discover -s tests

Metadata

Release files for somnus-metadata 2.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for somnus-metadata 2.0.0
File Size Uploaded Provenance
somnus_metadata-2.0.0.tar.gz 95.2 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for somnus-metadata 2.0.0
File Interpreter ABI Platform
somnus_metadata-2.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 209.0 kB

Release files / somnus_metadata-2.0.0.tar.gz

Download URL somnus_metadata-2.0.0.tar.gz
Size 95.2 kB
Tags Source
SHA-256 checksum
How to use checksums
dfdd9fe824e1d187923d8ab4fed1c6640e186e4d1c9688363c8ddc358b8163ae
BLAKE2b-256 checksum
How to use checksums
42d9c8baad128f379e52b3d14d5451c38c64824143fc4b5295127c9b87353cd9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.12

Release files / somnus_metadata-2.0.0-py3-none-any.whl

Download URL somnus_metadata-2.0.0-py3-none-any.whl
Size 113.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
39e16de7e5187fce3d0a091f48eebc28b00b860e18bfd8cb578933a52664ac8a
BLAKE2b-256 checksum
How to use checksums
1d04b0a7815b56cfd594c6d621f864ff9f3dec4c8d6c7c4d8ae266f33165a750
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.12

Security for somnus-metadata 2.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

2.0.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page