|
| 1 | +# Custodian |
| 2 | + |
| 3 | +Rule-driven file organization for Obsidian. |
| 4 | + |
| 5 | +Custodian turns ordinary vault folders into smart folders. Define ordered rules based on a file's title, YAML frontmatter, tags, extension, or current folder, and Custodian places matching files in their designated location. |
| 6 | + |
| 7 | +## Install with BRAT |
| 8 | + |
| 9 | +1. Install and enable **BRAT** in Obsidian. |
| 10 | +2. Open BRAT settings and choose **Add Beta Plugin**. |
| 11 | +3. Enter `Giblicious/custodian`. |
| 12 | +4. Enable **Custodian** under Community plugins. |
| 13 | + |
| 14 | +Custodian supports Obsidian on desktop and mobile. |
| 15 | + |
| 16 | +## Rules |
| 17 | + |
| 18 | +Rules are evaluated from top to bottom. The first matching rule owns the file. Conditions within a rule are combined with **AND**; blank conditions are ignored. |
| 19 | + |
| 20 | +Available conditions: |
| 21 | + |
| 22 | +- **Title:** glob patterns such as `Meeting - *` or `* Invoice` |
| 23 | +- **Frontmatter:** property exists, does not exist, equals, or contains a value |
| 24 | +- **Tags:** require any or all listed tags |
| 25 | +- **Extension:** for example `md`, `pdf`, or `png` |
| 26 | +- **Source folder:** limit a rule to one part of the vault |
| 27 | + |
| 28 | +Destinations may be static (`Projects/Active`) or templated: |
| 29 | + |
| 30 | +- `Journal/{{year}}/{{month}}` |
| 31 | +- `Projects/{{property:project}}` |
| 32 | +- `Attachments/{{extension}}` |
| 33 | +- `People/{{property:owner}}` |
| 34 | + |
| 35 | +Template values are sanitized into safe folder names. Custodian never overwrites a file and rejects paths that could escape the vault. |
| 36 | + |
| 37 | +## Commands |
| 38 | + |
| 39 | +- **Preview file organization:** report how many files would move without changing the vault |
| 40 | +- **Organize all files now:** apply the current rules across the vault |
| 41 | + |
| 42 | +Automatic organization can be disabled globally while rules are being designed. Individual rules can also be disabled. |
| 43 | + |
| 44 | +## Privacy |
| 45 | + |
| 46 | +Custodian works entirely inside Obsidian. It has no network requests, telemetry, accounts, advertising, or analytics. |
| 47 | + |
| 48 | +## Development |
| 49 | + |
| 50 | +```sh |
| 51 | +npm install |
| 52 | +npm run check |
| 53 | +``` |
| 54 | + |
| 55 | +Create a semantic version tag matching `manifest.json` (for example `0.1.0`) to publish the BRAT release assets. |
| 56 | + |
| 57 | +## License |
| 58 | + |
| 59 | +MIT |
0 commit comments