Save and run terminal commands by name.
Via go install
go install github.com/suprbdev/mem@latestFrom source
git clone git@github.com:suprbdev/mem.git
cd mem
make install # installs to ~/.local/binmem [flags] <subcommand> [args]
| 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 |
| Flag | Description |
|---|---|
-local |
Use store in current directory instead of home |
-file <name> |
Store filename (default .mem.json) |
# 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"| Mode | Path |
|---|---|
| Default | ~/.mem.json |
-local |
./.mem.json |
-local -file <name> |
./<name> |
-file <name> |
~/<name> |
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