Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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.

About

The CLI app for remembering those little things that slip your mind

Resources

License

Releases

No releases published

Packages

No packages published