Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Commands

We detail here most of wwid’s commands and provide some usage examples. For an exhaustive list, including command aliases, please see the built-in help text with wwid --help.

Editing notes

The most important subcommand is edit. Given a target, it’ll resolve the attached note and open that in your configured editor. Relative and absolute paths all work, as long as they resolve to a path inside the right project:

# note for the CWD
wwid edit .
# relative path
wwid edit ../Cargo.toml
# absolute path
wwid edit ~/foo/bar/src/main.rs

A common workflow may be to keep a general, project-wide task list attached to the root, while more granular reminders and implementation details may be linked to files. To make this use case more convenient, running wwid without any subcommand opens the root note for the current project. In other words, given a project located at /foo/bar, the following commands are equivalent:

# assuming $PWD = /foo/bar
wwid
wwid edit /foo/bar
wwid edit .

There is also a command to delete a note by its target:

wwid remove src/main.rs

The command will prompt you for confirmation. To do it non-interactively, set a flag:

wwid remove --force src/main.rs

Reading notes

Notes’ contents can be printed to standard output with the print command:

wwid print src/main.rs

This enables a number of workflows involving shell piping and filter commands.

Note

A write command to allow for completely non-interactive editing is planned for implementation. But for now, only reading is supported via print.

Querying the current project

We provide commands for querying some information with the current project. You can see information like the current project’s ID and hint, the locations of its data & config files, etc:

wwid status

You can also list the notes that exist inside this project. This will also show you which notes are orphaned or empty:

wwid list

Pruning

There is a command for pruning (or cleaning up) unneeded notes from the current project. An unneeded note is one whose body is empty, or an orphan (a note whose “owned” file/directory no longer exists.)

wwid prune

Like remove, the prune command prompts you for confirmation of each note before deleting it. To bypass it, pass the same flag as before:

wwid prune --force

Project commands

There is a small set of projects subcommands, which can operate on specific projects (not just the current one). You can list all available projects, including their metadata:

wwid projects list

Additionally, you can remove an entire project, including all of its notes. This is a highly destructive action, so it cannot be performed directly on the current project; the project ID must be specified. Like the other deletion commands, confirmation is prompted for, which can be bypassed with a flag.

wwid projects remove my-project-1
wwid projects remove --force another-proj-1