Aliases that keep your secrets and time every run.

Save any command as a short alias, like ez deploy, and run it by name. Secrets come from your Keychain, so they never sit in a script. And every run is timed, so you know whether a build takes thirty seconds or a coffee break, and when it starts taking longer.

brew tap urtti/ez && brew install ez

macOS · Native Swift binary · MIT licensed

Terminal recording: ez test reports the run was 74% slower than its median, ez stats shows three weeks of drift, and ez stats lists each alias with its duration trend

How it works

Create an alias and run it

ez add saves a command under a name of your choosing. Aliases belong to the folder you made them in and live in its .ez_cli.json, so ez check can mean something different in each repo. Commit the file and your team gets them too.

$ ez add deploy "./scripts/deploy.sh --env prod"🐘 ez deploy now stores ./scripts/deploy.sh --env prod. Execute in this directory with ez deploy.
$ ez deploy🐘 Executing: ./scripts/deploy.sh --env prod
Deploying to production...
🐘⏱️ 47.900 s

Store a secret and use it

Secrets stay in your Keychain and reach the command through its environment. Never on disk, never printed, and never sitting in ps.

$ ez add-secret --key EZ_API_KEYEnter value for EZ_API_KEY:
🐘 Secret 'EZ_API_KEY' stored in keychain.
$ ez add upload 'curl -H "Authorization: {EZ_API_KEY}" ...'🐘 ez upload now stores curl -H "Authorization: {EZ_API_KEY}" ... Execute in this directory with ez upload.
$ ez upload🐘 Executing: curl -H "Authorization: {EZ_API_KEY}" https://api.example.com

See which commands got slower

Every run is timed and kept on your Mac in ~/.ez/runs.db: the alias that ran, never your arguments or secrets. ez stats shows each alias's median time and success rate, and flags the ones getting slower.

$ ez stats
🐘 Run history
alias success rate median duration duration trend
ez build 18 of 18 12.400 s ↑ 33% slower
ez deploy 6 of 6 47.900 s · needs 4 more runs
ez test 22 of 25 4.135 s → steady

Pass arguments

{1} and {2} take arguments in order. Anything extra goes on the end.

$ ez add tag 'git tag -a {1} -m "Release {1}"'🐘 ez tag now stores git tag -a {1} -m "Release {1}". Execute in this directory with ez tag.
$ ez tag v2.0.0🐘 Executing: git tag -a v2.0.0 -m "Release v2.0.0"

Run commands in parallel

An alias made with ez add -p runs its commands side by side and times each one. A single Ctrl+C stops them all.

$ ez add -p checks "npm run lint" "npm run typecheck"🐘 ez checks now stores npm run lint | npm run typecheck. Execute in this directory with ez checks.
$ ez checks
🐘 Executing: npm run lint | npm run typecheck
🐘 Running in parallel: npm run lint, npm run typecheck
Started [PID:41482] npm run lint...
Started [PID:41483] npm run typecheck...
🐘⏱️ [PID:41482] npm run lint 2.110 s
🐘⏱️ [PID:41483] npm run typecheck 3.810 s

Good to know

  • An alias exits with the code of whatever it ran, so ez test && ez deploy stops at a failed test, in scripts and in CI.
  • vim, less and ssh work through an alias exactly as they would directly.
  • No tracking or telemetry, and no network calls of its own.

Already have it?

brew update && brew upgrade ez