Project metadata plugin for Daimyo - provides .project-metadata.yml content for templates
Project description
bugyo-prjmeta
Project metadata plugin for Daimyo - provides .project-metadata.yml content for Jinja2 templates.
Installation
pip install bugyo-prjmeta
Requirements
- Python >= 3.11
- daimyo >= 1.4.0
- pyyaml ~= 6.0
Features
Context Variables
The prjmeta.context plugin provides the following template variable:
| Variable | Type | Description |
|---|---|---|
project_metadata |
dict | Full contents of .project-metadata.yml in the project root |
Configuration
Enable the plugin in your .daimyo/config/settings.toml:
# Enable all project metadata plugins
enabled_plugins = ["prjmeta.*"]
# Or enable the specific context plugin
enabled_plugins = ["prjmeta.context"]
Usage
Template Examples
Conditional Rules Based on Project Metadata
project.language:
when: Language-specific guidelines
ruleset:
- "{% if project_metadata.get('language') == 'python' %}Use uv for dependency management{% endif %}"
- "{% if project_metadata.get('language') == 'javascript' %}Use npm or yarn for dependency management{% endif %}"
Using Daimyo Scope
The .project-metadata.yml file is used by Claude Code to determine the daimyo rule scope.
Its full contents are also available in templates:
project.info:
when: Project information rules
ruleset:
- "{% if project_metadata.get('daimyo', {}).get('scope') %}Rules scope: {{ project_metadata.daimyo.scope }}{% endif %}"
- "{% if project_metadata.get('team') %}Team: {{ project_metadata.team }}{% endif %}"
Accessing Nested Metadata
project.team:
when: Team-specific guidelines
ruleset:
- "{% set team = project_metadata.get('team', {}) %}"
- "{% if team.get('timezone') %}Team timezone: {{ team.timezone }}{% endif %}"
- "{% if team.get('lead') %}Technical lead: {{ team.lead }}{% endif %}"
Availability
The plugin is always available, even when .project-metadata.yml does not exist in the project root. In that case, project_metadata is an empty dict {}.
Security
This plugin reads only .project-metadata.yml from the current working directory. No path traversal is possible - the file path is fixed and cannot be influenced by template authors.
License
MIT License - see LICENSE file for details.
Support
For issues and questions, please visit the Daimyo issue tracker.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file bugyo_prjmeta-1.0.0.tar.gz.
File metadata
- Download URL: bugyo_prjmeta-1.0.0.tar.gz
- Upload date:
- Size: 5.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f68a7c9111683fda877acdb981413ee299abf7a324979e9e0c3fd6563746047b
|
|
| MD5 |
43c1f320d884ad79f249b6c850904aab
|
|
| BLAKE2b-256 |
2768be7fbdd121a5c60baafdd1b0404af92e9570a72ce01a50789c05f3bec8dc
|
File details
Details for the file bugyo_prjmeta-1.0.0-py3-none-any.whl.
File metadata
- Download URL: bugyo_prjmeta-1.0.0-py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
38f7d3d7fd894a778620bac3b8db4733a9227af1dbf05394148f6bf8fe24c3df
|
|
| MD5 |
a00a7e5c8eedcf59446ccd75ed05b21f
|
|
| BLAKE2b-256 |
a0b2943a2e554aa553c7d4fb067348f958c93f2f761d3003b53a9607990bf069
|