Org-SuperTag 5.0 represents a major architectural overhaul with significant improvements but also breaking changes that require your attention:
The new version features a completely redesigned architecture with these major improvements:
- Pure Emacs Lisp Implementation: Eliminated all Python dependencies for a lighter, more maintainable codebase (~47% reduction in code size)
- Data-Centric Architecture: Introduced a single source of truth with
supertag--storehash table - One-Way Data Flow: Implemented strict Action -> Ops -> Transform -> Store -> Notify pipeline for better predictability
For detailed architecture comparison, see Compare New/Old Architecture
After configuring org-supertag and restarting Emacs, new users must run the following command first to initialize the database:
M-x supertag-sync-full-initialize
This command performs a full scan of all files in the synchronized directories (org-supertag-sync-directories) to complete the database initialization.
Once this command finishes executing, org-supertag will be ready to serve you.
Before using Org-SuperTag 5.0, you MUST migrate your existing database to the new format:
-
Migration Process:
- Load the migration script:
M-x load-file RET supertag-migration.el RET - Run the migration:
M-x supertag-migrate-database-to-new-arch RET - Select your old
org-supertag-db.elfile when prompted - A backup of your old database will be automatically created
- Load the migration script:
-
Important: After migration is complete, you must restart Emacs immediately to ensure proper operation with the new architecture.
Failure to perform this migration will result in incompatibility with the new version and potential data loss.
Org-SuperTag now reads both inline #tag and Org's native :tag: during sync/import. This preserves your existing files without modification and makes historical tags available in the database. Capture continues to create inline #tag in new headings; export behavior is unchanged.
Org-SuperTag is a revolutionary Org-mode extension that upgrades the traditional tagging system into an intelligent knowledge management engine.
Imagine: Each of your tags can carry structured data, automatically execute tasks, and help you discover hidden connections between knowledge through AI assistants.
In traditional Org-mode, tags are just simple text markers. In Org-SuperTag:
- π·οΈ Tags become data tables - Each tag can define fields and types
- π Nodes become data records - Each title automatically gets an ID and structured storage
- π€ Tags become smart assistants - Can automatically execute actions and tasks
- π Queries become data analysis - Supports complex relational queries and visualization
* My Project Ideas #project
:PROPERTIES:
:ID: abc123
:END:
This is an idea about improving the note-taking system...
When you type =#project=, Org-SuperTag automatically:
- Adds a unique ID to the title
- Creates a node record in the database
- Establishes tag relationships
- Provides a field editing interface (status, priority, due date, etc.)
- Enables intelligent queries and visualization
Note: Auto-completion is temporarily unavailable, so I've modified the example.
* Learning Machine Learning (At this point M-x supertag-add-tag)
Candidate tags:
project
learning
research
- After selecting a tag, it will be automatically added and added to the node.
- Enter a new tag and press Enter to automatically record the new tag in the database and add it to the node.
Use M-x supertag-view-node to open the node view, move the cursor to the Fields field below the #project tag, and follow the instructions to edit.
Use M-x supertag-search to open the query view, enter query conditions, then press C-c C-c to execute.
Use M-x supertag-view-kanban to open the kanban view, then follow the instructions to operate.
This view is temporarily removed in the 5.0 new version.
Use M-x supertag-chat to open the AI chat view, then follow the instructions to operate.
You: Help me summarize all ongoing projects
AI: Based on your knowledge base, there are currently 3 ongoing projects:
1. Machine Learning Project - High priority, due December 31
2. Website Refactoring - Medium priority, needs frontend support
3. Data Analysis - Low priority, waiting for data source
I recommend focusing on the machine learning project first as it has a closer deadline.
- Smart Slash:
/inserts a slash and can optionally show command menu - Smart Command Mode: Commands can take parameters and execute immediately
/bs Microsoftβ Switch to bs mode and execute immediately, using "Microsoft" as input, subsequent conversations remain in the selected mode until switched with/default
- Type /commands to see current commands
- Type /define to customize conversation modes
- Supports multiple formats:
/define name "prompt content"/define name(empty prompt)/define "name" "prompt"(double quote format)
- Supports multiple formats:
You can freely create your own commands, which will be named as .prompt files and stored in the ~/.emacs.d/org-supertag/prompts/ directory.
# Clone the repository
git clone https://github.com/yibie/org-supertag.git ~/org-supertag(straight-use-package 'ht)
(straight-use-package 'gptel)
(straight-use-package '(org-supertag :host github :repo "yibie/org-supertag"))
(setq org-supertag-sync-directories '("Your/Path/To/Org-Files/"))
(eval-after-load 'gptel
'(require 'org-supertag))- Open any .org file
- Create a title: * My First Project
- Type # and select or create a tag
- π Congratulations! You've created a smart node
M-x supertag-view-node- View node details (including AI tag suggestions)M-x supertag-search- Smart searchM-x supertag-view-kanban- Kanban viewM-x supertag-chat- AI chat
#paper + fields[journal, impact factor, reading status, notes]
#experiment + fields[hypothesis, method, results, conclusion]
#idea + fields[source of inspiration, feasibility, priority]
#project + fields[status, priority, assignee, due date]
#task + fields[type, estimated time, dependencies, completion]
#meeting + fields[participants, agenda, decisions, follow-up actions]
Version 5.0 brings a brand new automation system, implemented in pure Emacs Lisp, with better performance and more powerful features:
- β Unified Tag System: Every tag is a fully-featured "database" with custom fields and automation capabilities
- β True Event-Driven: Responds to precise data changes in real-time, rather than polling scans
- β Automatic Rule Indexing: Automatically builds high-performance indexes for rules in the background, without users needing to worry about performance optimization details
- β Multiple Action Execution: A single rule can trigger a series of sequentially executed actions
- β Scheduled Tasks: Supports time-based and periodic automation, driven by an integrated scheduler
- β Relationships and Calculations: Supports advanced features like bidirectional relationships, property synchronization, and Rollup calculations
- β Formula Fields: Calculates and displays data in real-time in table views without persistent storage
| Feature | Old Version (Behavior) | New Version (Automation 2.0) |
|---|---|---|
| Module Structure | Dispersed multiple modules with circular dependencies | Unified single module, eliminating dependency issues |
| Rule Management | Manually attached to tags, requiring user management | Automatic indexing, intelligently managed by the system |
| Performance | O(n) traversal of all rules | O(1) index lookup, high performance |
| API Consistency | Multiple different API interfaces | Unified API interface, low learning cost |
| Maintainability | Complex inter-module relationships | Simple cohesive design, easy to maintain |
For details, see Automation System Guide
Version 5.0 introduces a brand new capture system with more natural template syntax:
- β Intuitive Template Syntax - Write templates directly like org-capture
- β Automatic Parsing - Automatically recognize titles, tags, fields, and content
- β Smart Filling - Support interactive prompts and placeholders
- β Flexible Configuration - Specify files or let users choose
Define templates using the supertag-capture-templates variable:
(setq supertag-capture-templates
'(
;; Quick task
("t" "Quick Task"
:file "~/Documents/notes/plan.org"
:node-spec
(:template
"* %^{Task:} #task
- status: todo
- priority: medium
- create-at: %datetime
%?"))
;; Question record
("q" "Question"
:node-spec
(:template
"* #question %^{Question:}
%^{Detailed Content:}
%?"))
;; Meeting record
("m" "Meeting Record"
:file "~/org/meetings.org"
:node-spec
(:template
"* %^{Meeting Topic:} #meeting
- type: %^{Meeting Type:}
- status: completed
- location: %^{Location:}
Time: %date
Participants:
Agenda:
Discussion Points:
Action Items:
%?"))))Basic Structure:
- First line: Title and inline tags
* Title #tag1 #tag2 - Field lines:
- field_name: value - After empty line: Body content
Interactive Prompts:
%^{Prompt Text}- Prompt user for input
Placeholders:
%date- Current date (YYYY-MM-DD)%datetime- Date and time (YYYY-MM-DD HH:MM)%time- Current time%?- Set cursor position
Configuration Options:
:file- Target file (optional, prompts user if not specified):node-spec- Node specification containing:templatestring
- Template Capture:
M-x supertag-capture-with-template, select template - Direct Capture:
M-x supertag-capture, use default template
For details, see Capture Guide
Org-SuperTag no longer installs global keybindings automatically. To recreate the classic C-c s prefix, add the snippet below to your init file (after loading org-supertag):
(with-eval-after-load 'org-supertag
(define-prefix-command 'supertag-prefix-map)
(define-key org-mode-map (kbd "C-c s") 'supertag-prefix-map)
;; Capture
(define-key supertag-prefix-map (kbd "C") #'supertag-capture)
(define-key supertag-prefix-map (kbd "t") #'supertag-capture-with-template)
;; Tag management
(define-key supertag-prefix-map (kbd "a") #'supertag-add-tag)
(define-key supertag-prefix-map (kbd "r") #'supertag-remove-tag-from-node)
(define-key supertag-prefix-map (kbd "n") #'supertag-rename-tag)
(define-key supertag-prefix-map (kbd "d") #'supertag-delete-tag-everywhere)
(define-key supertag-prefix-map (kbd "c") #'supertag-change-tag-at-point)
(define-key supertag-prefix-map (kbd "x") #'supertag-set-child)
(define-key supertag-prefix-map (kbd "X") #'supertag-clear-parent)
;; Node + reference management
(define-key supertag-prefix-map (kbd "m") #'supertag-move-node-and-link)
(define-key supertag-prefix-map (kbd "l") #'supertag-add-reference)
(define-key supertag-prefix-map (kbd "L") #'supertag-add-reference-and-create)
(define-key supertag-prefix-map (kbd "R") #'supertag-remove-reference)
(define-key supertag-prefix-map (kbd "h") #'supertag-back-to-heading)
(define-key supertag-prefix-map (kbd "N") #'supertag-create-node)
(define-key supertag-prefix-map (kbd "D") #'supertag-delete-node)
(define-key supertag-prefix-map (kbd "f") #'supertag-find-node)
(define-key supertag-prefix-map (kbd "o") #'supertag-find-node-other-window)
(define-key supertag-prefix-map (kbd "M") #'supertag-move-node)
(define-key supertag-prefix-map (kbd "u") #'supertag-update-node-at-point)
;; Query & views
(define-key supertag-prefix-map (kbd "i") #'supertag-insert-query-block)
(define-key supertag-prefix-map (kbd "s") #'supertag-search)
(define-key supertag-prefix-map (kbd "e") #'supertag-search-export-results-to-file)
(define-key supertag-prefix-map (kbd "E") #'supertag-search-export-results-to-new-file)
(define-key supertag-prefix-map (kbd "I") #'supertag-search-insert-at-point)
(define-key supertag-prefix-map (kbd "g") #'supertag-chat)
(define-key supertag-prefix-map (kbd "v") #'supertag-view-node)
(define-key supertag-prefix-map (kbd "T") #'supertag-view-table)
(define-key supertag-prefix-map (kbd "k") #'supertag-view-kanban)
;; Embeds & maintenance
(define-key supertag-prefix-map (kbd "b") #'supertag-insert-embed)
(define-key supertag-prefix-map (kbd "B") #'supertag-convert-link-to-embed)
(define-key supertag-prefix-map (kbd "C-r") #'supertag-services-embed-refresh-all)
(define-key supertag-prefix-map (kbd "C-c") #'supertag-sync-cleanup-database))| Key | Command | Description |
|---|---|---|
C-c s C |
supertag-capture | Direct capture |
C-c s t |
supertag-capture-with-template | Capture with template |
C-c s a |
supertag-add-tag | Add a tag to the current node |
C-c s r |
supertag-remove-tag-from-node | Remove a tag from the current node |
C-c s n |
supertag-rename-tag | Rename a tag |
C-c s d |
supertag-delete-tag-everywhere | Delete a tag everywhere |
C-c s c |
supertag-change-tag-at-point | Change tag at point |
C-c s x |
supertag-set-child | Assign child tags |
C-c s X |
supertag-clear-parent | Clear tag parent |
C-c s m |
supertag-move-node-and-link | Move node and leave backlink |
C-c s l |
supertag-add-reference | Add reference to node |
C-c s L |
supertag-add-reference-and-create | Add reference and create node if missing |
C-c s R |
supertag-remove-reference | Remove reference from node |
C-c s h |
supertag-back-to-heading | Back to heading |
C-c s N |
supertag-create-node | Create new node |
C-c s D |
supertag-delete-node | Delete node |
C-c s f |
supertag-find-node | Find node |
C-c s o |
supertag-find-node-other-window | Find node in other window |
C-c s M |
supertag-move-node | Move node |
C-c s u |
supertag-update-node-at-point | Update node at point |
C-c s i |
supertag-insert-query-block | Insert query block |
C-c s s |
supertag-search | Open query interface |
C-c s e |
supertag-search-export-results-to-file | Export query results to file |
C-c s E |
supertag-search-export-results-to-new-file | Export query results to new file |
C-c s I |
supertag-search-insert-at-point | Insert query results at point |
C-c s g |
supertag-chat | Open chat view |
C-c s v |
supertag-view-node | View node details |
C-c s T |
supertag-view-table | Open table view |
C-c s k |
supertag-view-kanban | Open kanban view |
C-c s b |
supertag-insert-embed | Insert embed |
C-c s B |
supertag-convert-link-to-embed | Convert link to embed |
C-c s C-r |
supertag-services-embed-refresh-all | Refresh all embeds |
C-c s C-c |
supertag-sync-cleanup-database | Clean database |
These bindings are optionalβadapt or trim them to fit your workflow.
;; Core configuration
(setq org-supertag-sync-directories '("~/notes/" "~/projects/"));; Control whether to enable AI services
;; Set to nil to disable AI services, t by default
(setq org-supertag-bridge-enable-ai nil);; Custom field types
(add-to-list 'org-supertag-field-types
'(rating . (:validator org-supertag-validate-rating
:formatter org-supertag-format-rating
:description "Rating (1-5)")))
;; Custom query commands
(defun my-urgent-projects ()
"Find all urgent projects"
(interactive)
(supertag-search '(and (tag "project") (tag "urgent"))))| Feature | Org-SuperTag | Org-roam | Obsidian | Notion |
|---|---|---|---|---|
| Structured Data | β Native support | β | β | |
| Complex Queries | β S-expressions | β | ||
| Automated Actions | β Powerful | β | ||
| AI Integration | β Deep integration | β | β | |
| Offline Use | β | β | β | β |
| Learning Curve | β Simple | β Simple |
- π Detailed Documentation
- π Issue Feedback
- π¬ Community Discussions
See CHANGELOG.
A: Use =M-x supertag-sync-cleanup-database= for complete recovery.
A: Org-SuperTag provides automatic daily backup functionality:
Automatic Backup:
- Daily backups are automatically created in
~/.emacs.d/org-supertag/backups/ - Keeps backups for the last 3 days (configurable)
- Old backups are automatically cleaned up
- Backup files are named:
supertag-db-YYYY-MM-DD.el
Manual Backup:
- Force backup:
M-x supertag-backup-database-now - Manual backup of entire directory:
~/.emacs.d/org-supertag/
Configuration Options:
;; Set backup interval (seconds, default 86400=24 hours)
(setq supertag-db-backup-interval 86400)
;; Set backup retention days (default 3 days)
(setq supertag-db-backup-keep-days 3)
;; Disable automatic backup
(setq supertag-db-backup-interval nil)A: In the node view (=M-x supertag-view-node=), click "π‘ Get AI Tag Suggestions" or press =s=. This is manually triggered and won't interfere with your workflow.
A: AI features use the default Ollama configuration, no additional setup required. All AI features are integrated into the existing view system, making them simple and intuitive to use.
Don't be intimidated by the complex features! The design philosophy of Org-SuperTag is "start simple, then go deeper".
Start by adding your first =#tag=, then gradually explore structured data, intelligent queries, AI assistants, and other advanced features.
Every feature is designed to make your knowledge management more efficient and intelligent.