cyan.yaml Format
Processor metadata and configuration schema
cyan.yaml Format
The cyan.yaml file contains metadata for publishing your processor to the Cyan registry. This file provides information about the processor for discovery and identification purposes.
Basic Structure
username: your-usernamename: my-processordescription: Description of the processor's purposeproject: https://github.com/org/my-projectsource: https://github.com/org/my-processortags:- markdown- processingreadme: README.md
Required Fields
All fields in the processor's cyan.yaml are required:
Prop
Type
Full Example
username: atomicloudname: markdown-processordescription: Process markdown files with custom transformationsproject: https://github.com/atomicloud/cyan-processorsource: https://github.com/atomicloud/markdown-processortags:- markdown- documentation- processingreadme: README.md
Versioning
Version is not specified in cyan.yaml. Versioning is managed by the Cyan registry system when you publish your processor. Each push to the registry creates a new version, which can be described using version_description in the publish request.
Config Definition
The cyan.yaml file does not define processor configuration options. Configuration is defined at the template level when a template references a processor with config values. The config is passed to the processor at runtime via input.config.
For defining config in templates, see Access Config for how processors receive and use configuration values.
Using Config in Processor
The config passed to your processor is typed as unknown and you define your own TypeScript interface:
interface MarkdownConfig {features?: string[];frontmatter?: boolean;headingPrefix?: string;formatting?: {lineWidth?: number;preserveBlankLines?: boolean;};}StartProcessorWithLambda(async (input, fileHelper) => {const config: MarkdownConfig = {features: ['toc'],frontmatter: true,...(input.config as Partial<MarkdownConfig>)};// Use config valuesif (config.features?.includes('toc')) {// Generate table of contents}// ...});
Best Practices
- Use descriptive names - Choose a clear, descriptive processor name
- Provide accurate metadata - Help users discover and understand your processor
- Include relevant tags - Add tags that help users find your processor in the registry
- Maintain a good README - The referenced README should document processor functionality and usage
- Keep contact info current - Use a valid email for support inquiries
Related
- Project Structure - File layout
- Access Config - Using config in code
- Push to Registry - Publishing your processor
- Build Configuration - Docker buildx setup