Sharing & Syncing
qwik gives you three mechanisms for moving aliases around, ranked from simplest to most collaborative:
| Mechanism | Best for | How |
|---|---|---|
| export / import | one-off backups and handoffs | a TOML file |
| sync | your own aliases across your machines | a dedicated git repo |
| overlay | team-shared read-only alias sets | a git repo you point at |
Export & import
Section titled “Export & import”qwik export ~/aliases.toml # share / backupqwik import ~/aliases.toml # mergeqwik import ~/aliases.toml --overwrite # replace the whole storeimport merges by default: incoming aliases are added, existing ones are
kept unless the file contains them. With --overwrite, the store is
replaced wholesale — aliases not in the file are deleted; the preview
lists them before you confirm.
The trust-boundary preview
Section titled “The trust-boundary preview”Every import shows a preview of the incoming commands and asks for
confirmation before anything is applied. This matters because imported
commands eventually run under shell=True — treat an alias file like you’d
treat a shell script from the internet.
Sync — dotfile sharing across machines
Section titled “Sync — dotfile sharing across machines”qwik sync keeps a separate git repo at <config_dir>/qwik-sync/ so your
aliases travel between machines.
qwik sync init --remote <git-url> # one-time setup; exports current store + first commitqwik sync push [-m "msg"] # export → commit (if dirty) → pushqwik sync pull [-y] # pull → preview → merge into live storeqwik sync status # branch, remote, dirty, ahead/behind, alias countHow it works:
sync initwritessync.toml(remote + branch) andaliases.toml(your store) into the sync repo and makes the first commitsync pushoverwritesaliases.tomlwith the current live store, commits only if the tree is dirty, then pushes toorigin <branch>sync pullrunsgit pull, then shows the same trust-boundary preview asqwik import— incoming commands run undershell=True, so review the preview before confirming
Overlays — team alias store
Section titled “Overlays — team alias store”An overlay is a read-only alias store published as a git repo. You
attach it once; its aliases appear alongside your own, marked (overlay).
qwik overlay add --url https://github.com/team/qwik-aliases --branch mainqwik overlay list # show overlay aliasesqwik overlay update # fetch and show added/changed/removed before applyingqwik overlay copy --name gs # copy an overlay alias to your user storeqwik overlay remove # remove the overlayBehavior:
- Read-only: overlay aliases cannot be edited or removed. A user alias with the same name shadows the overlay one.
- Usage tracking: running an overlay alias copies it to your user store
- Visibility: overlays appear in
qwik list,qwik search,qwik init, and the picker - Exact mirroring: the overlay repo is managed with
git cloneonaddandgit fetch+git reset --hardonupdate, so it always mirrors the remote branch and can’t enter a merge-conflict state - Preview gates:
overlay addandoverlay updateshow the same trust-boundary preview as import/sync pull before applying anything; pass--yesto skip the prompt.updatereports “already up to date” and doesn’t prompt when nothing changed
Which one should I use?
Section titled “Which one should I use?”- Backing up before a risky change? → export to a file
- New laptop? → sync init –remote on the old one, sync pull on the new
- Team shares a standard
kubectlalias set? → maintain one repo, teammates overlay add it; anyone canoverlay copythe aliases they want to customize locally