Shell tips¶
Generated page
Built from the repository sources at publish time by scripts/docsgen. Do not edit by hand; change the source file named below and the page follows.
Source: dot_config/dotfiles/tips
93 tips. One is printed at random on every interactive zsh start.
core CLI¶
- tldr
— instant offline cheat-sheet for any command. Try tldr tar. - xh GET httpbin.org/headers — friendlier curl. Use ":=" for raw JSON, "==" for query params.
- cd foo — zoxide aliased to
cd; type a frecent fragment, no full path needed. - zi — zoxide interactive: fuzzy-pick from your visited dirs.
- bat
— cat with syntax highlighting + git markers. Set --paging=neverfor piping. - eza -lah --git --icons — better ls;
landllare pre-aliased. - fd
— sane find. Respects .gitignore by default. - rg
— ripgrep; faster than grep, ignores .git, respects .gitignore. - fzf — Ctrl+T to pick a file, Ctrl+R for history (via atuin), Alt+C to fuzzy-cd.
- jq '.foo.bar' — JSON filter/pretty-print.
jq -rfor raw output. - yq '.foo.bar' — same as jq, for YAML/TOML.
- btop — modern htop. Press
honce for the keybind cheat-sheet. - mkcd foo — mkdir + cd in one go (zsh function).
- serve — alias for
python3 -m http.server; quick HTTP server in cwd. - myip — alias for
curl -s ifconfig.me. - dco — alias for
docker compose.dpsfor a pretty docker ps.
git¶
- gs — git status. gd — diff. gp — push. gl — pull. gco — checkout. gcm — commit -m.
- glog — git log --oneline --graph --decorate --all. The "where am I" command.
- lazygit (or
lzg) — TUI for git. Easier than memorising flags for any non-trivial rebase. - delta — already wired in as your git pager; use
git diffand it's prettier than diff-so-fancy. - git wip — alias:
git add -A && git commit -m wip --no-verify. Useful before a risky pull. - git pushf — alias for
push --force-with-lease. Safer than--force. - git sync — alias:
pull --rebase && push. The "catch me up" command. - gh pr create --fill — opens a PR using the last commit message as title+body.
- gh pr checkout 123 — fetches a PR and checks it out as a local branch.
- gh dash — TUI dashboard for every PR / issue / repo on your account.
dotfiles / chezmoi¶
- chezmoi update — pull main + apply. Otherwise the 03:17 timer does it nightly.
- chezmoi edit ~/.zshrc — edit the source template, not the live file.
- chezmoi diff — preview what would change before applying.
- chezmoi managed — list every file chezmoi controls.
unmanagedfor the inverse. - chezmoi data — show resolved template variables (os, hostname, prompts).
- ~/.local/bin/dotfiles-brew-sync — push your local brew installs into the Brewfile now (else 02:00 nightly).
runtimes / env¶
- mise use -g node@lts — install + set the global default for any tool.
- mise use node@20.11 — set a project-local pin (writes .mise.toml in cwd).
- mise install — install everything pinned in .mise.toml.
- direnv allow — trust a .envrc in this dir; auto-loads on cd.
layout miseuses the local toolchain. - mkcert
— generate trusted local TLS certs. mkcert -installonce per box first. - pre-commit install — wires the
.pre-commit-config.yamlto .git/hooks/pre-commit.
kubernetes / infra¶
- k9s — TUI for kubectl.
:to command,/to filter,?for keybinds. - k — alias for kubectl.
tffor terraform. - flux get all — top-level "what's flux reconciling" view.
tmux¶
- tmux: prefix is C-a.
\|splits right,-splits down.h/j/k/lto navigate. - tmux: prefix + r reloads ~/.tmux.conf. prefix + [ enters copy mode (vi keys).
- tmux: tmux-resurrect saves session on Ctrl+a Ctrl+s, restores on Ctrl+a Ctrl+r.
nvim¶
- nvim: leader is Space.
ff find files, fg live grep, fb buffers. - nvim:
e toggles file tree. gg opens lazygit inside nvim. - nvim: K shows LSP hover docs. gd jumps to definition.
rn renames symbol.
zed¶
- zed . — open the current dir in Zed (reuses the existing window). Config lives in ~/.config/zed, managed by chezmoi.
- zed: cmd+shift+p opens the command palette;
zed: open default settingsshows every option with docs. - zed: extensions in ~/.config/zed/settings.json → auto_install_extensions. Add a line, push, every box gets it.
ghostty¶
- ghostty: cmd+enter toggles fullscreen. cmd+d / cmd+shift+d split. cmd+h/j/k/l nav.
- ghostty +list-keybinds — show every active binding (defaults + customs).
- ghostty +list-themes — preview every bundled theme. Yours is "Catppuccin Mocha".
atuin / shell history¶
- atuin — Ctrl+R for fuzzy history search synced across every box.
- atuin stats — interesting summary of your shell usage (most-run, busiest day, etc.).
- atuin key — print the encryption key for backup. Lose it, lose access to synced history.
restic / backup¶
- restic snapshots — list every backup snapshot in your repo.
--host=$(hostname)for just this box. - restic stats latest — size of the latest snapshot.
- restic restore latest --target /tmp/restore — pull files back from the latest backup.
- ~/.local/bin/restic-backup — run a backup right now (else 04:32 nightly).
vps: tailnet tools (*.ts.skenmy.com)¶
- home.ts.skenmy.com — Glance, the VPS front door: a link to every service plus live numbers. Start here if you forget what's running.
- *.ts.skenmy.com hosts only route over Tailscale. If one won't load, run
tailscale statusbefore blaming the service. - links.ts.skenmy.com — linkding bookmarks. Settings → Integrations has a bookmarklet to save any page in one click.
- rss.ts.skenmy.com — Miniflux RSS reader. j/k to move, v opens the original article, ? lists every shortcut.
- watch.ts.skenmy.com — changedetection.io: watch any web page for changes. Alerts land on the ntfy
watchtopic. - tools.ts.skenmy.com — IT-Tools: JWT decode, base64, UUIDs, cron parser, regex tester, all offline. Not tools.skenmy.com (that's the Twitch login gate).
- code.ts.skenmy.com — VS Code in the browser. Clone repos into its workspace; /opt/skenmy-vps is deliberately not mounted.
- git.ts.skenmy.com — Forgejo: hourly pull-mirrors of every skenmy repo. The origin to clone from when GitHub is down. SSH is on port 2222.
- grafana.ts.skenmy.com — metrics dashboards + alert rules. Provisioned from skenmy-vps/observability/grafana, so change them by PR.
- dozzle.ts.skenmy.com — live logs for every container in the browser. The "what is it doing right now" view.
- logs.ts.skenmy.com — VictoriaLogs: search past container logs with LogsQL, e.g.
_time:1h error. The "what happened at 03:00" view. - healthchecks.ts.skenmy.com — Healthchecks dashboard (dead-man's switch for cron jobs). Shows which scheduled job went quiet.
vps: public apps¶
- z.skenmy.com — Zipline file + screenshot host. Share links are public; uploads need your API token. 95MB max (Cloudflare caps at 100).
- gist.skenmy.com — Opengist pastebin. Every gist is a git repo, so
git cloneworks on any gist URL. - skenmy.com/admin — URL-shortener admin. Every slug becomes skenmy.com/
. - status.skenmy.com — Gatus: public uptime for every host on the VPS. Embedded as the Status app in skenOS.
- analytics.skenmy.com — Umami: privacy-friendly analytics for skenmy.com and friends.
- fares.skenmy.com — fares-tracker: GWR fare-drop calendar.
- tools.skenmy.com — Twitch login gate for the lowerthird / esaquiz / blockbuster / schedule control panels. Grants are managed here.
- lowerthird + esaquiz: /control.html is behind the Twitch gate; source.html stays open so OBS browser sources can load it.
- skenmy.com/notes — the Obsidian vault, published by notes-builder. Old notes.skenmy.com links redirect there.
- daemon.skenmy.com — DAEMON, the bullet-hell game from skenOS, standalone and linkable.
vps: alerts¶
- ntfy.skenmy.com topics: alerts (Gatus + Grafana, forwarded to Telegram), images (Diun image updates), watch (changedetection).
- ntfy publish: curl -H "Authorization: Bearer $TOKEN" -d "deploy done" https://ntfy.skenmy.com/
. Anonymous access is denied, so a token is required. - Dead-man's switch for any job:
long-job && curl -fsS -m 10 --retry 3 https://hc.skenmy.com/ping/<uuid>. Append /start before or /fail on error.
vps: operating the box¶
- ssh deploy@vps-uk — VPS shell (tailnet + key only). root@vps-uk for host-level work. Never hand-edit /opt/skenmy-vps; deploys overwrite it.
- ./compose logs --tail=50 -f
— on the VPS, always use ./compose, never bare docker compose(it misses services.d + env.d). - ./bin/lint-stack — run in skenmy-vps before pushing. Catches missing DNS records, healthchecks, Gatus checks and backup labels.
- New VPS service: services.d/
.yml + conf.d/ - .caddy + DNS record + Gatus check, then open a PR. Merging to main deploys it. - ./bin/backup --check — preview what tonight's restic → B2 run will send. ./bin/restore --list / --fetch to pull a snapshot without touching live data.
- sudo ./bin/reconcile-host --check — report VPS host drift (swap, patching, firewall) without changing anything.
- sudo ./bin/firewall-trial --disable — the escape hatch if the VPS nftables rules ever lock SSH out.
- Mac Mini CI:
runs-on: [self-hosted, linux, container]puts a private repo's job on the desk Mac instead of spending GitHub minutes.