|0.1.1||Sep 17, 2022|
|0.1.0||Sep 13, 2022|
#822 in Command line utilities
Installation • Notes • Usage • Changelog • Build from Source • Dependencies • Authors • License
Jot is a feature-stripped version of Obsidian focused on rapid note management through the terminal.
It uses the same format of storage as Obsidian, i.e. markdown files for notes, and local folders for vaults (and sub-folders).
Commands that encompass all basic needs are included. Each command has an alias (two letter abbreviation) to further increase rapidity.
Jot is under active development. While it contains all basic functions that should serve most needs, there's a laundry list of features that are yet to and will be added overtime.
Install with cargo:
$ cargo install jt
Use executable (only for windows)
Download Jot v0.1.1 (.exe) and add it to your path.
- App data is stored in config and data files in locations generated by the directories crate. Individual Vault data is stored in '.jot' folder inside each vault. It is advised that these files not be tampered with, since atm there's no way to automatically fix them.
- App data files are generated in their default state the first time a command is run, if they don't exist already. Vault data files are generated in their default state when a vault is created.
- App config has two fields: editor & conflict.
- editor by default is set to nvim and conflict to true.
- conflict field tells jot if the editor conflicts with it for control over the terminal. Set it to true for editors like nvim and false for editors like notepad.
- Jot is published on crates.io as 'jt', since 'jot' wasn't available.
The following example represents a general user flow when first using Jot.
Create a vault using the following command:
$ jt vault newvault ~/vaults
Here, newvault is the name of the vault, and '~/vault' is the location where it will be created (this location should be an absolute fs path and exist already or jot will throw an error).
Providing no arguments to
vault command will list all vaults.
$ jt vault
Adding the '-l' flag will list all vaults with their locations.
$ jt vault -l
At this moment only newvault will be listed.
Enter into the vault:
$ jt enter newvault
enter command is also used to switch to other vaults.
Create notes and folders
$ jt note newnote
$ jt folder newfolder
folder, both work similarly and create the corresponding items in current folder. When a vault is first created, the current folder is set to its root.
$ jt chdir newfolder
chdir command will switch the current folder to the location mentioned.
Relative path to location from current folder has to be provided. Standard fs paths are accepted as valid input, like '../folder1/somefolder/'.
$ jt chdir ..
This will switch back to the root of vault.
Print dir tree of current folder
$ jt list
list command will print the dir tree of current folder.
All notes will be highlighted in blue .
This is what the dir tree will look like with this vault's root as the current folder.
newvault ├── newfolder └── newnote # highlighted in blue
remove works as its name suggests, on all items (vaults, notes, or folders).
$ jt remove note newnote
move are used similarly but take one additional argument each.
rename takes the new name as its third argument.
$ jt rename note newnote somenewnote
move takes the new location as its third argument.
For vaults, path rules are same as
vault command and for other items, path rules are same as
$ jt move note newnote /newfolder/
These commands take the item type (vault, note, or folder) as their first argument.
vmove is similar to
move, but it moves an item (note or folder) from the current folder of the current vault to the root of a different vault, and takes the name of this vault as an argument in place of location.
$ jt vmove note newnote somevault
Every keyword used so far (commands and item names) is interchangeable with its two letter alias, e.g.
move command can also be written as:
$ jt mv nt newnote /newfolder/
Handle Jot's config
$ jt config editor
The value of the provided field will be printed with
config command. Providing a value as an additional argument with this command will update the field.
$ jt config editor code.cmd
- v0.1.1 :
- As advised by u/epage (github/epage) on my r/rust post, commands are now represented by their full word, and the two letter abbreviations (previously serving as commands themselves) are now aliases for these commands.
- Updated docs.
Build from Source
- Git is need to clone the repository on your machine.
- Cargo is needed to compile the program.
Clone the repo and cd into the directory:
$ git clone https://github.com/araekiel/jot.git $ cd jot
Run the following command to install dependencies and build/compile the program.
$ cargo build
Then run the executable created in 'target/debug/' (or add it to your path).
Or, run the tool directly:
$ cargo run -- *args*
Pass in commands and arguments after '--'.
- serde & toml: 'serde' and 'toml' have been used in tandem to read and write data files.
- clap: 'clap' has been used to create the command line interface.
- directories: 'directories' crate has been used to generate system-dependent config and data file locations.
- fs_extra: 'fs_extra' crate has been used for recursive move of folders.
- araekiel - Github
MIT License | Copyright (c) 2022 Kumar Shashwat