Search...Search plugins and themes...
⌘K
Sign in
  • Get started
  • Download
  • Pricing
  • Enterprise
  • Account
  • Obsidian
  • Overview
  • Sync
  • Publish
  • Canvas
  • Mobile
  • Web Clipper
  • CLI
  • Learn
  • Help
  • Developers
  • Changelog
  • About
  • Roadmap
  • Blog
  • Resources
  • System status
  • License overview
  • Terms of service
  • Privacy policy
  • Security
  • Community
  • Plugins
  • Join the community
  • Discord
  • Forum / 中文论坛
  • Merch store
  • Brand guidelines
Follow us
DiscordTwitterBlueskyThreadsMastodonYouTubeGitHub
© 2026 Obsidian

Current File

2shortplanks2shortplanks336 downloads

Allows external applications to know what file the desktop app is currently viewing.

Add to Obsidian
  • Overview
  • Scorecard
  • Updates1

Plugin for Obsidian that allows external programs to determine what the current file you're looking at in the the desktop application.

Why?

One of the great things about Obsidian is that it just works on a directory of Markdown (an "Obsidian Vault"). You can manipulate the contents of the files with external programs while Obsidian is open and it'll reflect the changes in the application. You're not bound to Obsidian and can use any tools you want in your workflow.

This plugin allows external programs to be able to determine what file you're looking at in the Obsidian desktop application. For example, you could bind a keyboard shortcut to execute a Perl script to add the path to the current note to your daily note. You could have a Go program that checks if every link in the current file is still reachable and removes those that are not. The possibilities are endless.

How to use this plugin

By default every time Obsidian starts looking at a new file in a vault that has this plugin installed, a JSON file will be written to .obsidian-current-file.json in your home directory (or current profile directory on Windows))

{
    "file": "Sorted/Daily/2024-07-19.md",
    "vault": "/Users/markfowler/Obsidian/MyVault",
    "fullpath": "/Users/markfowler/Obsidian/MyVault/Sorted/Daily/2024-07-19.md"
}

You can change where the file will be written to in the settings for this plugin.

Alternatives

Obsidian natively supports a x-callback-url scheme to allow you to determine what file it's looking at, although this requires you to be running an application with a custom url scheme to receive the information (or be running a webserver and not mind having Obsidian spawn a web browser window).

More information on this feature can be found in the Obsidian Help Documentation.

Copyright and License

MIT License

Copyright (c) 2024 Mark Fowler <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
84%
HealthFair
ReviewPassed
About
Write the active note's file name, vault, and full path to a JSON file in your home or a chosen directory. Update the JSON whenever you switch notes so external scripts and programs can detect and act on the current Obsidian desktop file.
IntegrationsJSONExport
Details
Current version
1.0.0
Last updated
2 years ago
Created
2 years ago
Updates
1 release
Downloads
336
Compatible with
Obsidian 0.12.0+
License
MIT
Report bugRequest featureReport plugin
Author
2shortplanks2shortplanks
twoshortplanks.com
GitHub2shortplanks
  1. Community
  2. Plugins
  3. Integrations
  4. Current File

Related plugins

Yanki

Sync flashcards from a folder in your vault to Anki. Pure Markdown syntax. No fuss.

WordPress

Publish to WordPress.

QuickShare

Securely share your notes with one click. Notes are end-to-end encrypted. No API keys or configuration required.

BRAT

Easily install a beta version of a plugin for testing.

Zotero Integration

Insert and import citations, bibliographies, notes, and PDF annotations from Zotero.

Maps

Adds a map layout to bases so you can display notes as an interactive map view.

Smart Composer

AI chat with note context, smart writing assistance, and one-click edits for your vault.

LanguageTool Integration

advanced spell/grammar checks with the help of language-tool.

Readwise Official

Sync highlights from Readwise to your vault.

MCP Tools

Securely connect Claude Desktop to your vault with semantic search, templates, and file management capabilities.