Personal Fish aliases and helper functions that are not Git-specific.
This repo owns my general alias config. On my machine, /Users/hsi/.config/fish/aliases.fish is a symlink to this repo's config.fish.
Source the config from your local Fish config:
source /Users/hsi/.config/fish/aliases.fishcf: open this general Fish alias config in VS Codecfg: open the Git-focused Fish alias config in VS Codedebun: kill Bun dev server processes started asbun devorbun run devdetree: remove Codex worktrees registered to the current repository; pass--forceto include dirty worktreesprmedia -a name: create a revocable PR-media token and setup script for a friendprmedia -d name: revoke a friend's PR-media tokenprmedia -l: list active PR-media token namestrycf [port] [project-name]: expose a local dev server through Cloudflare Tunnelsetcur "Project folder Name": create or update a symlink at/Users/hsi/Projects/Current/Project folder Namedecur "Project folder Name": remove a symlink at/Users/hsi/Projects/Current/Project folder Namelscur: list symlinks under/Users/hsi/Projects/Current
trycf defaults to port 3000 and the current folder name. It starts a Cloudflare Quick Tunnel, prints the generated trycloudflare.com URL, and copies it to the clipboard. Install the dependency first with brew install cloudflared.
trycf also prepares a stable dev alias like https://dev.hsichen.dev/homepage. Set TRYCF_REGISTER_URL to a registrar endpoint if you want the function to POST the generated quick tunnel URL there:
set -Ux TRYCF_REGISTER_URL https://dev.hsichen.dev/__trycf/register
set -Ux TRYCF_REGISTER_TOKEN your-tokenThe registrar receives:
{"project":"homepage","target":"https://example.trycloudflare.com","origin":"http://localhost:3000"}You can override the displayed stable base URL with TRYCF_DEV_BASE.
prmedia -a alice prints the one-time credentials and creates
~/Downloads/pr-media-setup-alice.sh with owner-only permissions. Send that
file to your friend securely. They run it with Bash to install the credentials
at ~/.config/pr-media/config; it refuses to overwrite an existing config and
checks whether the uploader from Hsiii/human-out-of-loop is already
available. The setup file contains the access token, so both copies should be
deleted after it succeeds. The command also prints the destination and
permissions for friends who prefer to paste the url= and token= lines
manually with an editor.
Use prmedia -d alice to disable Alice's token without affecting anyone else.
Use prmedia -l to list active token names.
setcur searches for an exact folder name under /Users/hsi/Projects, skips /Users/hsi/Projects/Current, and refuses to replace a real folder with a symlink.
decur removes only symlinks under /Users/hsi/Projects/Current and refuses to remove real folders or files.
lscur prints current project symlinks as name -> target.
Examples:
trycf
trycf 5173 Atomize
prmedia -a alice
prmedia -d alice
prmedia -l
setcur Comux
setcur "Project folder Name"
setcur /Users/hsi/Projects/DevTools/fish-alias
lscur
decur Comux