Skip to content
SnugDownload for Mac

Snug CLI

Snug's command line lets your agent use your keys without seeing them.

Install

The snug command comes inside the app. When you first open Snug, click Copy install command and paste it into a terminal. It asks for your password.

For Snug in Applications, this is the same command:

sudo mkdir -p /usr/local/bin && sudo ln -sf '/Applications/Snug.app/Contents/Helpers/snug' /usr/local/bin/snug

Then snug --version prints the version. Snug must be running for every command.

snug wait

Waits until you copy a secret, then prints its ref, its kind and the end of the value, never the value.

snug wait --secret

snug list --secrets

Shows the secrets Snug keeps: ref, kind, the end of the value, dates and label.

snug list --secrets

snug list --clips

Shows your newest clips, or the clips of one pinboard: id, kind, source app, time and a short preview. A key shows its ref, never a value.

snug list --clips --search invoice

snug get

Prints one clip by its id. Text, a link or a color goes to the output. A picture is saved to a file and its path is printed. A file clip prints its paths. A key is never printed.

snug get 3f9a2c41

snug get --latest

Prints your newest clip, the same way as get.

snug get --latest --kind image

snug pinboards

Shows your pinboards: name, color and number of clips.

snug pinboards

snug pins

Shows the pins of one pinboard in their order, with the index of each, 0 the first.

snug pins Work --limit 50

snug pin

Pins a clip to a pinboard, like Pin to in the app: a copy goes to the front, and the clip stays in your history. A key is pinned by its ref, never by its value. Prints the id of the pin.

snug pin 3f2a9c1e --to Work

snug pin --latest

Pins your newest clip, the same way as pin.

snug pin --latest --kind link --to Work

snug unpin

Takes a clip out of a pinboard. The clip in your history stays.

snug unpin 7c1d9e02

snug move

Moves a pin to another pinboard, or to another place in its pinboard.

snug move 7c1d9e02 --index 2

snug pinboards create

Makes a new pinboard.

snug pinboards create Later

snug pinboards rename

Gives a pinboard a new name.

snug pinboards rename Later "Next week"

snug pinboards delete

Deletes a pinboard and its pins, never a clip of your history. Without --yes it deletes nothing and says what would go. With --yes, Snug still asks you every time.

snug pinboards delete Later --yes

snug pinboards color

Gives a pinboard another color.

snug pinboards color Later teal

snug pinboards move

Moves a pinboard to another place in the row, or one place left or right.

snug pinboards move Later 0

snug delete

Deletes a clip of your history or a pin, with no undo. Without --yes it deletes nothing. Snug asks you every time. A key is refused.

snug delete 3f2a9c1e --yes

snug edit

Gives a text, link or color clip new plain text from standard input. A text that holds a secret is refused, and so is a key.

snug edit 3f2a9c1e < note.txt

snug revert

Takes an edited clip back to what was copied.

snug revert 3f2a9c1e

snug mark-secret

Moves the text of a clip into Snug's vault as a key and prints its ref. Every copy of the text leaves your history and pinboards.

snug mark-secret c81d07aa

snug rename

Gives a key or a clip a new name. Only the name changes, never a value, and a name that holds a key is refused. No panel asks, and you see the rename in Activity.

snug rename sec_7f3a "Stripe test key" --reason "name the key you just copied"

snug rename <id|ref> --clear

Removes the name of a key or a clip.

snug rename 3f2a9c1e --clear --reason "the title was wrong"

snug grants

Shows the grants of your keys, as Keys shows them, and whether raw use is allowed.

snug grants sec_7f3a

snug activity

Shows the newest rows of Keys > Activity: who used a key, how and the result. The reasons agents gave are for you only.

snug activity sec_7f3a --limit 20

snug runs

Shows the live runs of run --proxy.

snug runs

snug revoke

Revokes the grants of a key for one action or one program or env file. The next use asks you again.

snug revoke sec_7f3a --action run --target node --reason "the script is done"

snug revoke <ref> --all

Revokes every grant of a key.

snug revoke sec_7f3a --all --reason "the project is finished"

snug raw-use stop

Stops raw use of keys, so they work through the proxy only again.

snug raw-use stop sec_7f3a --reason "the proxy serves this key"

snug runs stop

Ends a live proxy run, or every live run of a key. The program gets 401 on its next call.

snug runs stop sec_7f3a --reason "the test loop hangs"

snug grants stop-hour

Ends the 1 hour grants of clip reads and changes in this project, or in every project.

snug grants stop-hour --reason "done with the clips"

snug stop

Turns on Stop All Agent Access: every run ends and every later agent request is refused. Only you turn it back on.

snug stop --reason "a script leaked output"

snug phone revoke

Revokes the iPhone paired for Approve from iPhone, so its answers count no more. Only you pair a phone again.

snug phone revoke --reason "you lost the phone"

snug copy

Puts a clip on your clipboard, like Copy in the app. It is asked like a read. A key is refused.

snug copy 3f2a9c1e --plain

snug capture resume

Starts the recording of copies again.

snug capture resume

snug settings

Shows what your settings say: the pause, Keep History, the capture rules, ignored apps, the agent switches and more. No keys.

snug settings --json

snug switch

Turns a setting off, the side that only takes access away. No panel asks.

snug switch clip-reads off --reason "the task with clips is done"

snug ask delete-key

Asks you to delete a key.

snug ask delete-key sec_k2mq --reason "the old test key was rotated"

snug ask raw-use

Asks you to allow raw use of keys, so run --env, pipe and put can hand out their values.

snug ask raw-use sec_7f3a --reason "the SDK reads the key from a file"

snug ask resume

Asks you to turn agent access back on after Stop All Agent Access.

snug ask resume --reason "you said the stop was a mistake"

snug ask not-a-secret

Asks you to turn a key back into text in your history.

snug ask not-a-secret sec_k2mq --reason "it is a public build id"

snug ask revert-value

Asks you to bring back the value a key had before its last Replace Value.

snug ask revert-value sec_k2mq --reason "the new value fails with 401"

snug ask erase-history

Asks you to erase your clipboard history. Pinboards and keys stay.

snug ask erase-history --yes --reason "you asked to start clean"

snug ask keep-history

Asks you to change how long your history is kept.

snug ask keep-history week --reason "you asked to keep less history"

snug ask switch

Asks you to turn a setting on, or either way for the capture rules.

snug ask switch auto-value on --reason "you asked for Auto value"

snug ask unignore-app

Asks you to record the copies of an ignored app again.

snug ask unignore-app com.apple.Notes --reason "you asked to record Notes again"

snug ask always-load

Asks you to load the link previews of a host with no click.

snug ask always-load example.com --reason "show previews of the docs links"

snug ask pause

Asks you to pause the recording of copies. While paused, a key you copy stays on the clipboard as text.

snug ask pause --for 30 --reason "the build prints test tokens"

snug ask ignore-app

Asks you to stop recording the copies of an app. A key you copy there stays on the clipboard as text.

snug ask ignore-app com.example.Passwords --reason "you asked not to save its copies"

snug mcp

Starts Snug's MCP server, so agents that use MCP can read your clipboard history. It never reads a key.

Set up the MCP server

snug mcp

snug run --proxy

Runs a command with the key behind Snug's proxy. The command gets a placeholder and a local base URL, never the key.

snug run --proxy ANTHROPIC_API_KEY=sec_7f3a --reason "try the chat feature" -- python3 script.py

snug run --env

Runs a command with the values in its environment, for keys the proxy cannot serve.

snug run --env STRIPE_WEBHOOK_SECRET=sec_k2mq --reason "run the webhook tests" -- npm test

snug pipe

Sends the value to the command's standard input.

snug pipe sec_k2mq --reason "set the worker's webhook secret" -- wrangler secret put STRIPE_WEBHOOK_SECRET

snug put

Writes the value into an env file. Use it only when a tool reads keys from a file and nothing else.

snug put sec_k2mq --file .env --key STRIPE_WEBHOOK_SECRET --reason "local dev server reads .env"

snug put --secret

Saves a new key in Snug from standard input. You save it with Touch ID every time, and the agent gets its ref.

snug put --secret --name "Sparkle key" --reason "save the new update key" < key.txt

Safe by default

For agents: the full reference