As a software developer, having a selection of great command line tools at your disposal is essential. Once you've harnessed the power of the command line, you're more productive; you have the tools necessary to quickly complete common tasks.
The following is a list of command line tools I've cultivated over the years in my career as a Software Engineer; most of which I use on a daily basis, and all of which enable me to be highly efficient and productive.
This list only includes projects that provide native binaries - npm packages such as eslint
or prettier
, while incredibly useful, aren't included.
General Utilities
zyedidia/eget
Eget: easy pre-built binary installation
Eget is the best way to easily get pre-built binaries for your favorite
tools. It downloads and extracts pre-built binaries from releases on GitHub. To
use it, provide a repository and Eget will search through the assets from the
latest release in an attempt to find a suitable prebuilt binary for your
system. If one is found, the asset will be downloaded and Eget will extract the
binary to the current directory. Eget should only be used for installing
simple, static prebuilt binaries, where the extracted binary is all that is
needed for installation. For more complex installation, you may use the
--download-only
option, and perform extraction manually.
For software maintainers, if you provide prebuilt binaries on GitHub, you can
list eget
as a one-line method for users to install your software.
Eget has a number of detection mechanisms and should work out-of-the-box with most…
zyedidia/micro
micro is a terminal-based text editor that aims to be easy to use and intuitive, while also taking advantage of the capabilities of modern terminals. It comes as a single, batteries-included, static binary with no dependencies; you can download and use it right now!
As its name indicates, micro aims to be somewhat of a successor to the nano editor by being easy to install and use It strives to be enjoyable as a full-time editor for people who prefer to work in a terminal, or those who regularly edit files over SSH.
Here is a picture of micro editing its source code.
To see more screenshots of micro, showcasing some of the default color schemes, see here.
You can also check out the website for Micro at https://micro-editor.github.io.
Features
- Easy to use and install.
- No dependencies or external files are needed — just the binary you can…
stedolan/jq
jq
jq
is a lightweight and flexible command-line JSON processor akin to sed
,awk
,grep
, and friends for JSON data. It's written in portable C and has zero runtime dependencies, allowing you to easily slice, filter, map, and transform structured data.
Documentation
- Official Documentation: jqlang.github.io/jq
- Try jq Online: jqplay.org
Installation
Prebuilt Binaries
Download the latest releases from the GitHub release page.
Docker Image
Pull the jq image to start quickly with Docker.
Run with Docker
Example: Extracting the version from a package.json
file
docker run --rm -i ghcr.io/jqlang/jq:latest < package.json '.version'
Example: Extracting the version from a package.json
file with a mounted volume
docker run --rm -i -v "$PWD:$PWD" -w "$PWD" ghcr.io/jqlang/jq:latest '.version' package.json
Building from source
Dependencies
- libtool
- make
- automake
- autoconf
Instructions
git submodule update --init # if building from git to get
…ggreer/the_silver_searcher (ag)
ggreer / the_silver_searcher
A code-searching tool similar to ack, but faster.
The Silver Searcher
A code searching tool similar to ack
, with a focus on speed.
Do you know C? Want to improve ag? I invite you to pair with me.
What's so great about Ag?
- It is an order of magnitude faster than
ack
. - It ignores file patterns from your
.gitignore
and.hgignore
. - If there are files in your source repo you don't want to search, just add their patterns to a
.ignore
file. (*cough**.min.js
*cough*) - The command name is 33% shorter than
ack
, and all keys are on the home row!
Ag is quite stable now. Most changes are new features, minor bug fixes, or performance improvements. It's much faster than Ack in my benchmarks:
ack test_blah ~/code/ 104.66s user 4.82s system 99% cpu 1:50.03 total
ag test_blah ~/code/ 4.67s user 4.58s system 286% cpu 3.227 total
Ack and Ag found the same…
chmln/sd
sd - s
earch & d
isplace
sd
is an intuitive find & replace CLI.
The Pitch
Why use it over any existing tools?
Painless regular expressions. sd
uses regex syntax that you already know from JavaScript and Python. Forget about dealing with quirks of sed
or awk
- get productive immediately.
String-literal mode. Non-regex find & replace. No more backslashes or remembering which characters are special and need to be escaped.
Easy to read, easy to write. Find & replace expressions are split up, which makes them easy to read and write. No more messing with unclosed and escaped slashes.
Smart, common-sense defaults. Defaults follow common sense and are tailored for typical daily use.
Comparison to sed
While sed does a whole lot more, sd focuses on doing just one thing and doing it well. Here are some cherry-picked examples where sd shines.
Simpler syntax for replacing all occurrences:
- …
sharkdp/bat
A cat(1) clone with syntax highlighting and Git integration
Key Features •
How To Use •
Installation •
Customization •
Project goals, alternatives
[English]
[中文]
[日本語]
[한국어]
[Русский]
Sponsors
A special thank you goes to our biggest sponsors:
Your app, enterprise-ready.
Start selling to enterprise customers with just a few lines of code.
Add Single Sign-On (and more) in minutes instead of months.
Warp is a modern, Rust-based terminal with AI built in
so you and your team can build great software, faster.
Feel more productive on the command line with parameterized commands,
autosuggestions, and an IDE-like text editor.
Syntax highlighting
bat
supports syntax highlighting for a large number of programming and markup
languages:
Git integration
bat
communicates with git
to show modifications with respect to the index
(see left side bar):
Show non-printable characters
You can use the -A
/…
charmbracelet/mods
charmbracelet / mods
AI on the command line
Mods
AI for the command line, built for pipelines.
Large Language Models (LLM) based AI is useful to ingest command output and format results in Markdown, JSON, and other text based formats. Mods is a tool to add a sprinkle of AI in your command line and make your pipelines artificially intelligent.
It works great with LLMs running locally through LocalAI. You can also use OpenAI, Cohere, Groq, or Azure OpenAI.
Installation
Use a package manager:
# macOS or Linux
brew install charmbracelet/tap/mods
# Windows (with Winget)
winget install charmbracelet.mods
# Arch Linux (btw)
yay -S mods
# Nix
nix-shell -p mods
Debian/Ubuntu
sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://repo.charm.sh/apt/gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/charm.gpg
echo "deb [signed-by=/etc/apt/keyrings/charm.gpg] https://repo.charm.sh/apt/ * *" | sudo tee /etc/apt/sources.list.d/charm.list
sudo apt update && sudo apt install mods
Fedora/RHEL
echo '[charm]
name=Charm
baseurl=https://repo.charm.sh/yum/
enabled=1
gpgcheck=1
gpgkey=https://repo.charm.sh/yum/gpg.key
…Development
go-task/task
Task
Task is a task runner / build tool that aims to be simpler and easier to use than, for example, GNU Make.
Installation | Documentation | Twitter | Mastodon | Discord
cli/cli
GitHub CLI
gh
is GitHub on the command line. It brings pull requests, issues, and other GitHub concepts to the terminal next to where you are already working with git
and your code.
GitHub CLI is supported for users on GitHub.com and GitHub Enterprise Server 2.20+ with support for macOS, Windows, and Linux.
Documentation
For installation options see below, for usage instructions see the manual.
Contributing
If anything feels off, or if you feel that some functionality is missing, please check out the contributing page. There you will find instructions for sharing your feedback, building the tool locally, and submitting pull requests to the project.
If you are a hubber and are interested in shipping new commands for the CLI, check out our doc on internal contributions.
Installation
macOS
gh
is available via Homebrew, MacPorts, Conda, Spack, Webi, and as a…
boyter/scc
boyter / scc
Sloc, Cloc and Code: scc is a very fast accurate code counter with complexity calculations and COCOMO estimates written in pure Go
Sloc Cloc and Code (scc)
A tool similar to cloc, sloccount and tokei. For counting the lines of code, blank lines, comment lines, and physical lines of source code in many programming languages.
Goal is to be the fastest code counter possible, but also perform COCOMO calculation like sloccount, estimate code complexity similar to cyclomatic complexity calculators and produce unique lines of code or DRYness metrics. In short one tool to rule them all.
Also it has a very short name which is easy to type scc
.
If you don't like sloc cloc and code feel free to use the name Succinct Code Counter
.
Licensed under MIT licence.
Support
Using scc
commercially? If you want priority support for scc
you can purchase a years worth https://boyter.gumroad.com/l/kgenuv which entitles you to priority direct email support from the developer.
Install
Go Get
If you are comfortable using Go and have…
dandavison/delta
dandavison / delta
A syntax-highlighting pager for git, diff, grep, and blame output
Get Started
Install it (the package is called "git-delta" in most package managers, but the executable is just delta
) and add this to your ~/.gitconfig
:
[core]
pager = delta
[interactive]
diffFilter = delta --color-only
[delta]
navigate = true # use n and N to move between diff sections
# delta detects terminal colors automatically; set one of these to disable auto-detection
# dark = true
# light = true
[merge]
conflictstyle = diff3
[diff]
colorMoved = default
Delta has many features and is very customizable; please see the user manual.
Features
- Language syntax highlighting with the same syntax-highlighting themes as bat
- Word-level diff highlighting using a Levenshtein edit inference algorithm
- Side-by-side view with line-wrapping
- Line numbering
-
n
andN
keybindings to move between files in large diffs, and between diffs inlog -p
views (--navigate
) - …
nektos/act
"Think globally,
act
locally"
Run your GitHub Actions locally! Why would you want to do this? Two reasons:
-
Fast Feedback - Rather than having to commit/push every time you want to test out the changes you are making to your
.github/workflows/
files (or for any changes to embedded GitHub actions), you can useact
to run the actions locally. The environment variables and filesystem are all configured to match what GitHub provides. -
Local Task Runner - I love make. However, I also hate repeating myself. With
act
, you can use the GitHub Actions defined in your.github/workflows/
to replace yourMakefile
!
How Does It Work?
When you run act
it reads in your GitHub Actions from .github/workflows/
and determines the set of actions that need to be run. It uses the Docker API to either pull or build the necessary images, as defined in your workflow…
caarlos0/svu
svu
Semantic Version Util is a tool to manage semantic versions at ease!
You can print the current version, increase patch/minor/major manually or just get the next tag based on your git log!
example usage
svu
Based on the log between the latest tag and HEAD
, prints the next tag.
aliases:
svu next
andsvu n
$ svu
v1.3.0
commit messages vs what they do
Commit message | Tag increase |
---|---|
fix: fixed something |
Patch |
feat: added new button to do X |
Minor |
fix: fixed thing xyz BREAKING CHANGE: this will break users because of blah
|
Major |
fix!: fixed something |
Major |
feat!: added blah |
Major |
chore: foo |
Nothing |
svu current
Prints the current tag with no changes.
alias:
svu c
Examples:
$ svu current
v1.2.3
$ svu current
v1.2.3-alpha.1+22
svu major
Increases the major of the latest tag and prints it
As per the Semver spec, it'll also clear the pre-release
…
permafrost-dev/stackup
permafrost-dev / stackup
a single application to spin up your entire dev stack.
StackUp
Spin up your entire dev stack with one command.
StackUp
offers many features and advanced functionality. Here are some of the highlights:
- Define tasks that run on startup, shutdown, or on a schedule.
- Customize tasks and preconditions using javascript.
- Run tasks on a cron schedule, i.e. running
php artisan schedule:run
once every minute. - Load remote configurations via http or S3.
- Fast in-memory cache skips http requests when possible.
- Http request gateway prevents unwanted access to remote urls, domains and content types.
- Send notifications with Telegram and Slack integrations.
Table of Contents
-
StackUp
- Table of Contents
- About
- Running StackUp
- Configuration
- Integrations
- …
google/yamlfmt
yamlfmt
yamlfmt
is an extensible command line tool or library to format yaml files.
Goals
- Create a command line yaml formatting tool that is easy to distribute (single binary)
- Make it simple to extend with new custom formatters
- Enable alternative use as a library, providing a foundation for users to create a tool that meets specific needs
Maintainers
This tool is not yet officially supported by Google. It is currently maintained solely by @braydonk, and unless something changes primarily in spare time.
Blog
I'm going to use these links to GitHub Discussions as a blog of sorts, until I can set up something more proper:
Installation
To download the yamlfmt
command, you can download the desired binary from releases or install the module directly:
go install github.com/google/yamlfmt/cmd/yamlfmt@latest
This currently requires Go version 1.18 or greater.
NOTE: Recommended setup…
watchexec/watchexec
watchexec / watchexec
Executes commands in response to file modifications —— Maintenance status: on hold. I have no time for OSS currently; back late 2024.
Watchexec
Software development often involves running the same commands over and over. Boring!
watchexec
is a simple, standalone tool that watches a path and runs a command whenever it detects modifications.
Example use cases:
- Automatically run unit tests
- Run linters/syntax checkers
- Rebuild artifacts
Features
- Simple invocation and use, does not require a cryptic command line involving
xargs
- Runs on OS X, Linux, and Windows
- Monitors current directory and all subdirectories for changes
- Coalesces multiple filesystem events into one, for editors that use swap/backup files during saving
- Loads
.gitignore
and.ignore
files - Uses process groups to keep hold of forking programs
- Provides the paths that changed in environment variables or STDIN
- Does not require a language runtime, not tied to any particular language or ecosystem
- And more!
Quick start
Watch all JavaScript, CSS and HTML files in the current directory and all subdirectories for changes, running npm run build
when a…
Linting
golangci/golangci-lint
golangci / golangci-lint
Fast linters runner for Go
golangci-lint
Fast linters runner for Go
golangci-lint
is a fast Go linters runner.
It runs linters in parallel, uses caching, supports YAML configuration integrates with all major IDEs, and includes over a hundred linters.
Install golangci-lint
Documentation
Documentation is hosted at https://golangci-lint.run.
Social Networks
Supporting Us
golangci-lint
is a free and open-source project built by volunteers.
If you value it, consider supporting us, we appreciate it! ❤️
Badges
Contributors
This project exists thanks to all the people who contribute. How to contribute.
Core Team
About core team
The GolangCI Core Team is a group of contributors who have demonstrated a lasting enthusiasm for the project and community. The GolangCI Core Team has GitHub admin privileges on the repo.
Responsibilities
The Core Team has the following responsibilities:
- Being available to answer high-level questions about vision and future.
- Being available to review…
dotenv-linter/dotenv-linter
dotenv-linter / dotenv-linter
⚡️Lightning-fast linter for .env files. Written in Rust 🦀
⚡️Lightning-fast linter for .env
files. Written in Rust 🦀
dotenv-linter
can check / fix / compare .env
files for problems that may cause the application to malfunction.
Available checks:
✅ Duplicated key
✅ Ending blank line
✅ Extra blank line
✅ Incorrect delimiter
✅ Key without value
✅ Leading character
✅ Lowercase key
✅ Quote character
✅ Space character
✅ Substitution key
✅ Trailing whitespace
✅ Unordered key
✅ Value without quotes
What is a .env
file?
💡 A .env
file or dotenv
file is a simple text file containing all the environment variables of a project.
Storing configuration in the environment variables is one of the tenets of the Manifesto of Twelve-Factor App.
The .env
file has a simple key-value format, for example: FOO=BAR
.
More information you can find in articles in English and Russian
The key features:
⚡️ Lightning-fast because it is written…
rhysd/actionlint
rhysd / actionlint
:octocat: Static checker for GitHub Actions workflow files
actionlint
actionlint is a static checker for GitHub Actions workflow files. Try it online!
Features:
- Syntax check for workflow files to check unexpected or missing keys following workflow syntax
-
Strong type check for
${{ }}
expressions to catch several semantic errors like access to not existing property type mismatches, ... -
Actions usage check to check that inputs at
with:
and outputs insteps.{id}.outputs
are correct - Reusable workflow check to check inputs/outputs/secrets of reusable workflows and workflow calls
-
shellcheck and pyflakes integrations for scripts at
run:
- Security checks; script injection by untrusted inputs, hard-coded credentials
-
Other several useful checks; glob syntax validation, dependencies check for
needs:
runner label validation, cron syntax validation, ...
See the full list of checks done by actionlint.
Example of broken workflow:
on
push:
branch: main
tags:
- 'v\d+'
jobs:
test:
strategy:
matrix:
os
…hadolint/hadolint
Haskell Dockerfile Linter
A smarter Dockerfile linter that helps you build best practice Docker
images. The linter parses the Dockerfile into an AST and performs rules on
top of the AST. It stands on the shoulders of ShellCheck to lint
the Bash code inside RUN
instructions.
🌐 Check the online version on hadolint.github.io/hadolint
Table of Contents
- How to use
- Install
- CLI
- Configure
- Non-Posix Shells
- Ignoring Rules
- Linting Labels
- Integrations
- Rules
- Develop
- Alternatives
How to use
You can run hadolint
locally to lint your Dockerfile.
hadolint <Dockerfile>
hadolint --ignore DL3003 --ignore DL3006 <Dockerfile> # exclude specific rules
hadolint --trusted-registry my-company.com:500 <Dockerfile> # Warn when using untrusted FROM images
Docker comes to the rescue, providing an easy way how to run hadolint
on most
platforms
Just pipe…
biomejs/biome
biomejs / biome
A toolchain for web projects, aimed to provide functionalities to maintain them. Biome offers formatter and linter, usable via CLI and LSP.
Biome is a performant toolchain for web projects, it aims to provide developer tools to maintain the health of said projects.
Biome is a fast formatter for JavaScript, TypeScript, JSX, JSON, CSS and GraphQL that scores 97% compatibility with Prettier.
Biome is a performant linter for JavaScript, TypeScript, JSX, CSS and GraphQL that features more than 270 rules from ESLint, typescript-eslint, and other sources It outputs detailed and contextualized diagnostics that help you to improve your code and become a better programmer!
Biome is designed from the start to be used interactively within an editor It can format and lint malformed code as you are writing it.
Installation
npm install --save-dev --save-exact @biomejs/biome
Usage
# format files
npx @biomejs/biome format --write ./src
# lint files
…
Top comments (4)
I can also highly recommend lazygit and lazydocker. Using these tools every day.
Could you provide links to their repos?
Nice! I will definitely try out some of them.
Thanks! Pro tip: use
eget
to automate the installation/updating of the binaries in a shell script.