AutoIcons

approved

by Anuj Dhakal

Automatically add icons ( materials, uicons etc ) to files and folders based on frontmatter, custom rules, and file type. auto icon - This plugin has not been manually reviewed by Obsidian staff.

114 downloadsUpdated 12d agoMIT

AutoIcons

An Obsidian plugin that automatically adds icons to files and folders in the file explorer — no manual tagging of every item required.

Features

Icons are resolved for each file and folder in this priority order:

  1. Frontmatter icons — give any note an icon by adding a property to its frontmatter:

    ---
    icon: lucide-rocket
    ---
    

    The property name is configurable (default: icon). Use the Set icon for current file command to pick an icon from a searchable list — the frontmatter is updated for you.

  2. Custom rules — assign icons automatically based on:

    • Path starts with — e.g. everything under Projects/ gets a briefcase icon (applies to the folder and everything inside it)
    • Extension is — e.g. all .excalidraw files get a pencil icon
    • Name contains — e.g. anything with "meeting" in the name gets a calendar icon
    • Path matches regex — for advanced patterns

    Each rule can target files, folders, or both. Rules are checked top to bottom and the first match wins; rules can be reordered in settings.

  3. Default icons by file type — images, audio, video, PDF, canvas, code, archives, and spreadsheets get a sensible icon out of the box. Can be turned off.

All icons come from the icon set built into Obsidian (Lucide) by default, so they automatically match your theme in both light and dark mode.

Icon packs & icon style

Beyond Lucide, every icon picker (frontmatter, rules, default folder/note icon) can also search four bundled icon sets:

All four are bundled into the plugin at build time — nothing is downloaded at runtime, and the plugin makes no network requests.

Pick one under Settings → Icon style to re-skin every automatic icon at once — all the per-extension file-type icons plus the default folder and note icons switch to that pack's equivalent. Frontmatter and custom rules are unaffected and can still use any icon from any pack regardless of this setting. If a pack doesn't have a suitable icon for a particular file type, that one falls back to the Lucide icon instead of showing nothing.

Colorful icons

Turn on Colorful icons to give every file and folder a color from a small fixed palette (red, orange, yellow, green, teal, blue, purple, pink), chosen deterministically from its path — the same item always gets the same color, so nothing shifts between reloads.

Commands

  • Set icon for current file — opens a fuzzy-searchable icon picker and writes the chosen icon to the note's frontmatter.
  • Remove icon from current file — removes the icon property from the note's frontmatter.

Settings

  • Frontmatter icons — toggle reading icons from frontmatter, and choose the property name.
  • Default icons by file type — toggle the built-in file type icons.
  • Icon style — choose which icon set (Lucide or a bundled pack) powers the automatic file-type, folder, and note icons.
  • Colorful icons — toggle deterministic per-item coloring from a fixed palette.
  • Custom rules — add, reorder, and delete rules; each rule has a target, a match type, a pattern, and an icon chosen from a searchable picker.

Installation

From community plugins (once accepted)

  1. Open Settings → Community plugins → Browse.
  2. Search for AutoIcons.
  3. Install and enable.

Manual installation

  1. Download main.js, manifest.json, and styles.css from the latest release.
  2. Copy them into <your-vault>/.obsidian/plugins/autoicons/.
  3. Reload Obsidian and enable AutoIcons in Settings → Community plugins.

Development

Requires Node.js 18+.

npm install
npm run dev     # build in watch mode
npm run build   # type-check and produce a production build

To test locally, clone this repository into <your-vault>/.obsidian/plugins/autoicons/ and run npm run dev, then enable the plugin in Obsidian.

npm run dev/npm run build first run scripts/generate-icon-packs.mjs, which reads the @iconify-json/* packages and writes bundle-ready icon data to src/generated/ (gitignored, regenerated on every build).

Releasing

  1. Run npm version patch|minor|major — this bumps package.json, manifest.json, and versions.json.
  2. Push the tag: the GitHub Actions workflow builds the plugin and creates a draft release with main.js, manifest.json, and styles.css attached.
  3. Publish the release on GitHub.

License

MIT

Third-party icons

Bundled at build time, no network requests involved:

For plugin developers

Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.