Toolbench
All tools

Command Teller

Describe what you want to do in plain English and get the matching shell or git command, with variants.

Plain English works — try “reset last commit” or “list all files”.

List files in current directory
Files
ls
ls -la
ls -lh
ls -lt
ls -lS
ls -R
Show directory as a tree
Files
tree
tree -L 2
tree -I 'node_modules|.git'
Print current working directory
Files
pwd
Change directory
Files
cd <path>
cd ..
cd -
cd ~
Create a new directory
Files
mkdir <name>
mkdir -p a/b/c
Create an empty file
Files
touch <file>
Delete files or directories
Files
rm <file>
rm -r <dir>
rm -rf <dir>
rm -i <file>
Copy files or directories
Files
cp <src> <dst>
cp -r <src> <dst>
cp -p <src> <dst>
Move or rename files
Files
mv <src> <dst>
mv -i <src> <dst>
Create a symlink
Files
ln -s <target> <link>
ln -sf <target> <link>
Print a file to the terminal
Files
cat <file>
cat -n <file>
Page through a file
Files
less <file>
less +F <file>
Show first/last lines of a file
Files
head -n 20 <file>
tail -n 20 <file>
tail -f <file>
Count lines / words / chars in a file
Files
wc -l <file>
wc -w <file>
wc <file>
Find files by name or pattern
Search
find . -name '*.ts'
find . -iname 'readme*'
find . -type d -name node_modules
find . -mtime -1
find . -size +10M
Search for text inside files
Search
grep -r 'pattern' .
grep -rni 'pattern' .
grep -rl 'pattern' .
grep -E 'foo|bar' file
rg 'pattern'
Find and replace text in a file
Search
sed 's/old/new/g' file
sed -i '' 's/old/new/g' file
sed -i 's/old/new/g' file
Extract or process columns of text
Search
awk '{print $1}' file
awk -F, '{print $2}' file.csv
Change file permissions
Permissions
chmod +x <file>
chmod 755 <file>
chmod -R 644 <dir>
Change file owner
Permissions
sudo chown user:group <file>
sudo chown -R user:group <dir>
List running processes
Process
ps aux
ps -ef
top
htop
Kill a process
Process
kill <pid>
kill -9 <pid>
pkill -f 'pattern'
killall <name>
Find what's using a port
Network
lsof -i :3000
lsof -nP -iTCP -sTCP:LISTEN
kill -9 $(lsof -ti :3000)
Make an HTTP request
Network
curl -i https://example.com
curl -X POST -d 'a=1' https://example.com
curl -H 'Content-Type: application/json' -d '{"a":1}' https://example.com
curl -O https://example.com/file.zip
Download a file
Network
wget <url>
wget -c <url>
wget -r <url>
Ping a host
Network
ping example.com
ping -c 4 example.com
Connect to a remote server via SSH
Network
ssh user@host
ssh -p 2222 user@host
ssh -i key.pem user@host
Copy files over SSH
Network
scp file user@host:/path/
scp user@host:/path/file .
scp -r dir user@host:/path/
Check disk space
Disk
df -h
du -sh *
du -sh ~/Downloads
Create or extract a tar archive
Archive
tar -czf out.tar.gz <dir>
tar -xzf in.tar.gz
tar -tzf in.tar.gz
Zip and unzip files
Archive
zip -r out.zip <dir>
unzip in.zip
unzip -l in.zip
Initialize a git repository
Git
git init
git init -b main
Clone a git repository
Git
git clone <url>
git clone --depth 1 <url>
git clone <url> <dir>
Show working tree status
Git
git status
git status -sb
Stage changes for commit
Git
git add <file>
git add .
git add -A
git add -p
Commit staged changes
Git
git commit -m 'message'
git commit -am 'message'
git commit --amend
git commit --amend --no-edit
Push commits to remote
Git
git push
git push -u origin <branch>
git push --force-with-lease
Pull from remote
Git
git pull
git pull --rebase
git fetch --all --prune
List, create, or delete branches
Git
git branch
git branch -a
git branch <name>
git branch -d <name>
git branch -D <name>
git branch -m <new>
Switch branches or restore files
Git
git switch <branch>
git switch -c <branch>
git checkout <branch>
git restore <file>
git restore --staged <file>
Merge another branch in
Git
git merge <branch>
git merge --no-ff <branch>
git merge --abort
Rebase the current branch
Git
git rebase <base>
git rebase -i HEAD~5
git rebase --continue
git rebase --abort
Reset to a previous commit
Git
git reset --soft HEAD~1
git reset --mixed HEAD~1
git reset --hard HEAD~1
git reset --hard <sha>
git reset HEAD <file>
Revert a commit (create an undo commit)
Git
git revert <sha>
git revert HEAD
git revert -n <sha>
Stash work in progress
Git
git stash
git stash -u
git stash list
git stash pop
git stash apply stash@{1}
git stash drop stash@{0}
View commit history
Git
git log --oneline -20
git log --graph --oneline --all
git log -p <file>
git log --since='2 weeks ago'
Show diffs
Git
git diff
git diff --staged
git diff main..feature
git diff <sha1> <sha2>
Create / list / push tags
Git
git tag
git tag v1.0.0
git tag -a v1.0.0 -m 'release'
git push --tags
git tag -d v1.0.0
Manage remotes
Git
git remote -v
git remote add origin <url>
git remote set-url origin <url>
git remote remove origin
Cherry-pick a commit
Git
git cherry-pick <sha>
git cherry-pick <sha1>..<sha2>
git cherry-pick --abort
Recover lost commits via reflog
Git
git reflog
git reset --hard HEAD@{1}
See who changed each line
Git
git blame <file>
git blame -L 10,30 <file>
Remove untracked files
Git
git clean -nd
git clean -fd
git clean -fdx
Configure git user
Git
git config --global user.name 'Your Name'
git config --global user.email 'you@example.com'
git config --list
Run npm common commands
Package
npm install
npm install <pkg>
npm install -D <pkg>
npm run <script>
npm uninstall <pkg>
npm outdated
Homebrew install / update / list
Package
brew install <pkg>
brew uninstall <pkg>
brew update && brew upgrade
brew list
brew search <name>

Runs entirely in your browser — nothing is sent to a server.