nicholaskj26 downloadsRecords which device created and last edited each note in its frontmatter. Device names stay local, so sync tools never overwrite them, and synced-in edits don't count as local edits.
Know which device created a note — and which one touched it last.
When you edit the same vault on a laptop, a desktop, and a phone, sync keeps the files in step but throws away who did what. Device Tracker writes that information straight into each note's frontmatter:
---
created_device: ThinkPad-JK
modified_device: Pixel7-a3f9c2
---
中文说明见 README.zh-CN.md
With any file-sync tool (Syncthing, Dropbox, OneDrive, iCloud, git), a note edited on your phone arrives on your desktop looking exactly like a note you edited on your desktop. Two things go wrong:
Device Tracker fixes both.
modified_device is driven by the editor-change event, not vault modify.
| Event | Fires when you type locally | Fires when a synced file arrives |
|---|---|---|
vault modify |
✅ | ✅ ← the trap |
editor-change |
✅ | ❌ |
A file synced in from another device never triggers editor-change, so the
field is only ever written by a device where a human actually typed.
Programmatic changes (editor refresh, sync reload) are filtered out too, via the
event's source flag.
The device name is stored in each device's localStorage, not in
data.json. This matters because .obsidian/ is usually synced along with your
notes — if the name lived there, every device would overwrite every other
device's name and they'd all end up identical.
| Platform | Name source |
|---|---|
| Desktop | System hostname (e.g. ThinkPad-JK), editable |
| Android | Auto-generated <model>-<6 chars> (e.g. Pixel7-a3f9c2), editable |
| iOS | Not supported (see below) |
You can override the name any time in Settings → Community plugins → Device Tracker → ⚙️.
| Field | Meaning | When written |
|---|---|---|
created_device |
Device that created the note | First time the file exists on a device. Written once, never overwritten. |
modified_device |
Device that last edited the note | When a human types locally. Debounced 1.5 s. |
Once the fields are in your notes, Dataview can filter on them — "show me everything I edited on this laptop", "which notes moved between machines?", and so on.
const me = app.plugins.plugins['device-tracker'].getDeviceName();
dv.table(
['Note', 'Created on', 'Last edited on'],
dv.pages('"Projects"')
.where(p => p.modified_device === me)
.map(p => [p.file.link, p.created_device ?? '—', p.modified_device ?? '—'])
);
Five worked examples — including a crash-safe device-name helper and a plain DQL version — are in docs/queries.md (中文:docs/queries.zh-CN.md).
Several popular plugins write to frontmatter automatically
(update-time-on-edit, front-matter-timestamps, and others). Device Tracker
is built to sit next to them without loops or fights:
processFrontMatter with restored timestamps — atomic read-modify-write
that puts mtime back, so plugins that key off file mtime are unaffected.source filtering — ignores programmatic editor changes.Canvas.md, and empty files.Once accepted into the official directory: Settings → Community plugins → Browse → search "Device Tracker" → Install → Enable.
main.js, manifest.json from the latest release.<your-vault>/.obsidian/plugins/device-tracker/.The app asks whether you trust the vault author. Choose "Trust author and enable plugins" — otherwise Community plugins stay in Restricted Mode and nothing loads.
This is a device tracker, not a human/AI tracker.
| Plugin | Tracks |
|---|---|
| Device Tracker (this) | Which machine touched the note |
| Authorship Tracker | Which author (human vs. AI) wrote it |
| Authorship | Colours typed vs. pasted vs. AI text in the editor |
| Front Matter Timestamps | When the note changed (no device dimension) |
They answer different questions and can run side by side. If you want "was this my laptop or my phone?", use this one. If you want "did a human or an AI write this?", use Authorship Tracker.
| Platform | Works | Device name |
|---|---|---|
| Windows / macOS / Linux | ✅ | Automatic hostname, or set manually |
| Android | ✅ | Auto-generated unique ID (model + short code), or set manually |
| iOS / iPadOS | ❌ | Third-party plugins aren't supported on iOS |
created_device, and it isn't backfilled (there's no reliable
way to know where an old file came from).modified_device reflects content
edits only.Everything is available in both English and Chinese, as separate pages (never mixed):
| Topic | English | 中文 |
|---|---|---|
| Getting started | README.md | README.zh-CN.md |
| Querying notes by device (DataviewJS) | docs/queries.md | docs/queries.zh-CN.md |
| Submitting to the community directory | docs/submission.md | docs/submission.zh-CN.md |
| Release history | CHANGELOG.md | CHANGELOG.zh-CN.md |