Skip to content

suprbdev/mem

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mem

Save and run terminal commands by name.

Install

Via go install

go install github.com/suprbdev/mem@latest

From source

git clone git@github.com:suprbdev/mem.git
cd mem
make install   # installs to ~/.local/bin

Usage

mem [flags] <subcommand> [args]

Subcommands

Command Description
mem add <name> <command> Save a command
mem run <name> [args...] Run a saved command (extra args appended)
mem list List all saved commands
mem show <name> Print the raw command
mem delete <name> Delete a saved command

Flags

Flag Description
-local Use store in current directory instead of home
-file <name> Store filename (default .mem.json)

Examples

# global store (~/.mem.json)
mem add deploy "kubectl rollout restart deployment/app"
mem run deploy

# project-local store (./.mem.json) — commit this to share with your team
mem -local add build "go build ./..."
mem -local add test "go test ./..."
mem -local list

# custom filename
mem -local -file .project-cmds.json add lint "golangci-lint run"

Store

Mode Path
Default ~/.mem.json
-local ./.mem.json
-local -file <name> ./<name>
-file <name> ~/<name>

Make targets

make build      # build ./mem
make test       # run unit tests
make install    # install to ~/.local/bin
make uninstall  # remove from ~/.local/bin
make clean      # remove local binary

About

Save and run terminal commands by name.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors