The CLI app for remembering those little things that slip your mind
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
completions Set up baseline testing Jan 31, 2019
docs Revise the build process to be cross-platform Jan 25, 2019
src Add full tests Feb 1, 2019
.gitignore Add full tests Feb 1, 2019
Cargo.lock Set up baseline testing Jan 31, 2019
Cargo.toml Set up baseline testing Jan 31, 2019
LICENSE Add LICENSE and metadata for publication Jan 23, 2019
README.md remove man page (temp) Jan 25, 2019
makefile remove man page (temp) Jan 25, 2019
mn.gif Update preview gif Jan 23, 2019

README.md

Mnemonic

Mnemonic is a CLI app for remembering those little things that slip your mind.

I frequently forget things—nothing big, just little Unix commands that I don't use often enough to commit to memory, small details that might slip my mind, things like that.

I used to keep a notes text files saved in my home directory then run cat ~/notes to jog my memory. But then I decided there had to be a better—and prettier—way. But crucially, a way that preserves the simplicity of typing cat ~/notes.

And thus, Mnemonic was born. Invoke it with the mn command to quickly print a syntax-highlighted mnemonics to your terminal. Here it is in action:

Mnemonic in use

Installation

Currently, you have two installation options, both of which require Rust:

  • Install with cargo install mn (installs only the executable itself)
  • Clone the repository, cd into it, and run make install (installs the executable and Zsh completions (man page and completions for additional shells coming soon))

In the future, additional installation instructions will be supported (including through conventional package managers).

Usage

Run mn --help for full usage details. The basic commands are mn <MNEMONIC>, which shows a previously created mnemonic; mn list, which lists all existing mnemonics, mn add <MNEMONIC>, which creates a new mnemonic using your $EDITOR, and mn edit <MNEMONIC>, which edits an exiting mnemonic.

Each of these sub-commands takes various options as well. For example, you can also use mn add <MNEMONIC> --push "<TEXT>" to push text to a mnemonic without opening it in your editor or mn show <MNEMONIC> --syntax "yaml" to display a mnemonic with YAML syntax highlighting.

Consult the help command for full details.

Syntax highlighting

Mnemonic highlights all output as Markdown. If you wish a portion of text to be highlighted as a different language, you can use GitHub-style code-fences. For example,

```rust
fn main() {
    println!("Hello, world!");
}

```

would display syntax highlighting similar to

fn main() {
    println!("Hello, world!");
}

The syntax highlighting theme is user-configurable with the same themes used in Bat, which was a major inspiration for this project.