Comment by corysama

6 months ago

Also new: Obsidian joins the CLI gang

https://help.obsidian.md/cli

I’ve been having a lot of fun recently using AI CLIs with Obsidian. No plugins necessary because it’s just a directory tree of markdown files.

I've been using iCloud to sync Obsidian, and have consistently run into the problem that iCloud file container access needs full disk permissions that I don't want to give the agent (or Ghostty). Does everybody use Obsidian's paid sync instead or what? Or SyncThing?

  • I just pay for the sync.

    I like that I can have some vaults that sync to both my personal and work laptops and other vaults that only sync to one or the other.

    It’s awfully convenient without any vendor lock in since I can just take my plain markdown files and leave anytime.

    • Another option is obsidian lets you set which folders should sync. So I have everything in one vault, and in my trusted environment I let have everything synced, work machine only gets the work folder, and windows gaming machine only gets required non-confidential stuff (i.e notes about stuff that isnt me).

      Its nice to be able to review it all from one machine though

  • I used to use SyncThing, then Dropbox, then iCloud. But then I just caved and paid for Obsidian Sync and it is the best money spent aside from Claude. I don't have to tinker with weird settings anymore or deal with sync issues, it just works.

  • Definitely one of the biggest ROI is to pay for the sync. I regret all years I tried git-based alternatives (it's still useful to have it in git for backup, but not as the main syncing mechanism).

  • Just pay for the sync. I used to juggle with git, rsync, inotify etc and other tools

    Its one of the few subscriptions where it actually feels like money well spent

    • I was using SyncThing, and it worked, but any time you have an Obsidian vault open on two devices, or shortly after another, you're always thinking about if you're going to have to clean up a bunch of sync conflict files later. And that mental overhead is not worth saving $4/mo.

      The conflicts are never hard: it's like a git merge conflict where you just take the latest of every conflict block.

      4 replies →

    • I try to selfhost most of my stuff I rely on. Immich, Vaultwarden, etc. I gave up on trying to selfhost sync solutions for Obsidian - Obsidian Sync is just so damn frictionless compared to all other solutions. Also, it feels good supporting the development of Obsidian.

  • I just pay for the sync. It probably helps I jumped on board when they still had early bird pricing for the sync

  • Im just running a Nextcloud on a raspberry pi to sync everything. Works flawlessly for multiple years now.

  • I gave up on iCloud sync.

    After the tenth time iCloud absolutely destroyed my vault’s file layout and scattered copies of my files all over my iCloud Drive, I just gave up and shell out for paid sync now. It’s fine. I don’t mind paying for things I get actual value from.

  • I use Syncthing (with Synctrain client on iOS) and it works great.

    • protip: You can make synctrain sync with an iOS shortcut, with the shortcut being triggered when Obsidian is opened or closed. This means you're always in sync, even if iOS hasn't allowed synctrain to run in the background.

  • I've been using Obsidian since the beginning, and it's the best money I can spend annually. It works perfectly, and I've never had any problems.

  • https://github.com/vrtmrz/obsidian-livesync

    • I did run with this setup for a few months (I believe like, 5 months already?) and when it works, it's nice, but 90% of the time it has been extremely painful.

      Something breaks, one automatically updates and then it breaks the entire database, SCRAM mode, recovering is painful, and all the time I get warnings, spam and logs, it's anything but seamless.

      Which is a real pity, because when it works it feels magical to use within my laptop, my phone and my tablet, all self hosted, but the pain won and so I'm searching for new alternatives.

    • I use this and a self-hosted couchdb. So far it seems to be good, but I haven't spent more than a few hours with it yet. I do have what appears to be a working setup on ios, macos, and linux. Obsidian's large number of plugins and control surfaces is a bit hazardous.

  • I've had good luck with syncthing. But I only sync between laptop and desktop.. the mobile story with syncthing isn't ideal.

  • I have been using remotely save and a free bucket from backblaze. It as a s3 compatible api so works using the s3 feature.

    • I'm doing the same since this is the only method I found I can let my bot access the files, something I couldn't achieve with Obsidian Sync.. until now!

    • How is remotely save obsidian plugin mentioned only once here? I set it up with a OneDrive I was already using anyway to host and sync my vault there. I have it set up and synced on 4 devices with 4 different os (win11, macos, ios, android) and it works great and is free.

  • I've had no trouble with syncthing on Android. It just has access to the sync folders, as far as I can tell. Seems to work great, even if I've got the same file open simultaneously on several devices. I use a tablet in my kitchen to show my TODO at all times.

  • I use git. push to private repo, you can use a cron in your machine to push regularly and so on.

    The only limitation comes if you use the vault in a closed system like iOS, where you can't run terminal commands. other than that, flawless.

    • I’ve just about got this working on ios using the a-shell app as a terminal to run the git commands, with shortcuts set to run them when Obsidian opens and closes.

  • Paying for sync is my way of supporting the developers of this excellent application. The sync works well, it's less hassle, and more secure than using the usual cloud services, particularly for iOS and Android. Obsidian and Tailscale are the two pieces of software I gladly pay for, I don't ever want them enshittified!

  • I first used the Obsidian git-sync plugin. That worked fine, but but when I couldn't get it operable with my phone I caved and paid for sync.

The Obsidian CLI enables many scenarios not possible with the Markdown files alone: building and debugging plugins, running commands, controlling Obsidian, querying bases, accessing the Obsidian index, ...

I love that CLIs are getting a second wind.

  • I must be a fossil living under a rock, but: were they ever gone? As the amount of new CLI based applications I install on a monthly basis is always far more than the amount of new GUI based applications.

    • I think a lot of new developers used GUIs very exclusively for a very long time. Agentic workflows and Claude code have brought CLI tools to the forefront again.

      1 reply →

  • > I love that CLIs are getting a second wind.

    I just wish there were more solutions to add simple things like copy and paste to them.

    As though they were more a derivative of the text box I type in right now. And less to MS-DOS I grew up with.

    Outside of that, agreed. Eliminate GUI as a blocker.

This got me thinking if it’s possible to use Obsidian as taskwarrior. I’ve used taskwarrior in the past but it’s CLI interface which is fine for simpler tasks. Lately, I’ve been trying to use Obsidian as task manager and addition of Bases paved path for taskwarrior like usage, but in GUI. Having options to use it as CLI and as GUI offers flexibility.

I also used some plugins like bugwarrior to sync Jira/GitHub tickets locally. This is perfect when working on multiple projects/repos.

But I guess moving from Unix one tool for each job to swiss knife tool makes Obsidian overwhelming. Maybe it’s better to bridge these two tools in some way (plugins) rather than misuse Obsidian features.

  • Look at the video, it explicitly starts with dealing with tasks in Markdown files. Unintuitively if I might say so, but it does.

    I agree that now that this is a possibility, some sort of a wrapper would be great to see.

It's not super useful yet- you can't really view notes in the CLI but you can can trigger features like search.

  • Notes are stored in Markdown files. Why do you need Obsidian CLI to view notes when `cat` will do?

    • Okay, so my command line fu is not what it perhaps should be, but if I could use obsidian without the bloated app, I'd be even more in love.

      How would I be able to search obsidian links from the command line?

      Like, to travel between notes in the app of course I can just click on connecting links or search, but I wouldn't have the faintest idea how to do that in a cli.

      Is there some handy way to search the current folder and subfolders for text in a file with regex? Like some kind of >find term for all of my [[term]] entries in markdown files ?

      2 replies →

  • I've used it with Claude Code for refactoring and helping write a really in depth D&D campaign. Using frontmatter, I can keep metadata about NPCs and characters synced across all files.

    Fixes all the problems I've had about "In what order do I put this data" and flipping back and forth in a huge stack of papers.