TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Show HN: Is": An Inspector for Your Environment

2 pointsby oaldersover 1 year ago
https:&#x2F;&#x2F;github.com&#x2F;oalders&#x2F;is<p>I wrote a tool to make shell scripting just a little bit easier. It has a syntax that reads just a little bit like English, so that you can ask questions of your environment. That means you can do things like:<p>Check the version of a CLI tool:<p>$ is cli version tmux gt 3.2 &amp;&amp; echo || echo<p>Check an OS version by its code name:<p>$ is os version-codename in ventura,monterey<p>Do things only if a dependency is installed:<p>$ is there go &amp;&amp; go install golang.org&#x2F;x&#x2F;tools&#x2F;cmd&#x2F;goimports@latest<p>Query a CLI version:<p>$ is known cli version bash<p>5.2.15<p>Check if today is Wednesday using a case insensitive regex:<p>$ is cli output stdout date like &quot;(?i)wed&quot;<p>Update a binary if it&#x27;s older than 7 days:<p>$ is cli age goimports gt 7 days &amp;&amp; go install golang.org&#x2F;x&#x2F;tools&#x2F;cmd&#x2F;goimports@latest<p>Check the major (or minor, or patch) version of your OS:<p>$ is os version --major eq 13<p>Install if you have passwordless sudo:<p>$ is user sudoer &amp;&amp; sudo apt-get install ripgrep<p>Check the output of STDERR for an arbitrary command:<p>$ is cli output stderr ssh --arg=&quot;-V&quot; like 9.0p1<p>The idea is to make some scripting tasks less tedious. I mostly wrote this because I could and because I enjoyed doing it.

no comments

no comments