|
1 | 1 | # Metadata Auto Classifier |
2 | 2 |
|
3 | | -> The more context you give, the more accurate the classification |
| 3 | +AI-powered metadata classification for Obsidian. Analyzes your notes and automatically generates context-aware tags and frontmatter using configurable AI providers. |
4 | 4 |
|
5 | | -Metadata Auto Classifier transforms how you organize your Obsidian vault by intelligently analyzing note content and automatically generating relevant tags and frontmatter. It analyses your notes and generates context-aware tags and frontmatter. |
| 5 | +> The more context you give, the more accurate the classification. |
6 | 6 |
|
7 | 7 | ## Example |
8 | 8 |  |
9 | 9 |
|
10 | | -1. Open any note you want to classify |
11 | | -2. Access commands via Command Palette (Cmd/Ctrl + P): |
12 | | - - **"Fetch tags using current provider"** - Generate relevant tags |
13 | | - - **"Fetch all frontmatter using current provider"** - Populate all custom frontmatter fields |
14 | | - - **Individual field commands** - Update specific frontmatter fields |
15 | | -3. Review and refine AI-generated suggestions as needed |
16 | | -4. Test and validate results using built-in testing tools |
17 | | - |
18 | 10 | ## Features |
19 | 11 |
|
20 | | -- **Automatically Tag Metadata**: AI-powered analysis generates contextually relevant tags and populates custom frontmatter fields |
21 | | -- **Set Your Classification Rules**: Define custom rules, tag categories, and frontmatter fields tailored to your workflow |
22 | | -- **Give Further Context Per Metadata**: Provide field-specific guidelines and custom prompts for accurate metadata generation |
23 | | -- **Test Model Performance**: Built-in testing tools with preview mode and quality assessment capabilities |
24 | | -- **Flexible Provider & Model Support**: Add and configure custom AI providers and models freely |
| 12 | +- **Automatic tag generation** -- AI analyzes note content and generates contextually relevant tags |
| 13 | +- **Custom frontmatter fields** -- define any frontmatter fields and let AI populate them automatically |
| 14 | +- **Classification rules** -- set custom rules, tag categories, and field-specific guidelines for accurate metadata |
| 15 | +- **Per-field context prompts** -- provide additional context per metadata field to guide AI classification |
| 16 | +- **Test and preview** -- built-in testing tools with preview mode and quality assessment before applying changes |
| 17 | +- **Multi-provider support** -- works with OpenAI, Gemini, Ollama, and other AI providers via a unified interface |
| 18 | +- **Custom model configuration** -- add and configure custom AI providers and models freely |
25 | 19 |
|
26 | 20 | ## Installation |
27 | 21 |
|
28 | 22 | ### Community Plugin (Recommended) |
29 | 23 |
|
30 | | -1. Open Obsidian and navigate to Settings > Community Plugins |
| 24 | +1. Open Obsidian and navigate to **Settings > Community Plugins** |
31 | 25 | 2. Disable Safe Mode if currently enabled |
32 | | -3. Click "Browse" and search for "Metadata Auto Classifier" |
33 | | -4. Click "Install", then "Enable" to activate the plugin |
| 26 | +3. Click **Browse** and search for "Metadata Auto Classifier" |
| 27 | +4. Click **Install**, then **Enable** to activate the plugin |
34 | 28 |
|
35 | 29 | ### Manual Installation (Beta) |
36 | 30 |
|
37 | | -To install the beta version using BRAT (Beta Reviewers Auto-update Tool): |
| 31 | +Using [BRAT](https://github.com/TfTHacker/obsidian42-brat): |
38 | 32 |
|
39 | 33 | 1. Install BRAT from the Obsidian Community Plugins browser |
40 | | -2. In BRAT settings, click "Add Beta plugin" |
41 | | -3. Enter the repository URL: `https://github.com/beromkoh/obsidian-metadata-auto-classifier` |
42 | | -4. Click "Add Plugin" to install |
| 34 | +2. In BRAT settings, click **Add Beta plugin** |
| 35 | +3. Enter the repository URL: `https://github.com/GoBeromsu/Metadata-Auto-Classifier` |
| 36 | +4. Click **Add Plugin** to install |
43 | 37 |
|
44 | 38 |  |
45 | 39 |
|
| 40 | +## Usage |
| 41 | + |
| 42 | +1. Open any note you want to classify |
| 43 | +2. Access commands via the Command Palette (Cmd/Ctrl + P): |
| 44 | + - **Fetch tags using current provider** -- generate relevant tags |
| 45 | + - **Fetch all frontmatter using current provider** -- populate all custom frontmatter fields |
| 46 | + - **Individual field commands** -- update specific frontmatter fields one at a time |
| 47 | +3. Review and refine AI-generated suggestions as needed |
| 48 | + |
| 49 | +## Commands |
| 50 | + |
| 51 | +| Command | Description | |
| 52 | +|---------|-------------| |
| 53 | +| Fetch tags using current provider | Generate tags for the active note | |
| 54 | +| Fetch all frontmatter using current provider | Populate all configured frontmatter fields | |
| 55 | +| Fetch [field] using current provider | Update a specific frontmatter field | |
| 56 | + |
| 57 | +## Settings |
| 58 | + |
| 59 | +| Setting | Description | |
| 60 | +|---------|-------------| |
| 61 | +| AI Provider | Select from OpenAI, Gemini, Ollama, or custom providers | |
| 62 | +| Model | Choose or configure the model used for classification | |
| 63 | +| Custom frontmatter fields | Define which frontmatter fields AI should generate | |
| 64 | +| Classification rules | Set rules and categories for how tags/fields are generated | |
| 65 | +| Field-specific prompts | Provide per-field context to guide AI output | |
| 66 | + |
| 67 | +## Tech Stack |
| 68 | + |
| 69 | +| Category | Technology | |
| 70 | +|----------|------------| |
| 71 | +| Platform | Obsidian Plugin API | |
| 72 | +| Language | TypeScript 5 | |
| 73 | +| Bundler | esbuild | |
| 74 | +| AI | OpenAI, Gemini, Ollama, custom providers | |
| 75 | +| Testing | Vitest (with coverage) | |
| 76 | +| Linting | ESLint 9 (flat config) + Prettier + eslint-plugin-boundaries | |
| 77 | + |
| 78 | +## Project Structure |
| 79 | + |
| 80 | +``` |
| 81 | +Metadata-Auto-Classifier/ |
| 82 | +├── src/ |
| 83 | +│ ├── main.ts # Plugin entry point (AutoClassifierPlugin) |
| 84 | +│ ├── provider/ # AI provider layer (HTTP, OAuth, prompt generation) |
| 85 | +│ ├── classifier/ # Business logic (ClassificationService, CommandService) |
| 86 | +│ ├── settings/ # Settings UI (tabs, modals, components) |
| 87 | +│ └── lib/ # Pure utilities (frontmatter, sanitizer, ErrorHandler) |
| 88 | +├── __tests__/ # Vitest tests (mirrors src/ structure) |
| 89 | +├── __mocks__/ # Obsidian API mock |
| 90 | +├── scripts/ # dev.mjs, version.mjs, release.mjs |
| 91 | +├── boiler.config.mjs # Per-repo config |
| 92 | +└── manifest.json # Obsidian plugin manifest |
| 93 | +``` |
| 94 | + |
| 95 | +## Development |
| 96 | + |
| 97 | +```bash |
| 98 | +pnpm install |
| 99 | +pnpm dev # vault selection + esbuild watch + hot reload |
| 100 | +pnpm build # tsc type-check + production build |
| 101 | +pnpm test # Vitest unit tests |
| 102 | +pnpm test:coverage # Vitest with coverage report |
| 103 | +pnpm lint # ESLint |
| 104 | +pnpm run ci # build + lint + test |
| 105 | +``` |
46 | 106 |
|
47 | 107 | ## Inspiration |
48 | 108 |
|
|
0 commit comments