notesmd-cli icon indicating copy to clipboard operation
notesmd-cli copied to clipboard

Bug: create command fails silently and doesn't write files to vault

Open DolphusCY opened this issue 1 year ago • 2 comments

Description

The obsidian-cli create command fails silently and does not write files to the vault in version 0.1.9.

Steps to Reproduce

  1. Install obsidian-cli v0.1.9
  2. Set default vault: obsidian-cli set-default "MyVault"
  3. Attempt to create a note: obsidian-cli create "test-note" --content "Test content"
  4. Verify the note was created: obsidian-cli print "test-note"

Expected Behavior

  • The create command should write the note to the vault
  • obsidian-cli print "test-note" should display the created content

Actual Behavior

  • The create command returns without output (no error, no confirmation)
  • No file is written to the vault
  • obsidian-cli print "test-note" fails with "Cannot find note in vault"
  • The file does not exist in the vault directory

Reproducibility

  • Reproducible: Yes, consistently fails
  • Affects: create, create --append, create --overwrite
  • Version: 0.1.9

Workaround

Use bash echo commands instead: ```bash vault_path=$(obsidian-cli print-default --path-only) echo "Test content" > "$vault_path/test-note.md" ```

System Information

  • OS: macOS 25.1.0 (Darwin)
  • obsidian-cli version: 0.1.9
  • Installation method: Homebrew (yakitrak/yakitrak)

Additional Context

Other commands work correctly:

  • ✓ obsidian-cli print - reads notes
  • ✓ obsidian-cli move - renames/moves notes
  • ✓ obsidian-cli delete - deletes notes
  • ✓ obsidian-cli search-content - searches notes
  • ✗ obsidian-cli create - BROKEN

The issue appears to be isolated to the create command implementation.

DolphusCY avatar Dec 03 '25 10:12 DolphusCY

Hey thank you for the feedback. I just tried (on MacOS 26.1), and it seems to be working correctly for me. Have you tried to uninstall and reinstall Obsidian or the CLI? The create, open and delete commands all work using the Obsidian URI which doesn't leave much room for things to go wrong.

I can see in additional context you mentioned that delete command is working but can you please double check open and delete are definitely working?

Yakitrak avatar Dec 03 '25 17:12 Yakitrak

Closing as cannot reproduce and no more info provided, feel free to comment or reopen this.

Yakitrak avatar Dec 09 '25 18:12 Yakitrak