Command reference

Every command, with its synopsis, parameters, exit status, and the release it first shipped in — generated directly from the dew CLI, so it always matches dew --help.

Identity

dew key since v0.1.0

Inspect or provision your dew identity

Synopsis
dew key

Manage your dew identity: inspect it ('dew key status') or provision it onto another machine ('dew key push').

Exit0 success · non-zero on error (dew: error: …)

dew key devices since v0.4.0

List where this machine's identity has been sent or received

Synopsis
dew key devices

Show ~/.dew/devices.yaml — a local log of 'dew key push'/'pull' transfers (peer, direction, public-key fingerprint, when, optional label).

This is a best-effort audit log, NOT a registry or revocation tool: manual key copies aren't recorded, and there's no key rotation — so a machine listed here can't be de-provisioned by removing it. Use it to recall where you've distributed your identity.

Examples
dew key devices
Exit0 success · non-zero on error (dew: error: …)

dew key pull since v0.4.0

Fetch your dew identity from another machine over SSH

Synopsis
dew key pull <user@host> [--force] [--yes]

Copy the dew identity FROM <user@host> onto this machine, so it can decrypt your images — the bootstrap when a new machine reaches back to one that already has the identity. It verifies the source's host key the normal way (an unknown host aborts), downloads to a temp file and checks it matches the source's public key before installing it 0600 under ~/.dew, and won't replace a different local identity without --force.

The mirror of 'dew key push'. 'dew sync' still never moves the key; this is an explicit, opt-in transfer you initiate.

Parameters
FlagTypeDefaultDescription
--force bool replace a different identity already on this machine
-y, --yes bool skip the confirmation prompt
Examples
dew key pull vbarooah@nvk2
  dew key pull vbarooah@nvk2 --yes
Exit0 success · non-zero on error (dew: error: …)

dew key push since v0.4.0

Provision your dew identity onto another machine over SSH

Synopsis
dew key push <user@host> [--force] [--yes]

Copy this machine's dew identity to <user@host> so it can decrypt your images — the one-time bootstrap for a second machine. It uses your existing SSH access (the host key is verified the normal way; an unknown host aborts), writes the key 0600 under ~/.dew there, and won't overwrite a different identity without --force.

This is the one command that moves your private key — and only when you run it, to a machine you control. 'dew sync' still never transmits the key. Prefer this over copying the key by hand, and don't run 'dew keygen' on the new machine.

Parameters
FlagTypeDefaultDescription
--force bool overwrite a different identity already on the target
-y, --yes bool skip the confirmation prompt
Examples
dew key push vbarooah@nvk2
  dew key push vbarooah@nvk2 --yes     # skip the confirmation prompt
Exit0 success · non-zero on error (dew: error: …)

dew key status since v0.1.0

Show whether an identity exists and its public key

Synopsis
dew key status

Report whether this machine has a dew identity and print its public key. Use it to confirm a machine is set up before you restore.

Examples
dew key status
Exit0 success · non-zero on error (dew: error: …)

dew keygen since v0.1.0

Create your dew identity (the key that encrypts images)

Synopsis
dew keygen

Generate the one age keypair dew uses to encrypt and decrypt your images, stored in ~/.dew/. Run this once per machine, before you pack anything.

dew never commits or syncs the private key. To set up another machine, run 'dew key push <user@host>' (an explicit, opt-in copy over your SSH access) — don't run 'dew keygen' there, which would create a different identity that can't decrypt your images. Guard the key like any private key: without it, images can't be decrypted. keygen won't overwrite an existing identity. Next: 'dew init' inside a repo.

Examples
dew keygen
Exit0 success · non-zero on error (dew: error: …)
See alsokey push · key pull

Repository

dew add since v0.1.0

Track a local file or directory with dew

Synopsis
dew add <path>... [--yes]

Add files to this repo's allow-list — the local context you want dew to manage (.env.local, certs, overrides). Adding is a one-time declaration recorded in the committed manifest; 'dew pack' then always uses the files' current contents, so you never re-add after editing.

Adding a directory includes its files (minus deny-listed noise); a file you add by name is always packed, even if the deny-list matches it — explicit intent wins. Paths outside the repo are rejected. 'dew add .' is special — it adds the candidates 'dew scan' found, prompting Y/n each, not every file in the repo. Next: 'dew pack'.

Parameters
FlagTypeDefaultDescription
-y, --yes bool with 'add .', accept all discovered candidates without prompting
Examples
dew add .env.local certs/dev.pem   # track specific paths
  dew add .                          # interactively add discovered candidates
  dew add . --yes                    # add all discovered candidates
Exit0 success · non-zero on error (dew: error: …)
See alsoscan · remove · list · rules

dew clean since v0.5.0

Remove dew's footprint for this repo (manifest + packed image)

Synopsis
dew clean [--force] [--image-only] [--manifest-only] [--yes]

Tear down what dew keeps for this repo: the committed .dew/ manifest and this repo's encrypted image in ~/.dew/images. It is the inverse of 'dew init' plus 'dew pack' — run it when you're done using dew here, or to start over clean.

This is local-only and never touches your identity key (it's shared by every repo) or any copy you've synced to a remote or another machine. dew has no version history, so removal is permanent — but the image is just a repack of files still on disk, and the manifest is normally committed to Git, so the common case is recoverable. You are asked to confirm unless you pass --force.

Scope it with --image-only (drop the image, keep tracking config so the next 'dew pack' rebuilds it) or --manifest-only (stop managing the repo but keep the image around). To delete an image whose repo is already gone, use 'dew images rm <project>' instead.

Parameters
FlagTypeDefaultDescription
--force bool remove without confirming, and override the image-owner guard
--image-only bool remove only the packed image; keep the manifest
--manifest-only bool remove only the manifest; keep the packed image
-y, --yes bool skip the confirmation prompt (still respects the owner guard)
Examples
dew clean                  # remove the manifest and this repo's image (asks first)
  dew clean --force          # remove both without confirming
  dew clean --image-only     # drop the image; keep the manifest for a clean re-pack
  dew clean --manifest-only  # stop managing this repo; keep the packed image
Exit0 success · non-zero on error (dew: error: …)
See alsoimages · pack

dew init since v0.1.0

Set up dew in this repo (creates .dew/manifest.yaml)

Synopsis
dew init [--from-gitignore] [--project <string>]

Start managing this repo's local context with dew. Creates .dew/manifest.yaml — the list of which local files dew should manage — plus a short .dew/README.md that explains the directory to anyone browsing the repo. The manifest holds no secrets or file contents, only paths, so it's safe to commit; committing it means teammates and other machines know what to hydrate.

The project name defaults to the directory name (override with --project); it becomes the image name. With --from-gitignore, dew seeds the allow-list with candidates discovered from your .gitignore so you can go straight to pack. Next: 'dew add <path>' (or 'dew scan') to choose what to manage, then 'dew pack'.

Parameters
FlagTypeDefaultDescription
--from-gitignore bool seed the allow-list with candidates found in .gitignore
-p, --project string name this project (defaults to the directory name)
Examples
dew init                        # create the manifest (project = folder name)
  dew init --project billing-svc  # name the project independently of the folder
  dew init --from-gitignore       # seed the allow-list from .gitignore
Exit0 success · non-zero on error (dew: error: …)

dew list since v0.1.0

List the files dew tracks for this repo (alias: ls)

Synopsis
dew list
Aliasls

Show this repo's allow-list — the local files dew manages — and the project name. These are the paths 'dew pack' will include. To see the deny rules by layer as well, use 'dew rules'.

Examples
dew list
Exit0 success · non-zero on error (dew: error: …)
See alsoadd · rules

dew remove since v0.1.0

Stop tracking a path (alias: rm)

Synopsis
dew remove <path>...
Aliasrm

Remove one or more paths from this repo's allow-list so dew no longer manages them. Removing a path that isn't tracked is a harmless no-op. The next 'dew pack' reflects the change; existing images are untouched until you re-pack.

Examples
dew remove .env.local
Exit0 success · non-zero on error (dew: error: …)
See alsoadd · list

dew rules since v0.1.0

Show which files are allowed and which are denied

Synopsis
dew rules

Show the effective rules for this repo: the allow-list (what dew manages) and the three deny layers that keep noise out — built-in patterns, your global ~/.dew/config.yaml, and the repo's .dew/manifest.yaml. Use it to understand why a path is included or skipped.

The built-in layer is deliberately minimal: only noise that's regenerated in essentially every project that has it (node_modules/, Pods/, .gradle/, …). Exclude project-specific generated files — an Expo app's ios/ and android/, say, which are hand-written source in other projects — with a deny: entry in .dew/manifest.yaml. Deny lines are gitignore syntax and support ! to un-deny.

Examples
dew rules
Exit0 success · non-zero on error (dew: error: …)
See alsoadd · pack

dew scan since v0.1.0

Suggest local files worth tracking (doesn't change anything)

Synopsis
dew scan

Look through this repo's .gitignore and working tree and suggest local files dew could manage — the per-developer context Git leaves out — while filtering out noise like build output and logs.

scan only suggests; nothing is added until you opt in. Use it to discover what's worth tracking. Next: 'dew add <path>' for specific files, 'dew add .' to take the suggestions, or 'dew init --from-gitignore' to seed them at setup.

Examples
dew scan
Exit0 success · non-zero on error (dew: error: …)
See alsoadd · rules

Image

dew hydrate since v0.2.0

Bring your local files back from the image (same as restore)

Synopsis
dew hydrate [--dry-run] [--force] [--image <string>]

Hydrate the working tree from this repo's encrypted image — identical to 'dew restore', with the same --force, --dry-run, and --image flags. dew's signature verb; use whichever name you reach for first.

Parameters
FlagTypeDefaultDescription
--dry-run bool preview what would change; touch nothing
--force bool overwrite local files that differ from the image
--image v0.6.0 string restore from this .dew.age file instead of the default under ~/.dew/images
Examples
dew hydrate
  dew hydrate --dry-run
Exit0 success · non-zero on error (dew: error: …)
See alsorestore · pack

dew pack since v0.1.0

Encrypt your tracked local files into a single image

Synopsis
dew pack [--all] [--dry-run] [--force]

Bundle the local files dew tracks for this repo — the context Git ignores (.env.local, dev certs, docker-compose.override.yml, local config) — into one encrypted image at ~/.dew/images/<project>.dew.age.

Run it after you add or change a tracked file: pack always uses the current contents of the allow-list, so you declare files once with 'dew add' and never re-add. The image is what 'dew sync' ships and 'dew restore' restores — packing is how your local state becomes portable. Next: 'dew sync' to push it.

The deny-list keeps noise out even from allow-listed directories — though a file you added by name is always packed; explicit intent wins. pack won't overwrite an image created by a different repo unless you pass --force.

--all is the one-shot exception: instead of the allow-list, it packs every LOCAL file — everything Git doesn't carry, ignored and not-yet-committed alike (it asks 'git ls-files', so it needs Git and a git repo). The manifest is untouched, the deny-list still filters generated noise, and .git/ and .dew/ are never included. Use it to carry a repo's complete local half; preview with --dry-run. If --dry-run shows project-specific generated files (e.g. an Expo app's ios/ and android/), exclude them with a deny: entry in .dew/manifest.yaml — see 'dew rules'.

Parameters
FlagTypeDefaultDescription
--all v0.6.0 bool one-shot: pack every local file Git doesn't carry (deny-filtered); allow-list ignored, manifest untouched
--dry-run bool preview what would be packed; write nothing
--force bool overwrite an image created by a different repo
Examples
dew pack              # encrypt the tracked files into the image
  dew pack --dry-run    # preview what would be included; write nothing
  dew pack --force      # overwrite an image created by a different repo
  dew pack --all        # one-shot: pack every local file Git doesn't carry
Exit0 success · non-zero on error (dew: error: …)
See alsorestore · sync · rules

dew restore since v0.1.0

Bring your local files back from the image

Synopsis
dew restore [--dry-run] [--force] [--image <string>]

Hydrate the working tree from this repo's encrypted image: decrypt, decompress, and write the tracked files back into place. This is what makes a fresh clone runnable — pair it with 'dew sync pull' on a new machine.

Safe by default: files are staged first, and any local file that differs from the image is reported as a conflict and left untouched, so you won't lose local edits unless you pass --force. --dry-run shows exactly what would change, touching nothing. ('dew hydrate' is the same command.)

By default the image comes from ~/.dew/images; --image restores from an explicit .dew.age file instead — one copied over by hand or pulled from a backup. The same safety rules apply, and no manifest is needed: the image defines what it holds.

Parameters
FlagTypeDefaultDescription
--dry-run bool preview what would change; touch nothing
--force bool overwrite local files that differ from the image
--image v0.6.0 string restore from this .dew.age file instead of the default under ~/.dew/images
Examples
dew restore             # write the tracked files back into the repo
  dew restore --dry-run   # preview new / unchanged / conflicts; change nothing
  dew restore --force     # overwrite local files that differ from the image
  dew restore --image ~/backups/my-app.dew.age   # restore from an explicit file
Exit0 success · non-zero on error (dew: error: …)
See alsopack · hydrate · sync

Sync

dew remote since v0.3.0

Show or change where dew syncs images

Synopsis
dew remote

Manage the destination dew pushes images to and pulls them from — a local/mounted path (e.g. /Volumes/nas/dew) or an scp-style remote (e.g. nas:/volume1/dew). With no subcommand, 'dew remote' prints the current destination.

The destination is stored in ~/.dew/config.yaml and shared across all repos. Once set, 'dew sync' pushes to it and 'dew sync pull' fetches from it.

Examples
dew remote                     # show the current destination
  dew remote set nas:/vol1/dew   # set it (local path or host:path)
  dew remote unset               # clear it
Exit0 success · non-zero on error (dew: error: …)
See alsosync

dew remote images since v0.3.0

List the images stored at the sync destination

Synopsis
dew remote images

Show the dew images present at the configured destination — the mirror of 'dew images', which lists what's on this machine. Useful to confirm a push landed, or to see what a new machine can pull. A local/mounted path is read directly; a remote 'host:path' is listed over ssh.

Examples
dew remote images
Exit0 success · non-zero on error (dew: error: …)

dew remote set since v0.3.0

Set the sync destination (local path or host:path)

Synopsis
dew remote set <dest>

Record where dew syncs this machine's images — a local/mounted path, or an scp-style 'host:path' remote that uses your existing SSH config. Saved to ~/.dew/config.yaml and shared across all repos; run 'dew sync' afterward to push. Replaces any existing destination.

Examples
dew remote set /Volumes/nas/dew   # a local or mounted folder
  dew remote set nas:/volume1/dew   # an scp-style remote
Exit0 success · non-zero on error (dew: error: …)

dew remote test since v0.3.0

Check the destination is reachable, trusted, and writable

Synopsis
dew remote test

Verify the configured destination is actually usable before you rely on 'dew sync'. A local/mounted path is checked in place (is the volume mounted? is it writable?). A remote 'host:path' is checked over ssh — reachable, host key trusted, and the path writable — reporting OpenSSH's own verdict (it never prompts, so an untrusted host key fails cleanly). Exits non-zero if unusable.

Examples
dew remote test
Exit0 success · non-zero on error (dew: error: …)

dew remote unset since v0.3.0

Clear the sync destination

Synopsis
dew remote unset

Remove the configured sync destination from ~/.dew/config.yaml. 'dew sync' then has nowhere to push until you set one again with 'dew remote set'. A no-op if no destination is configured.

Examples
dew remote unset
Exit0 success · non-zero on error (dew: error: …)

dew sync since v0.1.0

Push this repo's image to your sync destination

Synopsis
dew sync

Copy this repo's encrypted image to the destination you configured with 'dew remote set' so another machine can fetch it. Local or mounted paths are copied directly; a remote host:path goes over scp using your existing SSH config. Only the encrypted image moves — never your private key.

Run it after 'dew pack' (and 'dew remote test' if you want to check the destination first). On the other machine, 'dew sync pull' fetches it.

Examples
dew sync         # push this repo's image to the destination
  dew sync pull    # fetch it on another machine, then 'dew restore'
Exit0 success · non-zero on error (dew: error: …)
See alsoremote · pack · restore

dew sync pull since v0.1.0

Fetch this repo's image from your sync destination

Synopsis
dew sync pull

Download this repo's encrypted image from the configured destination into ~/.dew/images, so you can restore it. Run this on a fresh clone, then 'dew restore' (or 'dew hydrate'). Your identity must already be on this machine to decrypt.

Examples
dew sync pull
Exit0 success · non-zero on error (dew: error: …)

Health & inventory

dew doctor since v0.1.0

Diagnose what's wrong and tell you the next command

Synopsis
dew doctor

Check this repo end to end and report the one thing to fix next — a missing identity, no manifest, an unpacked or undecryptable image, or files still waiting to be restored — or confirm the repo is fully hydrated. Unlike 'dew status', it verifies the image actually decrypts, and every problem comes with the exact command to run.

Start here whenever a clone isn't working as expected.

Examples
dew doctor
Exit0 success · non-zero on error (dew: error: …)
See alsostatus

dew images since v0.1.0

List every image dew manages, across all repos

Synopsis
dew images

Show a global inventory of the encrypted images in ~/.dew/images — each one's project, size, when it was last packed, and which repo owns it. Where 'dew status' and 'dew list' describe the current repo, images spans every repo and runs from anywhere.

Examples
dew images
Exit0 success · non-zero on error (dew: error: …)
See alsoclean · status

dew images rm since v0.5.0

Delete packed image(s) from ~/.dew/images by project name

Synopsis
dew images rm <project>... [--yes]
Aliasremove

Delete one or more encrypted images from ~/.dew/images, named by project (the PROJECT column 'dew images' prints; the trailing .dew.age is optional). Use it to garbage-collect images whose repo is gone, or any image you no longer want — its .id owner marker is removed alongside it.

This only deletes the local image file; it never touches your identity key or any copy synced elsewhere, and it leaves repo manifests alone (to tear down the current repo's manifest and image together, use 'dew clean'). You are asked to confirm unless you pass --yes. Naming a project with no image is a harmless no-op.

Parameters
FlagTypeDefaultDescription
-y, --yes bool skip the confirmation prompt
Examples
dew images rm oldproject
  dew images rm a b c --yes
Exit0 success · non-zero on error (dew: error: …)

dew status since v0.1.0

Show this repo's dew health at a glance

Synopsis
dew status

Summarize dew's state for this repo: whether your identity and manifest are present, whether an image exists, how many files are tracked, and whether the working tree is fully hydrated. A quick check after cloning or before packing. For a diagnosis with the exact fix to run, use 'dew doctor'.

Examples
dew status
Exit0 success · non-zero on error (dew: error: …)
See alsodoctor · images

Global

dew upgrade since v0.6.1

Update dew itself to the latest release (or a chosen version)

Synopsis
dew upgrade [--check] [--force] [--version <string>]

Replace this dew binary with a newer release from GitHub: resolve the latest version (or the exact tag you name with --version), download the build for this platform, verify it against the release's checksums, and swap it in atomically. --check only reports what's available and changes nothing.

If dew was installed with Homebrew, upgrade refuses and points you at 'brew upgrade --cask dew' instead — replacing a brew-managed binary corrupts brew's own bookkeeping (--force overrides if you know what you're doing). After an upgrade, 'dew version' confirms what's running.

Parameters
FlagTypeDefaultDescription
--check bool report the current and latest versions; change nothing
--force bool reinstall even if current, or replace a brew-managed binary
--version string install this exact release tag (e.g. v0.6.0) instead of the latest
Examples
dew upgrade                    # → the latest release
  dew upgrade --check            # what would happen; changes nothing
  dew upgrade --version v0.6.0   # → that exact release
Exit0 success · non-zero on error (dew: error: …)
See alsoversion

dew version since v0.1.0

Print version, commit, and build information

Synopsis
dew version

Print dew's version along with the build commit, date, and Go toolchain — handy when reporting a bug. (See also the --version flag.)

Examples
dew version
Exit0 success · non-zero on error (dew: error: …)