Git Product home page Git Product logo

obsidian-cli's Introduction

Obsidian CLI


Obs Usage



Description

Obsidian is a powerful and extensible knowledge base application that works on top of your local folder of plain text notes. This CLI tool (written in Go) will let you interact with the application using the terminal. You are currently able to open, search, move, create, update and delete notes.


Install

Windows

You will need to have Scoop installed. On powershell run:

scoop bucket add scoop-yakitrak https://github.com/yakitrak/scoop-yakitrak.git
scoop install obs

For full installation instructions, see Windows installation manual.

Mac and Linux

You will need to have Homebrew installed.

brew tap yakitrak/yakitrak
brew install yakitrak/yakitrak/obs

For full installation instructions, see Mac and Linux manual.

Usage

Help

# See All command instructions
obs --help

Set Default Vault

Defines default vault for future usage. If not set, pass --vault flag for other commands. You don't provide the path to vault here, just the name.

obs set-default "{vault-name}"

Note: open and other commands in obs use this vault's base directory as the working directory, not the current working directory of your terminal.

Print Default Vault

Prints default vault and path. Please set this with set-default command if not set.

obs print-default

Open Note

Open given note name in Obsidian. Note can also be an absolute path from top level of vault.

# Opens note in obsidian
obs open "{note-name}"

# Opens note in specified obsidian
obs open "{note-name}" --vault "{vault-name}"

Search Note

Opens obsidian search tab with given search text

# Searches in default obsidian
obs search "{search-text}"

# Searches in specified obsidian
obs search "{search-text}" --vault "{vault-name}"

Create / Update Note

Creates note (can also be a path with name) in vault. By default, if the note exists, it will create another note but passing --overwrite or --append can be used to edit the named note.

# Creates empty note in default obsidian and opens it
obs create "{note-name}"

# Creates empty note in given obsidian and opens it
obs create "{note-name}"  --vault "{vault-name}"

# Creates note in default obsidian with content
obs create "{note-name}" --content "abcde"

# Creates note in default obsidian with content - overwrite existing note
obs create "{note-name}" --content "abcde" --overwrite

# Creates note in default obsidian with content - append existing note
obs create "{note-name}" --content "abcde" --append

# Creates note and opens it
obs create "{note-name}" --content "abcde" --open

Move / Rename Note

Moves a given note(path from top level of vault) with new name given (top level of vault). If given same path but different name then its treated as a rename. All links inside vault are updated to match new name.

# Renames a note in default obsidian
obs move "{current-note-path}" "{new-note-path}"

# Renames a note and given obsidian
obs move "{current-note-path}" "{new-note-path}" --vault "{vault-name}"

# Renames a note in default obsidian and opens it
obs move "{current-note-path}" "{new-note-path}" --open

Delete Note

Deletes a given note (path from top level of vault).

# Renames a note in default obsidian
obs delete "{note-path}" 

# Renames a note in given obsidian
obs delete "{note-path}" --vault "{vault-name}"

Contribution

Fork the project, add your feature or fix and submit a pull request. You can also open an issue to report a bug or request a feature.

License

Available under MIT License

obsidian-cli's People

Contributors

yakitrak avatar jneidel avatar richardlitt avatar

Stargazers

Joel Van Eenwyk avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.