mrcnkobu183 downloadsLog places, insert place-aware locations, and keep a location timeline.
MyLoc is an Obsidian plugin for location-aware note taking with two separate concerns:
presence logging: log in to and log out from saved placeslocation insertion: insert the current location into a note without changing presence stateThe plugin is built around place notes stored in your vault, active sessions stored in plugin state, and a global monthly timeline written automatically.
Places are normal markdown files stored under a configured root folder such as Places/.
Each place note defines:
When you log in to a place, the plugin creates an active session for that place. Multiple places can be active at the same time.
Every login/logout event is always written to:
Inline insertion into the current note is optional.
inline_text for insert output when availableInsert current locationGets the current location and inserts it into the current note.
Behavior:
Log in and insertInsert onlyCancelinline_text, also offers:This command does not log you in or out unless you explicitly choose Log in and insert.
Default full output:
Pantheon
48.846222, 2.346414
[Open in Map](https://www.openstreetmap.org/?...)
Log inStarts one or more active place sessions.
Behavior:
Visit Notes)Log outEnds one or more active place sessions.
Behavior:
Active placesShows the current active sessions and lets you log out from selected places.
It also includes Check past time..., which lets you choose a date and time and see which places were active then based on the timeline.
Create place note manuallyCreates a place note without using the current device location.
Use this when you want to prepare known places in advance. The command asks for:
inline_nameinline_textPlaces are discovered from markdown files under the configured places root folder.
Recommended path example:
Places/France/Paris/Pantheon.md
Required frontmatter:
---
myloc-type: place
name: Pantheon
inline_name: ""
inline_text: ""
location: [48.846222, 2.346414]
radius: 120
tags:
- paris
- monument
---
Field meanings:
myloc-type: must be placename: canonical place nameinline_name: optional alternate label used by inline login/logout templatesinline_text: optional place-specific text for Insert current locationlocation: latitude/longitude pairradius: detection radius in meterstags: optional tags stored in frontmatterWhen a new place is created by the plugin, the body is initialized like this:
# Pantheon
## Details
- Address: Rue Soufflot, Paris, France
- Coordinates: 48.846222, 2.346414
- Radius: 120 m
- Map: [Open in Map](...)
## Log
The plugin appends login/logout entries under ## Log, using logged in / logged out wording and a daily-note link for the event date.
The daily-note filename format is configurable in MyLoc settings. When available, the Daily Notes core plugin folder is still reused for the link path.
Example:
- [[2026-06-20]] 14:22 logged in
- [[2026-06-20]] 16:05 logged out · 1h 43m
The plugin writes a monthly timeline file inside the timeline folder under your places root.
Example path:
Places/_timeline/2026-06.md
Example content:
- [[2026-06-20]] 14:22 logged in [[France/Paris/Pantheon|Pantheon]]
- [[2026-06-20]] 16:05 logged out [[France/Paris/Pantheon|Pantheon]] · 1h 43m
The daily-note link uses the configured daily note filename as its display text, so folder paths stay hidden in the timeline.
Timeline entries do not include the note from which the command was run.
Presence logging records the fact of a visit. A visit note is an optional place to write about a specific visit.
Visit notes are created only from the Log in flow: each selected place shows a visit toggle (off by default). Enable it to create a visit note for that login.
Visit notes are stored in their own folder under the places root, grouped by month:
Places/_visit-notes/2026-07/202607041630_Pantheon.md
The filename is {yyyymmddhhmm}_{place name}. Each note is seeded with the creation time, the location captured at login, a link back to the place note, and an empty ## Notes section for you to fill in:
---
myloc-type: visit
name: "Pantheon"
location: [48.846222, 2.346414]
tags:
- paris
- monument
created_date: 2026-07-04
created_time: 16:30
---
# Pantheon — 2026-07-04 16:30
- Place: [[Places/France/Paris/Pantheon|Pantheon]]
- Coordinates: 48.846222, 2.346414
- Map: [Open in Map](...)
- Address: Rue Soufflot, Paris, France
## Notes
The visit note is linked back from the place note's login line and, when inline logging is enabled, from the inline login text in your current note. Created visit notes open automatically so you can start writing.
Because visit notes carry myloc-type: visit (not place), they are never treated as places or matched against your location.
Login/logout can optionally append text to the current note.
These templates are configured globally in settings:
Inline log headingInline login textInline logout textIf Inline log heading is set, inline logs are appended under that exact heading when it exists in the current note.
If the heading is not found, the plugin falls back to appending the text at the end of the current cursor line.
Default values:
📍 Logged in: {place} · {time}
📍 Logged out: {place} · {time} · {duration}
Supported placeholders:
{place}: wikilink to the place note, displayed using inline_name if set, otherwise name{placeName}: canonical place name{inlineName}: raw inline_name{placeLink}: wikilink to the place note{date}{time}{datetime}{duration}: meaningful for logout templatesinline_text is used only by Insert current location.
If the detected place has a non-empty inline_text, the insert prompt lets you choose it instead of the standard full output.
{place} in inline_text is also the aliased wikilink form.
Supported placeholders in inline_text:
{place}{placeName}{inlineName}{placeLink}{lat}{lon}{coords}{mapUrl}Example:
inline_text: "At {place} ({coords}) · {placeLink}"
The plugin settings are intentionally small.
Places root folderTimeline folder nameVisit notes folder nameDefault radiusInline logging enabled by default (enabled by default for new installs)Inline log headingDaily note filename formatInline login textInline logout textAllow reverse geocodingAllow approximate IP fallbackAddress languageTimezonePrivacy: when
Allow reverse geocodingis enabled (the default), your coordinates are sent over HTTPS to OpenStreetMap Nominatim to resolve an address. WhenAllow approximate IP fallbackis enabled, your IP is sent to an IP-geolocation service. Both can be turned off; GPS/geolocation itself never leaves the device.
Log inCreate new place hereFrance/Paris/Pantheoninline_name, optional inline_text, and tagsLog inResult:
Insert current locationInsert onlyinline_text when availablenpm install
npm test
npm run lint
npm run build
npm run deploy:prod
npm run deploy:test
npm run deploy
.env for vault deploymentCreate a .env file in the project root:
OBSIDIAN_PLUGIN_PATH=/path/to/your/main/vault/.obsidian/plugins/myloc/
OBSIDIAN_TEST_PLUGIN_PATH=/path/to/your/test/vault/.obsidian/plugins/myloc/
Deployment scripts:
npm run deploy:prod: build output must already exist or be built separately; copies main.js, manifest.json, and styles.css to the main vaultnpm run deploy:test: build output must already exist or be built separately; copies main.js, manifest.json, and styles.css to the test vaultnpm run deploy: runs build, then deploys to both prod and test vaultsmyloc/
├── main.ts
├── location-service.ts
├── note-service.ts
├── ui.ts
├── types.ts
├── utils.ts
└── tests/