Skip to content

API Reference

Technical reference for developers.

Plugin API

YAML Toolkit for Obsidian exposes an API for other plugins to use.

Basic Usage

typescript
// Access the plugin
const yamlManipulator = app.plugins.plugins['yaml-toolkit'];

// Execute a rule programmatically
await yamlManipulator.executeRule(rule, files);

Rule Structure

typescript
interface Rule {
  condition: string;
  actions: string[];
}

Functions

executeRule

Execute a rule against files:

typescript
await executeRule(rule: Rule, files: TFile[]): Promise<Result>

previewRule

Preview changes without applying:

typescript
await previewRule(rule: Rule, files: TFile[]): Promise<Preview>

More Information

For developer documentation, see the GitHub repository.

Released under the MIT License.