Skip to main content

Sharmory

GitHub release GitHub Downloads npm PyPI

A single-file library of dev-focused Zsh & PowerShell functions — Git shortcuts, Docker/K8s helpers, Go/Node/Python workflow utilities, networking checks, security/encoding helpers, and general productivity tools. No plugin manager, no framework — just source one file.

The GitHub badge counts Release page asset downloads (source zip/tarball). Homebrew tap, Scoop, curl | bash, and irm | iex are not included in that number. npm and PyPI have their own counters.

🚀 Quick Install (1-Line)

macOS / Linux / WSL (Zsh)

curl -fsSL https://raw.githubusercontent.com/hariharen9/sharmory/main/install.sh | bash

Windows (PowerShell 5.1+ & PowerShell Core 7+)

irm https://raw.githubusercontent.com/hariharen9/sharmory/main/install.ps1 | iex

Homebrew

brew tap hariharen9/tap
brew install sharmory

Then add source "$(brew --prefix)/opt/sharmory/functions.zsh" to ~/.zshrc.

Scoop

scoop bucket add hariharen9 https://github.com/hariharen9/scoop-bucket
scoop install sharmory

Then dot-source functions.ps1 from the Scoop app directory in $PROFILE.

npm

npm install -g sharmory
sharmory-install

pip

pip install sharmory
sharmory-install

Command HUD

Type sharmory with no arguments for an interactive catalog (fzf if installed, otherwise a numbered menu). You can also query it non-interactively:

sharmory                  # interactive HUD
sharmory list             # full catalog
sharmory list git         # one category
sharmory help killport    # description + usage
sharmory run now          # run a catalogued command
sharmory doctor           # environment health check
sharmory setup            # install optional tools (fzf, jq, eza, tldr)
sharmory bench            # source-time benchmark (clean shell)

sharmory-setup is the same as sharmory setup. It only offers small CLI helpers — not Docker, Kubernetes, Go, Node, or Python. You can skip any tool.


🔄 Updating & Maintenance

To update Sharmory to the latest version at any time, run:

sharmory-update

(Works natively in both Zsh and PowerShell).


📦 Manual Installation (Optional)

Manual Zsh Setup
git clone https://github.com/hariharen9/sharmory.git ~/.sharmory
echo 'source ~/.sharmory/functions.zsh' >> ~/.zshrc
source ~/.zshrc

Or without git:

curl -o ~/.sharmory-functions.zsh https://raw.githubusercontent.com/hariharen9/sharmory/main/functions.zsh
echo 'source ~/.sharmory-functions.zsh' >> ~/.zshrc
Manual PowerShell Setup
# Create profile if it doesn't exist yet
if (-not (Test-Path $PROFILE)) { New-Item -ItemType File -Path $PROFILE -Force }

# Clone and source Sharmory
git clone https://github.com/hariharen9/sharmory.git "$HOME\sharmory"
Add-Content $PROFILE '. "$HOME\sharmory\functions.ps1"'
. $PROFILE

Optional dependencies

Most functions work with only core system tools. A few optional tools provide enhanced capabilities:

Tool Used by
fzf fcd, ftext, dsh, k8sctx, klogs, kexec, fkill, gswitch
jq npmscripts, jenk-crumb, jenk-jobs, jsonpp
eza lsd
entr or fswatch watchrun, gowatch
tldr cheat (falls back to man / Get-Help)

Every function checks for its dependency and fails gracefully (or falls back to a standard alternative) if it is missing.

Categories

  • Navigation & Filesmkcd, up, lsd, fcd, ftext, permsof, extract, compress, duh, sizeof, findbig, emptydirs, dupfind, bak, cwd, clipcopy, watchrun
  • Gitgitundo, branchclean, branchage, gitlog-today, gacp, gclone, gwip, gunwip, gitprune, gswitch, prdiff, gitcontributors, gitsize, gitconflicts, gitignore
  • Docker & Kubernetesdockernuke, dockerclean-images, dclean, dockerlogs, dsh, dockersizes, k8sctx, klogs, kexec, ktop, kevents
  • Gocovreport, gomodwhy, goclean, goupdate, gobench, gonew, gowatch
  • Node/npmnpmclean, npmscripts, npmoutdated, npmsize
  • Pythonvenvcreate, pyclean, pyfreeze
  • Networkingmyip, localip, killport, portwho, certcheck, dnscheck, httpstatus, apihit, flushdns, weather, tcpcheck, shorten
  • Security & Encodingpassgen, pubkey, genssh, b64e/b64d, urlencode/urldecode, hashfile, genuuid
  • System & Processmem, cpu, pidtree, fkill, now, timer
  • Productivitynote, jsonpp, envload, ffind, cheat, calc, qr
  • CI/Jenkinsjenk-crumb, jenk-build, jenk-logs, jenk-jobs (needs JENKINS_URL, JENKINS_USER, JENKINS_TOKEN env vars)
  • Managementsharmory, sharmory doctor, sharmory-setup, sharmory-bench, sharmory-update

Testing

Both platforms ship a sandboxed self-test that exercises every function without touching your real system: no real docker/kubectl calls, no real network requests, no real processes killed, no real files outside a throwaway temp directory. External tools that would otherwise hit the network or a live daemon (docker, kubectl, curl/Invoke-RestMethod, dig/Resolve-DnsName, ssh-keygen, fzf, etc.) are mocked for the duration of the run, and the whole sandbox is deleted afterward whether the run passes or fails.

macOS/Linux:

chmod +x test-sharmory.zsh
./test-sharmory.zsh          # tests functions.zsh in the same directory
./test-sharmory.zsh path/to/functions.zsh   # or point at a specific file

Windows:

.\test-sharmory.ps1
.\test-sharmory.ps1 -FunctionsPath path\to\functions.ps1

Each run prints a PASS/FAIL/SKIP line per function and a summary count.

Exit code is 0 if everything passed or was cleanly skipped, 1 if anything actually failed — safe to wire into CI.

Platform Verification: Both the Zsh and PowerShell implementations are verified end-to-end against live interpreters with 100% sandboxed test suites. In Zsh, early testing caught variable collisions with the special $path array. In PowerShell, testing verified parser compatibility across Windows PowerShell 5.1 and modern PowerShell Core (7+), ensuring clean dot-sourcing into $PROFILE with zero startup errors.

⚠️ Plugin Manager Compatibility

If you use oh-my-zsh or another plugin manager, some function names may already exist as aliases. Sharmory automatically clears any conflicts at load time — sourcing it will always be clean.

🗑️ Uninstalling

macOS / Linux / WSL (Zsh)

curl -fsSL https://raw.githubusercontent.com/hariharen9/sharmory/main/uninstall.sh | bash

Windows (PowerShell)

irm https://raw.githubusercontent.com/hariharen9/sharmory/main/uninstall.ps1 | iex

Contributing

PRs adding new functions welcome. Keep the style consistent:

  • one function, one job
  • Usage: line printed when required args are missing
  • guard against missing optional dependencies rather than hard-failing
  • a one- or two-line comment above the function explaining what it does

License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sharmory-0.1.0.tar.gz (51.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sharmory-0.1.0-py3-none-any.whl (52.8 kB view details)

Uploaded Python 3

File details

Details for the file sharmory-0.1.0.tar.gz.

File metadata

  • Download URL: sharmory-0.1.0.tar.gz
  • Upload date:
  • Size: 51.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for sharmory-0.1.0.tar.gz
Algorithm Hash digest
SHA256 bc878a9bbc0f406a14e8878a89ecaac966b912e5baff17851bcb458f2eed6839
MD5 ef814c85ae748d4eea1c774aec541da6
BLAKE2b-256 ce22fc44487fa10968e528cab7403e12afdd4a8a3b645ed4118bf39725340fb4

See more details on using hashes here.

File details

Details for the file sharmory-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: sharmory-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 52.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for sharmory-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 39931d122e68a28d6381f58b80910bea113210f7b5ccdf03b6a2c877895e15b6
MD5 ed48151946169e347f90c5e3adc3dd3e
BLAKE2b-256 c4ccad5c9533d277856b62840af0eedbfee148a7606ef244e1e288402e5ab173

See more details on using hashes here.

Release history Release notifications | RSS feed

1.1.0

2 files

1.0.0

2 files

This release

0.1.0 This release

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page