Basic usage and examples.
+x
colors
cpwd
docker-clean
ds-delete
dust
flushdns
g
git-copy-branch-name
git-last-commit-was
git-pr
git-publish
git-setup
git-standup
git-tidy
git-track
hoy
imgtowebp
license
myip
nnn
node-modules-clean
node-modules-size
npmplease
nyan
optimage
optimize-video
passphrase
ppp
proofread
serve
set-defaults
ssh-copy
sync-apps-data
sync-color-themes
update-apps-icons
upup
wg
Make a file executable.
+x {{file}}
Display all the terminal colors configured, in nice panes. Each card has a color code which can be handy when writing some scripts or configuring colors.
colors
Copy the current directory path to clipboard.
cpwd
Clear Docker cache and free up space on your system without asking for confirmation.
docker-clean
Delete all .DS_Store
in the current directory and its subdirectories.
ds-delete
List sizes of files & dirs in the current directory.
dust
Clear the DNS cache on your Mac.
flushdns
Quick grep: rg (ripgrep), ack or grep. Usage with ripgrep
.
-
Recursively search the current directory for a regex pattern:
g {{pattern}}
-
Search for a pattern only in a certain filetype (e.g., html, css, etc.):
g -t {{filetype}} {{pattern}}
-
Search for a pattern in files matching a glob (e.g.,
README.*
):g -g {{glob}} {{pattern}}
-
Match only at word boundaries:
g -w {{pattern}}
-
Case-sensitive search:
g -s {{pattern}}
-
Search for a pattern only in a file or directory:
g {{pattern}} {{file_or_dir}}
-
Replace a pattern (will only print results, use
wg
command to do the actual replace):g {{pattern}} {{filename}} --replace {{replacement}}
Copy the current branch name to the clipboard.
git-copy-branch-name
Display the date of the last commit of the active Git branch.
git-last-commit-was
Check out a pull request from GitHub via gh
CLI tool.
-
List all open pull requests:
git-pr
-
Check out the corresponding pull request:
git-pr {{pr_id}}
-
Pass down any other argument to the original
gh pr
command.git-pr {{arg(s)}}
Push up the branch and set upstream for the current branch. origin
is a default origin used.
git-publish
git-publish {{origin}}
Set up a git repository (if one doesn't exist), add all files, and make an initial commit. dir
defaults to the current working directory.
git-setup [-m Custom commit message]
Show my commits since yesterday or since last Friday.
git-standup
Delete branches that are listed in git branch --merged
and perform some extra cleanup.
git-tidy
Set up your branch to track a remote branch. origin
is a default origin used.
git-track
git-track {{origin}}
Print the current date without time.
hoy
Requires cwebp.
Convert all images given as parameters to webp.
imgtowebp {{images}}
Display the up-to-date MIT license.
license
Show my IP address.
myip
Install a Node.js version required in the project's .nvmrc
file.
nnn
Recursively delete all node_modules
directories in the current directory and its subdirectories, without any confirmation prompts.
node-modules-clean
Find all node_modules
directories recursively from the current directory and display their total disk usage.
node-modules-size
One-liner to solve npm issues when package management is giving trouble.
npmplease
Print nyan cat.
nyan
Optimize given image(s) with Optimage GUI.
optimage {{file1}} {{file2}}
Generate human readable password.
passphrase
Copy full path of a given file to clipboard.
ppp {{file}}
Run "find duplicate adjacent words", "find abuse of the passive voice" and "find weasel words" operations on a single file.
proofread {{file}}
Serve current directory with HTTP server on a default port 8080
.
serve
serve {{port}}
Set macOS defaults.
set-defaults
Copy my public SSH key to clipboard.
ssh-copy
Synchronize Bear notes/note images with a custom folder on a local machine.
sync-apps-data
Download and install latest versions of Squirrelsong themes for supported apps.
sync-color-themes
Update some of the applications to use alternative icons instead of the default ones.
update-apps-icons
A script to update:
- Brew and its packages
- macOS software
- Dotfiles
- Raycast
- npm
- Ruby gems
Run with upup
.
Replace in files. Uses ripgrep
to find files, so all ripgrep
arguments work.
Use g
command for dry-run, and then replace it with wg
.
-
Replace a pattern in a file:
wg {{pattern}} {{filename}} --replace {{replacement}}
-
Replace a pattern in all files:
wg {{pattern}} --replace {{replacement}}