# Latchkey: the full text of latchkey.snackstud.io Every page's main content as plain text. The curated index is llms.txt. Scenes and the app window show example data and are left out. --- Page: Changelog · Latchkey URL: https://latchkey.snackstud.io/changelog.html # Changelog What changed in each version of Latchkey, newest first. The app shows the same notes once after it updates, and again from Latchkey › What's New in Latchkey…. Latest: 0.4.0, 18 November 2026. Download. ## 0.4.0 18 November 2026 ### App - Grants can last until you revoke them: until revoked in the approval panel and New Grant, or latchkey grant … --for always. The 7-day limit is gone, and so is the one-day limit on grants an agent asks for through MCP (they still end when the agent quits). A grant until the agent quits no longer also ends after a day. - Latchkey locks, as Passwords does: when it opens, after 5 minutes in the background (1, 5, 15 or 60 in Settings › Privacy), and when the Mac sleeps or the screen locks. Touch ID is asked for right in the lock screen, with no system sheet; Use Password… opens the sheet for the Mac password. While locked the window and Settings show nothing but the lock screen, and the menu bar panel lists nothing but unlocks with Touch ID right there. Lock Latchkey (⌃⌘L) and Lock in the menu bar panel lock it by hand. The lock covers the app only: approvals for commands, agents and Safari still appear while it is locked. - Keyboard focus rings no longer appear on buttons and controls anywhere in the app. - Approvals are one small panel with Touch ID inside it, for releases and changes alike; Use Password… opens the system sheet. Requests from the same agent in the same folder that arrive while it's up join it as rows, so one touch answers a burst; each row can be denied on its own. Pushes, SSH, Safari and unidentified programs are still asked on their own. - A new remote location, SSH, pushes to a credential script on a Linux host over your ssh connection, one item per credential (ADAPTER.ACCOUNT) with the value on standard input: latchkey remote link distribution/production ssh host=titan script=/path/to/add-credential.sh. It always counts as production, its status comes from Latchkey's push record, and the direct download only (#96). - What's New shows each version's changes once after it updates, and again from Latchkey › What's New in Latchkey… or Settings › About. Update notices from the direct download show the same notes. - The Upgrade sheet describes each Pro group with its planned features, as the site does, and says the core never depends on Pro instead of promising it stays free. - The item list is in sections: by project in All Items (Shared first), by environment in a project, or by service or type from Group By in the list's menu. Each section is a compact row like the sidebar's, with its icon and count, that opens or folds; past eight sections they start folded. Rows no longer repeat what their section says. - A Review finding lists its items by project inside its card, folded when there are more than eight places, so a finding covering hundreds of items reads as a list of places with counts. - The sidebar's project list has a filter field once there are more than a dozen projects. - Project and service icons sit on a tile that follows light and dark mode; an icon that is already a filled square (an app icon) is drawn without a white frame, and a dark logo keeps a light tile in dark mode so it stays visible. - Settings has its own window with a tab for each section (General, Privacy, Storage, Developer, Membership, About), instead of a column in the main window that looked like the item list. Settings… at the bottom of the sidebar, ⌘, and the menu bar panel open it. - Settings › Developer shows the command-line tool when it's installed outside the app (scripts/install.sh, Homebrew), instead of saying there isn't one. - About shows the copyright, licence and website, and the direct download's About panel has its copyright line. - Clicking the menu bar key opens the window; right-clicking (or Control-clicking) it shows the quick panel. The panel's item list is sized to its items instead of collapsing to a sliver, and the key has room around it. - Quitting with ⌘Q now leaves Latchkey in the menu bar too, under the same setting as quitting from the Dock (now Keep running in the menu bar when I quit). Quit in the menu bar panel, logging out and scripts still quit it. - Settings › Developer Tools shows whether Latchkey for Safari is on and opens Safari's Extensions settings with it selected, so it can be turned on from the app. - scripts/install.sh now forgets every other copy of the app macOS has registered (other worktrees' builds, Xcode archives), not just its own build folder. With stale copies registered, Safari could resolve Latchkey's extension to one of them and Turn On in Safari… failed with SFErrorDomain error 1. ### Security - Grants no longer have a maximum length. A grant until revoked keeps working until you revoke it; Grants and latchkey grants show it as "until revoked". - The broker no longer holds its lock while a request waits for approval. The request runs again after the answer and uses it only for the same question about unchanged values; anything else asks again. - Approvals show what they allow. The panel lists every item asked for, with a count, and the whole command a signed latchkey run starts, unredacted and never cut off in the middle. Text a caller supplies (a service name, a link label) can no longer end the Touch ID sheet's description early. A caller Latchkey can't identify is named as unidentified, with the warning and the panel first, instead of passing for Latchkey's own tool. - Environment approvals name what each variable will resolve to, and link and push approvals name the Railway project, Vercel team and working folder that decide where values go. - combine asks before comparing values, so whether two secrets match is never answered without approval. - A forged .git file or a .git symlink to another checkout no longer makes a folder count as that repository, so a grant can't reach it. - MCP latchkey_export_references writes only in the folder the server started in, inside it, or a worktree of its repository; an agent-chosen cwd elsewhere is refused. - remote-status errors never quote a service tool's list output, which can hold values. A push refuses a variable name that isn't a valid identifier on every route, including names in records synced from another Mac. - Grants and the access-log keys are read only from this Mac's own keychain items, never a synced one, and a revoke that can't be saved says so instead of reporting success. - Rewriting references in a symlinked env file rewrites the file it points to, keeping its permissions, instead of replacing the link. The export check for Git looks through symlinks, and scan --install-hook won't write outside the repository's .git folder. - The grant command suggested after a refused run quotes the folder when its name has anything but ordinary path characters, so a folder name can't turn into shell syntax when the command is pasted. ### Mac App Store - The App Store version leaves out GitHub Actions pushes, so it uses only Apple's encryption and needs no export documents. GitHub's sealed box moved to its own library, LatchkeySeal, which the direct download and its tests link; the store build offers Vercel, Railway and Fly, and refuses a synced GitHub link's push before sending anything. - Its window no longer names GitHub Actions where it lists the services it pushes to, and its screenshots' sample data links Railway instead. - scripts/release-appstore.py checks what App Store Connect receives: the package's installer signature and the distribution-signed app inside it (appstore-preflight.py --distribution), then lists the submission gates still open. Build 6. ### Site - The privacy policy says the App Store version doesn't push to GitHub, and the pricing page lists pushes to deployment platforms as free, as they are today. ## 0.3.1 13 November 2026 ### Mac App Store - The App Store version is free in its first release: Pro isn't on sale until it has features of its own, so the store build makes no StoreKit calls and shows no Membership section. - The App Store version links to the command-line tool instead of installing it, and the release now ships the tool on its own: latchkey-cli-VERSION.zip, notarized, and a Homebrew formula (brew install latchkey-cli from the tap). The tool claims the app's App Group so it can reach the store app. - Quitting the App Store version from the Dock quits it unless you choose otherwise in Settings. - The store build declares its encryption for export compliance, drops the unneeded network-server entitlement and the old development keychain group, and reports itself as the app-store channel. The Safari extension's version now matches the app's, and releases check it. - scripts/release-appstore.py builds the App Store package; the listing, reviewer notes, privacy, age rating and export answers, and six screenshots are in packaging/app-store/. ### In-app settings - Settings now lives in the main window, with General, Privacy & Approval, Storage & File Access, Developer Tools, Membership, and About & Updates sections. Sidebar, menu bar, Command-comma and upgrade actions share it. - Appearance, clipboard and reveal timers, hiding values when Latchkey loses focus, and Dock quit behaviour are saved on this Mac. Copying an environment names the chosen clear time in its approval; lk export --clipboard keeps 60 seconds. A value approved while Latchkey isn't in front is hidden with a notice. Authorization is unchanged. - Membership shows verified one-time App Store ownership and the App Store price, with Buy, Restore Purchases, availability checks and purchase support links. ### App - The sidebar shows each service's site icon, bundled with the app, and a project's own favicon or app icon when its checkout has one; otherwise the initial or a folder, as before. Nothing is fetched. ### Security - An approval now names every change to who may read an item without asking, or to whether it's treated as a secret: set (including one with no value) and import --replace say "let agents read ... without approval" or "make it a plain value", as update already did. The approval panel shows the request's wording too, not just the verb. - Restoring an earlier version of an item that still exists changes only its value. It no longer re-applies that version's agent-safe, kind, service or Safari fill sites, so a restore can't quietly undo a later tightening. Bringing back a deleted agent-safe item says so in the approval. - The MCP tool latchkey_export_references writes only inside its cwd (symlinked folders are followed before the check) and is marked destructive, since it can replace a file there without asking. - Latchkey for Safari no longer offers fills on sites a platform hosts for its customers. The default fill sites are each service's own key page host and the platforms' dashboards (app.netlify.com, dashboard.render.com, dashboard.heroku.com, railway.com), not every subdomain of railway.app, google.com or amazon.com. ## 0.3.0 13 November 2026 ### Latchkey Pro - Mac App Store version: Latchkey Pro as a one-time in-app purchase (io.snackstud.latchkey.pro), checked with StoreKit 2 (Apple-signed, verified on the Mac, works offline, drops on refund). Settings › Latchkey Pro shows the status, Buy with the App Store price, Restore Purchases and the purchase date. The direct download has no purchase code and links to the App Store version. - The broker refuses Pro operations without Pro, naming Latchkey Pro and the feature, and the app shows an Upgrade sheet. No Pro operations exist yet: everything shipped so far, including duplicates and combine, stays free, and storing, reading, approving, running, importing, exporting, deleting and restoring can never require Pro. ### Remote pushes - Remote locations can push through each service's HTTPS API with an access token kept as an ordinary item: latchkey remote link ... token=ITEM (and, for a Vercel team project, team=). Vercel environment variables, GitHub Actions repository and environment secrets (sealed-box encrypted), Railway variables and Fly secrets are all supported, and remote status works the same way. The direct download still uses vercel, gh, railway and flyctl for links without a token item; the Mac App Store build, which can't run them, uses the API only. - The push approval names the token item. The token goes only to the service's own API host and is never returned, logged or quoted in an error; requests time out, responses are size-capped and checked, redirects aren't followed, and the only retries are for a rate limit or 502/503/504. - Link records gain optional tokenItem and team fields; links saved before them decode unchanged. ### Website - More headlines act out what they say, one per page: "Migration" slides in on Teams, "stops" stops dead on Security, "next" fills in on the Roadmap, "Free" holds in the accent colour on Pricing, and "References" (API) and "no page" (404) are drawn as dashed placeholders. Each guide's headline does the same with its own word ("Block" stops dead, "out" and "Push" move, "API keys" and ".env" are placeholders), and so do the docs ("Quickstart" moves, "Agents" fills in). Support, Privacy and Terms keep plain headlines, since those are what people look for; their repeated labels are gone, Support is titled "Support and troubleshooting", and "stays" in Privacy's "What stays on your Macs" holds in the accent colour. - A latchkey:// reference in prose is drawn as a dashed placeholder, with a hover note that the value is filled in when a command starts; on Features, "filled in" arrives masked and then fills in, once, unless motion is reduced. - Headings say what each section holds instead of generic lines ("Everything in one window", "Three ways in", "What would make Latchkey excellent"); labels that repeated their headings are gone; the hero glow, the closing band's three-colour glow, the Pro cards' gradients and the frosted header are flat. - Pro's four groups are described with their planned roadmap items: secret requests and a hook that stops cat .env; last-used and expiry dates, reminders and leak alerts; importers and an encrypted backup; each key's origin. The core is described as meant to stay free rather than free for good; storing, reading and exporting your own values still never depend on Pro. Opening For agents no longer moves the hero's scene. - End-to-end audit: Lighthouse, WCAG 2.0 AA with axe-core, a crawl and a reader's review. Fixes: scene pause buttons are reachable by keyboard and screen readers, the home page no longer shifts on phones as its scene lays out, the 404's terminal passes contrast in light mode, drawings no longer break the heading outline, pages swap without a fade, and the comparison table names included and not-included cells. Copy now matches what's shipped: the source is public, the notarized release exists, the Mac App Store version is still to come, the Homebrew cask adds the command-line tool, and the CLI's real "cannot reach the Latchkey app" message. - A For humans / For agents switch under the home page's buttons gives the line to point a coding agent at llms.txt, which now covers everything an agent needs in one file. Every footer links to it. - Thirteen new guides, checked against the CLI's source: blocking secrets at commit, fresh clones and worktrees, duplicate keys, merging into an existing env file, pasting into a dashboard, the key proxy, rotating after an agent session, short-lived AWS credentials, App Store Connect keys with fastlane, pushing to deployment platforms, SSH, saving keys from Safari, and auditing access. The guides index groups all sixteen into four categories. - The docs and guides share one sidebar with icons that stays in place between pages: it sticks under the header, the scrollbar's space is reserved so nothing shifts, and supporting browsers keep it still while the content changes. The footer's docs link reads Developers. - The header has a Guides tab, and Docs is now Developers. It stays one row at every width, dropping How it works and Security below 1000px, the download button below 720px and Features below 480px. - Guides use the developer docs' layout, with a Guides sidebar, breadcrumbs and contents. The architecture diagram on the docs overview is drawn top to bottom so it no longer wraps. - Phone pass: the pricing comparison stacks each row, inline code breaks only at spaces and keeps flags whole, docs breadcrumbs and "On this page" links and the footer byline are larger tap targets, the closing band drops its first sentence, and roadmap labels are 12px. - Search and authorship: descriptive titles under 66 characters, a social card per page, author metadata and a JSON-LD graph on every page naming Zach Shallbetter (with the person and studio IDs Snack Studio's other sites use), a footer byline, a "Who makes Latchkey" section, humans.txt, browser icons and a web manifest from the app icon, llms-full.txt, an IndexNow key, and three guides (env files, coding agents, MCP server configs). scripts/discovery.py replaces scripts/sitemap.py; scripts/social-images.py renders the cards. - A quieter home page header: the title in one colour with its second sentence muted on its own line, a two-sentence introduction, the buttons, and one line of facts; the scene's caption is one line. The social image matches. - A footer with the download and Product, Developers and Trust and help columns on every page, and a 404 page that shows what lk get prints for a name it doesn't have, with links onward. - Digital Presence Protocol pass: a social preview image and large card on every page, descriptions under 170 characters, breadcrumbs on every page and one organization, website and app graph on the home page, a sitemap with each page's last change (scripts/sitemap.py), a 404 page, a route for reporting mistakes and a changelog link in every footer. docs/presence.md records the entities, claims and their evidence, surfaces, access checks, and the metrics and query panel still to run. Pricing no longer says the source "will be" available: it is. - Layout pass: no single words on their own line, card links and plan buttons line up across each row, availability labels sit beside each card's symbol, and the lightest cards gained a real example or detail. - The app window on the home page and Features follows the app's current layout: sidebar with Review and the iCloud Keychain badge, a flat list with search, filters and the app's type icons, and the detail as cards with recent activity. One icon set, after the app's SF Symbols, gives every card, button and fact a symbol. - Every code block explains its parts on hover or focus, not only lk lines: Features examples, CLI synopses and their placeholders, env files, JSON, brew, ssh, claude and export, the agent note and the architecture diagram. - More colour: each section takes a hue (eyebrow, steps, scene wash), the hero line and closing band carry a gradient, and Pro is orange as in the app's upgrade sheet. - Caught up with the product: Features, the Roadmap, the CLI and agent docs and llms.txt cover lk scan and its pre-commit hook, duplicates and combine, import classes, export merge and clipboard, the proxy's limits and updates. Pro's four groups use the app's own wording, and duplicates, scanning, rotation and pushing are listed as free. - Free leads: every primary button is Download free, the home page and Features show what Pro adds (marked planned), and Pricing lists Pro's features in place of four labels. - Privacy policy, terms and support pages, linked from every footer; canonical URLs and a sitemap for latchkey.snackstud.io, published from Vercel on request only. - Pricing: Latchkey Pro is a one-time in-app purchase ($79) in the Mac App Store version, with updates included and no subscription; the direct download stays free. Early-access, migration and design-partner requests go to latchkey@snackstud.io. ### Project - Source-available under the Functional Source License (FSL-1.1-ALv2); security reports can also go to latchkey@snackstud.io. - The repository is public. Releases download from GitHub, and a Homebrew tap installs them (brew tap zachshallbetter/latchkey, brew trust zachshallbetter/latchkey, brew install --cask latchkey). ### Security - latchkey run --proxy serves a request only when its connection comes from the command or a process it started, found in the kernel's socket table with process start times so a reused process ID can't qualify. A program that reads the placeholder from the command's environment is refused. The proxy stops, and closes open connections, when the command exits. - New --proxy-models A,B and --proxy-requests N limit the models a run may name and how many requests it may make; latchkey run says on standard error that they are enforced. The MCP latchkey_run tool takes proxy_models and proxy_requests. ### Import - Import classes each line as a secret, a setting, a public value or an existing reference, and shows the class in lk import --dry-run and in the app's import sheet, where you can change a line's class before saving. Settings (PORT, NODE_ENV, LOG_LEVEL, true/false flags) are left in the file; public values (NEXT_PUBLIC_*, VITE_*, publishable keys, web addresses without credentials) are saved as plain values; anything unclear is a secret. --class KEY=secret|setting|public changes a line from the command line. ### CLI - lk scan [DIR] finds env files that still hold plain values: ones equal to a stored item (compared inside Latchkey; only item names come back, and it asks every time) and ones that look secret. It prints file, line and the item, never a value, and exits 1 when it finds any. --staged scans only what a commit would add, and lk scan --install-hook writes a pre-commit hook that refuses such commits. ### Export - lk export PROJECT/ENV --out FILE --merge updates the variables Latchkey manages in an existing env file, appends the missing ones and keeps every other byte (comments, order, other variables, line endings). It lists the names it adds and updates first and asks to go ahead, unless --yes. - Export Environment… in the app writes an env file of references or values, with the same checks as the command and the same merge. - lk export PROJECT/ENV --values --clipboard and Copy Environment as .env… copy an environment as an env block for dashboards that take a pasted one. Each copy asks, naming the environment and the clipboard; it stays on this Mac, is hidden from clipboard managers and clears after 60 seconds. Agents and Safari can't copy. The log says "copied to the clipboard". ### App - The direct download updates itself with Sparkle: Latchkey › Check for Updates…, and Check for updates automatically in Settings. It reads https://latchkey.snackstud.io/appcast.xml and sends no system profile. The App Store build has no updater. scripts/release.sh signs the disk image and writes site/appcast.xml when Sparkle's sign_update and key are available. - Help menu: Latchkey Help, Privacy Policy, Terms of Use and Report a Security Issue. - App Store build: Latchkey for Safari carries its own privacy manifest (no tracking, no data collected, no required-reason API), and packaging/app-store/listing.md drafts the store listing. ## 0.2.1 12 November 2026 ### Website - The home page shows Latchkey in use: self-playing scenes of a fresh clone rebuilt with lk project and lk export, an env file imported, a second Mac (marked pending until tried), an agent being granted a folder and asked again for production, and rotation. The approval demo follows the one-prompt panel. - Leads with "Your projects move. Your secrets don't." New Features, Security, Pricing, For teams and Roadmap pages; every page shares a header (Features, How it works, Pricing, Security, Docs) and one footer, and works on phones and in light mode. ### App - Closing the window or Quit from the Dock leaves Latchkey in the menu bar, without a Dock icon; Quit there (or in the app menu) quits it. ### Fixes - The release checksum file names the disk image alone, so shasum -a 256 -c works next to a downloaded copy. ## 0.2.0 11 November 2026 ### Duplicates - lk duplicates and Review › Find Duplicates… find items holding the same key, with one approval, and say what to do: give production its own key, keep one item where an environment has several names for a value, combine the rest into one shared item (suggested names never collide), or mark identifiers as plain values. The approval says it's comparing values. Values never leave Latchkey, and agents can't ask. - lk combine IDS --into NAME and Combine into Shared… make them one shared item; environments and the files they were imported from follow, and the originals go to Recently Deleted. ### Remote locations - Add Remote Location is its own sheet: pick the service, fill in its details (each explained), choose the environment, and see whether the service's tool is installed, with a link to install it. Add Location stays disabled until the details are complete. ### The window - An Item menu acts on every selected row, with shortcuts: copy value (⌥⌘C), copy references (⇧⌘C), copy as env file lines (⇧⌘E), require approval or let agents read (⌥⌘A), move (⇧⌘M), grant access (⇧⌘G) and delete (⌘⌫ or Delete). The shortcuts work while the list has focus; the right-click menu offers the same. - A new layout, arranged like 1Password: All Items, Review (what may need a look: values changed since a push, values not pushed, grants about to end), Activity, then projects and services, then Grants and Recently Deleted. The list is flat and alphabetical, each row with its project and environment, with search (⌘F) and a filter for category, environment and access. The detail pane is a set of cards with an Edit menu. - Review, Activity, Recently Deleted and Grants each show the selected entry's detail: Review findings with their items and a recommended action, Activity entries with who, where and the command, deleted items with restore and permanent delete, and grants in a table with revoke. - Edit Details… changes kind, access, service, note and fill sites together, with one Touch ID. - The sheets share one header and footer. - List rows are two lines, the name over its project, environment and service, with the type as the icon (hover for its name). The header counts items, projects and services and has a New Item button; import and move are in the options menu after the filters. - New Value, New Grant, Move to a Project and Import use the sheets' field cards and footer. ### Fixes - Copied values stay on this Mac: Universal Clipboard no longer hands them to your other devices. - lk push and lk remote status cover the whole environment record: shared items and plain settings go too, and unconfirmed variables are held back and listed. The app shows push state for a pushed shared item. - lk export --values refuses a file Git tracks or doesn't ignore, and warns about folders that sync to a cloud service. ### Approvals - One prompt at a time. A change asks with the macOS Touch ID sheet alone ("Latchkey is trying to add shop/development/DB, asked by Claude in ~/Projects/shop"); its Details… button opens the panel with everything. Releasing values, grants, earlier values and pushes show the panel first and ask for Touch ID after you choose. Before, the panel and the system sheet appeared together. - Panels name the agent ("Claude wants to use 2 items"), with the process chain under "Asked by". - An unanswered sheet denies without opening the panel. - A plain-text export no longer offers "Allow from this folder", which it couldn't honour. ### App Store groundwork - The store experiment has a dedicated, mutually authenticated CLI endpoint. Commands continue to run in the terminal CLI; channel selection never falls back to another broker. Dynamic Security.framework identity checks avoid needing sandbox access to the external CLI executable. Signed execution probes cover Node/npm, masking, temporary files, signals and grants; final CLI packaging, SSH and full submission gates remain pending. ### Command line - latchkey log reads the access log of the Latchkey it's talking to, over its connection, so it works when that Latchkey keeps its log in a sandbox container or on another Mac over SSH. It needs an updated app; --limit takes 0 to 1000. - The tool picks its broker once (LATCHKEY_BROKER: auto, direct or app-store) and never falls back to another. LATCHKEY_LOCAL_SOCKET points it at a local socket for development, still checking the app's signature. - Caller details are read between two checks of the process's start time, so a reused process ID can't lend another process's folder or command to a request. ## 0.1.0 11 November 2026 ### Environments on every Mac - Each environment has a synced record of its variables: items (shared items too) or plain settings such as PORT=3000. latchkey run --env reads it, so a shared item still loads when the checkout is somewhere else, as on another Mac. Until latchkey env migrate has checked an environment, the older path-based lookup still fills gaps, and says so. - latchkey env lists, shows, sets, unsets, confirms and removes records; env migrate makes them from your items and the files they came from. It only adds, marks what it found through file locations as unconfirmed, and reports conflicts, missing items, missing files and plain values that may be secret. - Import, set and mv keep records current. - latchkey export PROJECT/ENV writes an environment's env file of references. --values writes values in plain text: it asks every time naming the file, writes it owner-only and whole, refuses symbolic links, and is logged without the values. - latchkey project matches a checkout to its project by Git remote; project link remembers a project's remote. Import names items after a linked project, so a clone under another folder name keeps its project. - MCP: latchkey_project and latchkey_export_references, which never return values. ### Approvals and setup - The Touch ID sheet says only what's asked ("Latchkey is trying to add shop/development/DB for claude"); the approval panel above it still shows the caller, folder and command. - After an import, the next-steps sheet offers a prompt to copy into an agent's instructions. - The window shows changes made on your other Macs: it looks again when Latchkey comes to the front and every 30 seconds while a window is open. Before, an open window kept showing an item deleted on another Mac. ### App Store groundwork - An isolated experimental sandbox build and preflight checks, following the Apple SDK patterns used in Peel. - Persistent security-scoped file access with Settings removal, parent-folder consent for atomic env rewrites, and Foundation document coordination. - A main-app privacy manifest and explicit full-functionality runtime/submission gates. No store submission is enabled, and the shipping direct build and Safari extension remain separate from this experiment. ### Security and reliability fixes - Allow Once authorizes one read request. Implicit approval caching is removed; repeat access needs an explicit grant or the No Approval setting. Revoking a grant stops future reads through it immediately, without recalling values already released or overriding other grants and No Approval settings. - Proxy mode refuses custom provider base URLs, plaintext supported keys, and additional variable or file deliveries of a protected key. It refuses runs without a supported key reference and never follows upstream redirects. Other credentials are delivered normally. - Quoted multiline .env values are imported and rewritten in full. Malformed files are refused before saving; a rewrite stops if the file changed during approval. File permissions are preserved. - Temporary key files have distinct paths per full item ID, preventing collisions between environments. - Command-line redaction covers URL credentials and common secret query parameters. Arbitrary arguments still need care: redaction is heuristic. - Safari discards stale detections after changes, removal or navigation, bounds retained candidates, and rechecks values before saving. Password and hidden fields are excluded from focus and input handlers. - App, website and guides describe effective access, proxy limits, unverified sync delivery, and preview-only installation. Regression coverage includes authorization, imports, file delivery, proxy configuration and Safari capture lifecycle. ### Storage and sync - Values in iCloud Keychain, in Latchkey's own access group, synced to every Mac signed in to your Apple Account. - Kind, agent-safe, service, note and "used in" travel with each item. - Settings › Move to iCloud Keychain for items saved by an unsigned build. ### Running commands - latchkey run fills in latchkey:// references and hides values in the command's output. - --env PROJECT/ENV runs without an env file; --file NAME=ID and latchkey-file:// deliver values as temporary files. - Documented exit codes; refusals and missing items say what to do. - The command-line tool starts the app when it isn't running. ### Agents - Grants can end when the agent quits (--session), cover only one command (--command), or one use (--once); the approval panel offers "until claude quits" and "Only for this command". - latchkey run --proxy: OpenAI and Anthropic keys never reach the command; it gets a placeholder and a local base URL, and the real key goes only to the provider. - latchkey run --aws-session / --aws-role: short-lived AWS credentials from STS instead of the long-lived key. - latchkey touched and latchkey rotate: see what a session was given, and replace it, with history kept and linked environments pushed. - Use Latchkey from another Mac over SSH (LATCHKEY_SOCKET); each read without No Approval asks; local grants do not apply. - latchkey mcp: an MCP server with status, list, check, run and request-grant tools. It exposes no direct secret-read tool; output is masked and capped, but transformed secrets can still leak, and grants an agent asks for are limited to its folder, a day, and non-production environments. - latchkey check shows what a run would get without asking, what would ask, and what's missing. ### Security - Approvals and grants judge the caller by what the kernel reports: its real working folder and command line, and whether it's Latchkey's signed command-line tool. Other programs are named by their path, with a warning. - Grants live in a keychain item only Latchkey can change, not in a file. - The command-line tool checks the app's signature before sending anything. - Development installs no longer carry the debugging entitlement. - The access log is chained with HMAC; latchkey log --verify finds changed, removed or added entries. Likely secrets in command lines are redacted. - Approving "Allow from this folder" from a caller whose folder is / no longer grants every folder. ### Approvals and grants - An approval panel with the program chain, folder and command, then Touch ID, Apple Watch or your password. - Grants for a folder, its subfolders and its repository's worktrees, for up to 7 days; for items, environments or projects. - Agent-safe items for values that aren't secret. ### Organizing - Items belong to a project's environment (project/environment/NAME) or are shared. - A tree of projects and environments, with counts, environment badges, and where each environment lives. - Services detected on import; editable. - Multi-select and project-wide actions, each with one approval. - Move items between projects and environments, with references updated in their files. ### Importing - latchkey import --scan ~/Projects finds and imports every project's env files at once. - latchkey import for one file or many (--batch), with one approval, --rewrite, --share-identical, --agent-safe-pattern, and expiring Vercel and Turbo tokens skipped by default. - Projects named after the repository's main checkout; environments from the file name. ### History - The last 10 values of each item, with show and restore. - Recently Deleted for 30 days. ### Remote locations - Link environments to Vercel, GitHub Actions, Railway and Fly; compare names; push with approval every time and an extra confirmation for production. Nothing is deployed. ### The app - Window with sidebar, tree, detail and bulk actions; menu bar panel; settings; open at login. - A light and dark app icon. - One copy runs at a time. ### Safari - Latchkey for Safari spots keys on any page you allow it on: about twenty provider formats, private keys, database URLs with a password, and labelled random secrets, skipping masked values, examples, publishable keys and certificates. Confident finds get a Save to Latchkey button beside the key; others are listed in the toolbar panel, with a count on its button. Save Selection to Latchkey saves anything it missed. It can't read stored values. - After a save, the extension shows the reference to use; its toolbar button says whether it can reach Latchkey. - The Save to Latchkey button sits beside the copy of a key you can see, not a hidden copy kept for the page's copy button, and Save says so when it can't reach the app instead of waiting. - The Save to Latchkey button is placed from the box holding the key (inside a one-line field, or on a larger box's top edge) and appears once it has settled; the panel opens beside the box, not over the key. - Fields that expect a key, token, secret, private key, certificate or connection string are recognized by label and attributes and listed in the toolbar panel. - Fill from Latchkey: a badge in a recognized field lists the items allowed on that site; choose one and approve with Touch ID to fill it. Items fill only on their service's own site and on deployment platforms, over https, in the page itself (not frames), with approval every time. - Per-item fill sites: Fill in Safari on in an item's details, or latchkey update --fill-sites, limits an item to the sites you list, in place of the default. The extension can't change it. Certificates are offered as public items. - When a page says it shows a new key only once, the save panel opens from its button without a click; saving still takes your press and Touch ID. ### Approvals - With Touch ID, the approval panel takes the fingerprint itself: one step, not a panel and then a sheet. - Things you start yourself, in the window or in Safari, ask for Touch ID alone. - After an import or a new item, Latchkey shows the reference and the lk run command to use next. ### Distribution - Developer ID-signed and notarized, in a disk image, with the command-line tool inside the app (Latchkey › Install Command Line Tool…, which also adds lk). - A Homebrew cask, written by the release script. ### Docs - Nine credential use cases (docs/cases) and a design proposal for Authority Manifest and delegated staging deploys (docs/authority-manifest-integration.md). Neither describes shipped behavior. --- Page: Get the latchkey command-line tool · Latchkey URL: https://latchkey.snackstud.io/cli.html Command line # The command-line tool latchkey, and lk for short, runs your commands with values filled in from Latchkey, and works with coding agents. Every value it asks for is approved in the Latchkey app. ## With the Mac App Store version An App Store app can't install tools outside its own folder, so the command-line tool is a separate, free download, signed by Snack Studio and notarized by Apple. Install it with Homebrew: Terminal ``` brew tap zachshallbetter/latchkey brew trust zachshallbetter/latchkey brew install latchkey-cli ``` Or download latchkey-cli-VERSION.zip from the latest release, unzip it, move latchkey to a folder on your PATH (such as ~/.local/bin), and add lk as a link to it if you like. Open Latchkey once, then check the tool reaches it: Terminal ``` latchkey status ``` ## With the direct download The tool comes inside the app. Choose Latchkey › Install Command Line Tool…, which links ~/.local/bin/latchkey and lk to it, or install the app with Homebrew (brew install --cask latchkey), which adds both. ## Next Quickstart · CLI reference · Agents and MCP · Support --- Page: Coding agents and MCP: grants and exit codes · Latchkey URL: https://latchkey.snackstud.io/developers/agents.html # Agents and MCP Coding agents need your keys to run tests and dev servers. With Latchkey they get them through latchkey run: the values reach the command, not the agent’s files, and you decide what an agent may use without asking. ## The pattern - Keep references in env files: latchkey import .env.local --rewrite. - Run anything that needs secrets through latchkey run. - Decide what an agent may read without you: agent-safe items for values that aren’t secret, grants for a folder and a time. Everything else asks you, showing the agent’s process chain, folder and command. Fresh git worktrees don’t have your .env (it’s gitignored). latchkey run --env PROJECT/ENV loads an environment’s items directly, and a grant for a repository’s folder covers its worktrees. An agent runs its tests through lk run, and you allow the folder until the agent quits. Its next run goes through. A production item isn't covered, so it asks again, and a denial is exit 77. Example data; the output is what Latchkey prints. ## Skills and plugins The Latchkey skill tells an agent to run commands through lk run, check before a slow run, never print or write a value, put references in env files, give you the lk set command for a missing key, suggest a session grant when you step away, and stop on 77 or 66. - Claude Code: the plugin installs the skill and registers lk mcp as an MCP server. ~/.local/bin must be on the PATH Claude Code starts with. - Codex CLI, Gemini CLI, Cursor and other tools that read the Agent Skills format: copy the plugins/latchkey/skills/latchkey folder into the skills folder your tool reads, such as .agents/skills/ for Codex. - Claude Desktop and other MCP clients without a shell: add lk mcp as a local MCP server. Chat apps that only reach MCP servers on the internet can’t use Latchkey, since its MCP server runs on your Mac. Claude Code ``` /plugin install latchkey --marketplace zachshallbetter/latchkey ``` The repository is public, so the marketplace install should work, though it hasn’t been tried end to end yet. You can also add the plugin from a local checkout with /plugin marketplace add /path/to/latchkey. ## Instructions for agents Without the skill, put this in CLAUDE.md, AGENTS.md or your agent’s equivalent: CLAUDE.md / AGENTS.md ``` Secrets are in Latchkey. Env files hold latchkey:// references, not values. Run anything that needs secrets as `latchkey run --env-file .env.local -- ` or `latchkey run --env / -- `. Never run `latchkey get`, never print the environment, and never read or write values in .env files. If latchkey exits with 77 (refused) or 66 (missing), stop and ask; don't retry. ``` ## Exit codes to act on CodeMeaningWhat an agent should do 0Done 64Wrong usageFix the command 66No item with that IDStop; ask the person to add it 69The Latchkey app can’t be reachedStop; ask the person to open Latchkey 73A file couldn’t be rewrittenStop and report 77Refused: not agent-safe, not approved, no grantStop; ask the person to approve or grant. Don’t retry 127The command couldn’t startFix the command On 77 and 66 the message names the items and, for 77, the exact latchkey grant command that would allow them, for the person to run. ## Leaving an agent working Terminal ``` latchkey grant 'shop/development/*' --session --for 4h # ends when the agent quits latchkey grant 'shop/development/*' --command "npm test" --for 2h # only this command latchkey grant 'shop/development/*' --folder ~/Projects/shop --for 2h # the folder, for a time ``` Run them inside the agent’s session (in Claude Code, start the line with !) so --session ties to the agent. The agent’s reads go through without asking until the grant ends, and each one is in the app’s Activity. End it early from Grants in the app or with latchkey revoke ID. ## Keys an agent can use but never read For OpenAI and Anthropic keys, latchkey run --proxy (or proxy: true on latchkey_run) gives the command a placeholder and a local base URL, and adds the real key only to requests to the provider. An agent’s command can call the API but can’t print, encode or send the key anywhere else. See --proxy. Only the command and the processes it starts can use the proxy; a request from any other program gets a 403, and the proxy stops when the command exits. To narrow what the command may do with the key, add --proxy-models A,B (only requests naming a listed model are forwarded) and --proxy-requests N (refuse requests after N). On latchkey_run these are proxy_models, an array of model names, and proxy_requests, a number; both need proxy: true. Latchkey says on standard error that the limits are enforced. Terminal ``` latchkey run --proxy --proxy-models gpt-4o-mini --proxy-requests 100 --env shop/development -- npm test ``` ## After an agent session See what the agent was given, and replace anything you’d rather it no longer knew: Terminal ``` latchkey touched --since 4h --by claude latchkey rotate --touched --since 4h --by claude --open --push ``` ## From another Mac over SSH Forward Latchkey’s socket when you connect, then point latchkey on the other Mac at it: Terminal ``` ssh -o StreamLocalBindUnlink=yes -R /tmp/latchkey-$USER.sock:"$HOME/Library/Application Support/Latchkey/broker.sock" devmac ``` On the other Mac ``` export LATCHKEY_SOCKET=/tmp/latchkey-$USER.sock latchkey run --env shop/development -- npm test ``` $USER expands to your login name on each Mac: use the same name on both, or put a fixed name in both commands. Forwarding needs the direct-download app on your Mac; the Mac App Store version doesn’t support it yet, and if the other Mac has the App Store version installed, set LATCHKEY_BROKER=direct there. - Each read that is not agent-safe asks. Your Mac sees only your ssh client, so grants don’t apply and can’t be made over the connection. - The approval panel says so, and shows what the tool on the other computer says it’s running, marked as unchecked. - The tool there can’t check the app’s signature through a forwarded socket; latchkey status says so. - The other computer needs latchkey too; the tool is macOS only. ## Latchkey’s MCP server latchkey mcp gives agents Latchkey’s tools over MCP: for clients without a shell, like Claude Desktop, and for structured refusals instead of exit codes. It has no direct secret-read tool. Child output masks exact secret values; transformed secrets can still leak. Terminal ``` claude mcp add latchkey -- ~/.local/bin/latchkey mcp ``` Other clients ``` { "mcpServers": { "latchkey": { "command": "/Users/you/.local/bin/latchkey", "args": ["mcp"] } } } ``` ToolWhat it doesAsks you? latchkey_statusWhere values are kept, how you approve, item and grant countsNo latchkey_listItem IDs with kind, service and agent-safe, by project or environment. Never valuesNo latchkey_checkWhat a run would get without asking, what would ask, and what’s missing, for env_files, environments, files or idsNo latchkey_runRuns command (an argument array) in cwd with references filled in. Returns the exit code and the output, masked. With proxy, proxy_models and proxy_requests limit what the command may do with the key (see above)When an item isn’t agent-safe or granted latchkey_request_grantAsks you for a grant on ids in the agent’s folder for durationAlways latchkey_projectWhich project the folder’s checkout is, from its Git remotes, and its environmentsNo latchkey_export_referencesWrites an environment’s env file of references and plain settings, never values, inside its cwd onlyNo - Output is always masked, and only the last 64 KB of each stream is returned, with a flag when it was cut. Standard input is empty. - Commands stop after timeout_seconds: 600 by default, at most 3600. Use it for tests, builds and scripts; run dev servers in a shell with latchkey run. A cancelled request stops its command. - Grants an agent asks for cover only the folder it runs in (and that repository’s worktrees), last for the time it asked for (which you see and approve), end when the agent quits, and can’t include production environments or a whole project. Grant those yourself with latchkey grant. - Approval panels for requests through the MCP server say they come from an agent. - Several requests in a row from the same agent in the same folder share one panel while it’s up, and one touch answers them; a grant until the agent quits stops the asking for the rest of the session. - Reading values, changing or deleting items, earlier values, remote locations and pushes aren’t offered. A latchkey_run result ``` { "content": [{ "type": "text", "text": "exit code 0 --- stdout --- 12 passing" }], "structuredContent": { "exitCode": 0, "timedOut": false, "stdout": "12 passing", "stdoutTruncated": false, "stderr": "", "stderrTruncated": false }, "isError": false } ``` A refusal is a tool error (isError: true) whose structuredContent has error (refused, missing, unreachable, usage), the ids, and for a refusal the grantCommand for the person to run. ## Other MCP servers An MCP server that your agent starts as a command can get its keys through Latchkey: wrap the command, and keep references in its environment. .mcp.json ``` { "mcpServers": { "some-server": { "command": "latchkey", "args": ["run", "--no-masking", "--", "npx", "-y", "some-mcp-server"], "env": { "SOME_API_KEY": "latchkey://SOME_API_KEY" } } } } ``` - Use --no-masking: MCP speaks over standard output, which must pass through untouched. - The server’s process chain includes the agent, so make its items agent-safe or grant them, or each start asks. - Servers reached over HTTP with a header can’t be wrapped this way. Agents need the absolute path when ~/.local/bin isn’t on their PATH: use "command": "/Users/you/.local/bin/latchkey". ## Key files Terminal ``` latchkey run --file ASC_KEY_PATH=shop/production/ASC_P8 -- fastlane beta ``` The command gets the path of a temporary file only you can read, deleted when it exits. In an env file, ASC_KEY_PATH=latchkey-file://shop/production/ASC_P8 does the same. ## What Latchkey can’t do for you A value you release to a command is in that command’s memory and environment. A command run by an agent can write it to a file, send it over the network, or encode it so masking doesn’t catch it. Masking only hides exact copies, 6 characters or longer, in what the command prints. Agent-safe and grants decide what reaches the command; they can’t control what the command does with it. --- Page: latchkey:// references and the broker API · Latchkey URL: https://latchkey.snackstud.io/developers/api.html # References and API The formats Latchkey reads and writes: references in your files, the protocol between the command-line tool and the app, and the files it keeps on disk. Use the command-line tool. latchkey is the supported interface, from any language. The socket protocol below is how it talks to the app; it changes only by adding optional fields, but scripts that speak it directly also take on its approval rules. ## References FormWhereBecomes latchkey://IDValues in env files and in the environment of latchkey runThe item’s value latchkey-file://IDValues in env files and in the environment of latchkey runThe path of a temporary file holding the value, mode 0600, deleted when the command exits A latchkey:// reference can sit inside a longer value, as in postgres://app:latchkey://shop/production/DB_PASSWORD@db/shop; each one is replaced. A latchkey-file:// reference must be the whole value. ID is NAME or project/environment/NAME, each part letters, digits, _, - and ., at most 64 bytes. .env.local ``` DATABASE_URL=latchkey://shop/development/DATABASE_URL SENTRY_DSN=latchkey://SENTRY_DSN ASC_KEY_PATH=latchkey-file://shop/production/ASC_P8 ``` ## The broker protocol The app listens on a Unix socket at ~/Library/Application Support/Latchkey/broker.sock, mode 0600 in a 0700 folder. A client connects, writes one JSON object followed by a newline, and reads one JSON object followed by a newline. Keys are sorted; dates are ISO 8601. Requests say nothing about their caller. The broker asks the kernel instead: the caller’s working folder, command line and parent processes, and, by code signature, whether it’s Latchkey’s own command-line tool. The approval panel and the log show those, and grants are matched against the real folder. A signed latchkey also checks that the socket belongs to the Latchkey app before it sends anything. Requests are handled one at a time. A request that needs approval waits until you answer, so allow for that in timeouts. Request ``` {"op":"status"} ``` Response ``` {"info":{"approval":"Touch ID, password","caller":"Latchkey's command-line tool (signature checked)","grants":"0","items":"17","socket":"/Users/you/Library/Application Support/Latchkey/broker.sock","storage":"iCloud Keychain storage (sync status not verified)"},"ok":true} ``` ### Operations opFieldsReturns statusinfo listsecrets: item metadata, never values checknames, intended (the command to test command-limited grants against)agentSafe, granted (with the covering grants), needsApproval, missing. Never asks, never values getnamesvalues, masked (names to hide in output), denied, missing setnames (one), value, kind, agentSafe, note, serviceok updatenames, kind, agentSafe, note, serviceok rmnamesok, or missing movenames, project ("" for shared), environmentmoved: old ID to new ID importitems, replace, sourceadded, replaced, skipped historynames (one)versions, never values deletedversions of deleted items versionversion: a version ID from historyvalues, after approval (always asks) restoreversionok forgetnamesok grantsgrants grantnames, folder (default: where the caller runs), duration (seconds), session, commands (lists of words), usesgrants revokenames: a grant ID, or ["all"]info.revoked, or missing linksnames: optional scopelinks linknames: the scope, targetlinks unlinknames: the link IDok remote-statusnames: the scoperemoteStatus pushnames: the scope, link, onlypushResults origin: "mcp" marks a request from latchkey mcp: the approval panel says an agent asked, and a grant it asks for must be its own folder, for the agent’s session, and nothing in production or a whole project. The label is the request’s own claim: it adds limits, never permissions. Unknown op values are refused. ### Responses Every response has ok. When it’s false, error says why: bad input, a change you didn’t approve, a keychain failure. Reads report per item instead: get answers ok: true with denied for items you refused and missing for IDs that don’t exist, and if anything was denied, no values are released at all. The command-line tool maps these to exit codes 77 and 66. A refused get ``` {"denied":["shop/production/STRIPE_KEY"],"masked":[],"ok":true,"values":{}} ``` ### The item shape What list returns in secrets, and what latchkey list --json prints: latchkey list --json ``` [ { "agentSafe" : false, "kind" : "password", "name" : "shop/development/DATABASE_URL", "note" : "", "service" : "Neon", "updatedAt" : "2026-11-10T21:52:37Z", "usedIn" : [ "/Users/you/Projects/shop/.env.local" ] } ] ``` FieldMeaning nameThe item ID kindtoken, password, key or value agentSafeRead without asking noteFree text serviceWho issued it, optional usedInFiles that reference it, recorded on import and move, optional updatedAtWhen the value or settings last changed ### The grant shape Grant ``` { "created": "2026-11-10T20:00:00Z", "createdBy": "zsh › claude", "expires": "2026-11-10T22:00:00Z", "folder": "/Users/you/Projects/shop", "id": "k3v9q2", "names": ["shop/development/*"], "repo": "/Users/you/Projects/shop/.git" } ``` repo is the repository’s common .git folder, present when the folder is in one; commands run from any of its worktrees are covered. ## The access log ~/Library/Application Support/Latchkey/access.jsonl, mode 0600: one JSON object per line for every read, change and refusal. Never values. access.jsonl ``` {"chain":["zsh","claude","Terminal"],"command":"latchkey run -- npm test","cwd":"/Users/you/Projects/shop","decision":"allowed (grant k3v9q2)","names":["shop/development/DATABASE_URL"],"op":"get","time":"2026-11-10T20:14:03Z"} ``` FieldMeaning timeWhen opThe operation namesItem IDs involved decisionWhat happened: allowed and why, denied, refused chainThe calling process and its parents, nearest first cwdThe folder the caller ran in, from the kernel commandThe caller’s command line, from the kernel programThe calling program’s path, when it isn’t Latchkey’s signed command-line tool prev, macThe keyed hash (HMAC-SHA256) of the entry before and of this one. latchkey log --verify checks the chain against a key and head only Latchkey can read ## Files and storage WhereWhat iCloud Keychain, access group TEAM.io.snackstud.latchkeyItems (service latchkey), earlier values (latchkey.history) and remote links (latchkey.remote), as generic passwords. Synced to your Macs. ~/Library/Application Support/Latchkey/broker.sockThe broker socket ~/Library/Application Support/Latchkey/access.jsonlThe access log Keychain, service latchkey.grantsGrants in effect, on this Mac only, changeable only by Latchkey /Applications/Latchkey.app/Contents/Helpers/latchkeyThe command-line tool, linked from ~/.local/bin/latchkey --- Page: CLI reference for latchkey and lk · Latchkey URL: https://latchkey.snackstud.io/developers/cli.html # CLI reference Every latchkey command and option. latchkey help prints a summary. Nothing here prints a value except latchkey get. ## Conventions - lk is the same tool: lk run -- npm test. - IDs are NAME or project/environment/NAME. Where a command takes several, separate them with commas. - PATTERN means project/* or project/environment/*. - Each command that changes items asks for approval once, for everything it touches. - If the app isn’t running, latchkey starts it hidden and waits. LATCHKEY_NO_LAUNCH=1 fails with 69 instead. ## Running commands ### latchkey run Synopsis ``` latchkey run [options] -- COMMAND [ARGS...] ``` Starts COMMAND with every latchkey://ID in its environment replaced by the item’s value. OptionMeaning --env-file FILELoad KEY=VALUE lines from FILE first. Repeatable. --env PROJECT/ENVSet the environment’s variables from its record (see Environments). Without a record, or before env migrate has run, it also loads what the older lookup finds: each item in the environment as its name, plus the shared items in the same checkout as its files (as recorded on import), and says so. Repeatable. --file NAME=IDSet NAME to the path of a temporary file holding the value, readable only by you and deleted when COMMAND exits. NAME=latchkey-file://ID in an env file does the same. --no-maskingDon’t hide values in COMMAND’s output, and start it directly. --proxyKeep OPENAI_API_KEY and ANTHROPIC_API_KEY out of COMMAND entirely (see below). --proxy-models A,BWith --proxy: refuse requests that don’t name one of these models in their JSON body. --proxy-requests NWith --proxy: refuse requests after N have been forwarded. --aws-session, --aws-role ARN, --aws-for TIMEGive COMMAND short-lived AWS credentials instead of the long-lived key (see below). Items that aren’t agent-safe or covered by a grant ask for approval first. Values of secret kinds that are 6 characters or longer are replaced with in COMMAND’s output, including values split across two chunks; multi-line values are hidden line by line. COMMAND’s exit status becomes latchkey run’s. If COMMAND is killed by a signal, the status is 128 plus the signal. Examples ``` latchkey run --env-file .env.local -- npm run dev latchkey run --env shop/development --env shop/vercel.preview -- npm test latchkey run --file ASC_KEY_PATH=shop/production/ASC_P8 -- fastlane beta ``` Other credentials are delivered normally and are not protected by the proxy. Temporary files are distinct per full item ID. ### latchkey check Synopsis ``` latchkey check [--env-file FILE]... [--env PROJECT/ENV]... [--file NAME=ID]... [IDS] [--json] ``` What latchkey run with the same options would get without asking (agent-safe or covered by a grant), what would ask you, and what’s missing. Asks nothing and releases nothing. Exits 66 if an item is missing, otherwise 0. Example ``` $ latchkey check --env-file .env.local agent-safe shop/development/PGHOST granted shop/development/DATABASE_URL (grant k3v9q2, 1 hour, 12 minutes left) asks shop/development/STRIPE_KEY ``` ### latchkey mcp Serves Latchkey’s tools to an agent over MCP, on standard input and output. See Latchkey’s MCP server. ### Keys that never reach the command: --proxy With --proxy, a variable that is exactly a reference to an OpenAI or Anthropic key gets a placeholder instead, and OPENAI_BASE_URL or ANTHROPIC_BASE_URL points at a port on this Mac that latchkey run listens on. Requests there that carry the placeholder go to api.openai.com or api.anthropic.com with the real key in its place; anything else is refused. The command can use the key but can’t read, print or send it anywhere else. Terminal ``` latchkey run --proxy --env shop/development -- npm test ``` It works with programs that use the OpenAI or Anthropic SDKs (or read those base URL variables). The run is refused if a supported key is not a whole reference, its base URL is already set, or the key would also be delivered through another variable or key file; unset custom base URLs first. At least one supported key reference is required. Only COMMAND and the processes it starts can use the proxy: a request from any other program, even one that knows the placeholder, gets a 403, and the proxy stops when COMMAND exits. A process that detaches from COMMAND (so launchd adopts it) is refused too. --proxy-models and --proxy-requests narrow what COMMAND may do with the key. With --proxy-models, only requests with a JSON body naming a listed model are forwarded, so GET /v1/models, multipart uploads and compressed bodies are refused. When either is set, latchkey run prints latchkey: proxy limits enforced: ... on standard error. Both need --proxy. For the MCP tool, see Agents and MCP. Terminal ``` latchkey run --proxy --proxy-models gpt-4o-mini,gpt-4o --proxy-requests 200 --env shop/development -- npm test ``` ### Short-lived AWS credentials With --aws-session, latchkey run signs a request to AWS STS with your long-lived access key (AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY, both references) and gives COMMAND the temporary credentials STS returns, including AWS_SESSION_TOKEN. --aws-role ARN assumes that role instead. They last 15 minutes unless --aws-for says otherwise (at most 12 hours). The long-lived key never reaches COMMAND, and no AWS CLI is needed. MFA isn’t supported yet. Terminal ``` latchkey run --aws-role arn:aws:iam::123456789012:role/dev --aws-for 1h --env shop/development -- terraform plan ``` ### latchkey get Synopsis ``` latchkey get ID ``` Prints one value. Asks unless the item is agent-safe or covered by a grant. Keep agents away from it. ## Items CommandWhat it does latchkey list [--project P] [--json]IDs grouped by project and environment, with kind, service, whether agents may read them, and the note. --json prints the same as JSON (see the item shape). Never values. latchkey set ID [--kind KIND] [--agent-safe] [--note TEXT] [--service NAME]Add or change an item. The value comes from standard input, or a hidden prompt in a terminal. Kinds: token, password, key, value. Replacing a value keeps the old one as a version. Asks. latchkey update IDS|PATTERN... [--agent-safe yes|no] [--kind KIND] [--service NAME] [--note TEXT] [--fill-sites HOSTS]Change settings on many items with one approval. Values are untouched. --service "" clears the service. --fill-sites vercel.com,app.netlify.com sets the only sites Latchkey for Safari may fill the items on (each covers its subdomains; up to 20); --fill-sites "" goes back to the default: the service’s own site and the deployment platforms. latchkey rm IDS|PATTERN...Delete items with one approval; they go to Recently Deleted for 30 days. If any named item doesn’t exist, nothing is deleted. latchkey mv IDS | --from-file FILE --to PROJECT/ENV | --shared [--file FILE]...Move items into a project’s environment, or back to shared, with one approval. Values, settings and history move with them. References are then updated in the files the items came from, each --file, and the --from-file file, which moves every shared item it refers to. If any target ID already exists, nothing moves. latchkey duplicates [--json]Lists groups of items holding the same value, counted by kind at the top, and what to do about each, with the command to run. See below. latchkey combine IDS --into NAME|ID [--file FILE]...Makes items holding one value into one shared item, with one approval. See below. latchkey scan [DIR] [--json], scan --staged, scan --install-hook [--force]Finds env files that still hold plain values. See Scanning env files. Examples ``` printf %s "$TOKEN" | latchkey set shop/production/STRIPE_KEY --kind token --service Stripe latchkey update 'shop/development/*' --agent-safe no latchkey list --project shop --json ``` ### latchkey duplicates Synopsis ``` latchkey duplicates [--json] ``` Lists groups of items holding the same value, counted by kind at the top, and what to do about each, with the command to run: - production shares a value with another environment: give production its own key; - several names for one value in one environment (PGHOST and POSTGRES_HOST): keep one item there; - a shared item already holds it: point the rest at it; - the same key across projects: combine into one shared item. A suggested name that another group also suggests, or that a shared item already has, gets the first project as a prefix (MANAGER_DATABASE_URL); - identifiers rather than secrets (IDs, hosts, public keys, web addresses without credentials): mark them plain values. Values are compared inside Latchkey and never shown; plain values and values shorter than 8 characters are left out. It asks for approval every time (grants and agent-safe settings don’t stand in), and agents can’t ask. --json gives items, advice, summary and into for each group. ### latchkey combine Synopsis ``` latchkey combine IDS --into NAME|ID [--file FILE]... ``` Makes items holding one value into one shared item NAME, or into one item ID of the environment they’re all in, with one approval. NAME is created from them (agent-safe only if every one was; the service if they agree; where they were used, combined), or must already hold the same value. The others go to Recently Deleted, environment records point at NAME, and references are updated in the files the items were imported from and in each --file. If the values differ, nothing changes. Agents can’t combine. Example ``` latchkey duplicates latchkey combine shop/development/OPENAI_API_KEY,blog/development/OPENAI_API_KEY --into OPENAI_API_KEY ``` ### latchkey scan Synopsis ``` latchkey scan [DIR] [--json] latchkey scan --staged latchkey scan --install-hook [--force] ``` Finds env files under DIR (default: the current folder; .env, .env.* and *.env, not examples, templates or backups, not in node_modules, build or .git folders) that still hold plain values, and prints each as FILE:LINE NAME with the reason, never a value: - the value equals a stored item: the line names the item(s). The values are compared inside Latchkey, which receives the values found in the files and returns only item IDs. Like duplicates, it asks every time (grants and agent-safe settings don’t stand in), and agents can’t ask. Plain items and values shorter than 8 characters are left out; - the value looks secret: a private key, a password or a connection string with credentials, a token with a known prefix (sk_live_, ghp_, AKIA…), or a long value under a name such as *_TOKEN, *_SECRET or *_API_KEY. Identifiers (IDs, hosts, public addresses) and latchkey:// references are not findings. This check is local. It exits 1 when anything is found, so it works in scripts. If Latchkey can’t compare (not approved, not running), the values that look secret are still reported, and it exits 1. --json gives place, key, reason (stored or looks-secret) and items for each finding. --staged scans only the lines a commit would add, from the Git index, in env files that are staged. --install-hook writes a Git pre-commit hook (honoring core.hooksPath, and worktrees) that runs latchkey scan --staged and refuses the commit on findings. A hook that isn’t Latchkey’s is left alone unless --force. If neither lk nor latchkey is on the PATH, the hook says so and lets the commit through. Skip it for one commit with git commit --no-verify. Examples ``` latchkey scan ~/Projects/shop latchkey scan --install-hook ``` ## Environments Each environment has a record: its variables, each pointing at an item (shared items too) or holding a plain setting such as PORT=3000. Records sync with your items, so an environment works the same on every Mac, wherever its checkout is. Import, set and mv keep them current. CommandWhat it does latchkey env [list], latchkey env show PROJECT/ENV [--json]Records, and one record’s variables. Unconfirmed variables are marked. latchkey env migrate [--dry-run]Makes or completes records from your items and, where they’re on this Mac, the files they came from. Only adds: a stored variable is never changed, and running it again is safe. Reports conflicts, missing items, missing files and plain values that may be secret. What it found through files is unconfirmed until env confirm. Only numbers up to six digits and true/false are recorded from files without asking you. Asks once. latchkey env set PROJECT/ENV NAME=latchkey://ID|NAME=VALUE..., env unset, env confirmChange one record. NAME=latchkey://ID points a variable at an item (it must exist); NAME=VALUE is a plain setting. A plain setting that looks secret is refused: save it as an item and point the variable at it. env confirm with no names confirms everything unconfirmed. Asks once. latchkey env rm PROJECT/ENVForgets an environment’s record, with one approval. Its items stay, and run --env goes back to finding them by ID until a record is made again. latchkey project [DIR], project link [NAME] [DIR] [--remote R], project unlink NAME [DIR], project listWhich project a checkout is, from its Git remotes (never with credentials). project shows the matching project, its environments, and the export command to run. link remembers the checkout’s origin (or --remote R, or its only remote) as project NAME, by default the folder’s name, so clones on your other Macs are recognized; it asks. A remote belongs to one project; unlinking a project’s last remote forgets the project. A match only names the project: it never releases a value or widens a grant. A match through a remote other than origin, as a fork has, is flagged and never taken as the project. ## Export ### latchkey export Synopsis ``` latchkey export PROJECT/ENV [--out FILE [--merge [--yes] | --replace]] [--values [--clipboard]] ``` Writes the environment’s env file from its record: latchkey:// references and plain settings, sorted by name, to standard output or FILE. - An existing FILE is left alone, and the variables that would change are named, unless --merge or --replace. A symbolic link or anything but a regular file is refused. The file is written beside its destination and renamed into place, so it’s never half-written. - --merge updates the variables the record has, appends the ones missing, and leaves every other byte of the file as it is: comments, blank lines, order, variables Latchkey doesn’t manage, line endings, a last line without one. A variable already holding the value is left as written; an updated line keeps its indentation and export and loses an inline comment. It lists the names it will add and update, then asks to go ahead (--yes skips that; without a terminal --yes is required). The file must be UTF-8 KEY=VALUE lines, and it’s refused if it changes while waiting. Nothing to change writes nothing. A file that doesn’t exist yet is created, as without --merge. With --values, a variable already in the file is listed as an update before its value is known, and a merged file becomes readable only by you. - --replace rewrites the whole file, losing its comments and other variables. - --values writes the values themselves, in plain text. It needs --out (or --clipboard), asks every time with the file named (no grant, agent-safe setting or earlier approval stands in), writes the file readable only by you, and the access log records which items went to which file, never the values. Agents can’t use it. Inside a Git checkout the file must be ignored and not tracked, or nothing is asked or written; a file in a folder that syncs to iCloud Drive, Dropbox, Google Drive or OneDrive gets a warning, since the values would leave the Mac. - --values --clipboard copies the environment as an env block (no header comment) for a dashboard that takes a pasted one, instead of writing a file. It asks every time, naming the environment and that the values go to the clipboard. The copy is for this Mac only (not Universal Clipboard), marked concealed and transient so clipboard managers skip it, and cleared after 60 seconds if nothing else was copied meanwhile. Agents and Safari can’t copy, nor can a request forwarded over SSH (the clipboard would be on the other computer). The log records “copied to the clipboard”, never the values; unlike a file, a copy can’t be traced afterwards. - Unconfirmed variables and references to missing items are noted on standard error. Examples ``` latchkey export shop/development --out .env.local --merge latchkey export shop/development --values --clipboard ``` ## Importing Synopsis ``` latchkey import FILE... [options] ``` OptionMeaning --batch LISTAlso import the files listed in LIST, one path per line (# comments allowed). --scan DIRAlso import every .env and .env.* under DIR, skipping examples, templates, backups, and dependency, build and .git folders. --project P, --env EPlace items here instead of what the repository and file name imply. --sharedImport as shared items named after their keys. --share-identicalWith several files, make a name with the same value in every file one shared item. --rewriteReplace each imported value in its file with its reference. --replaceOverwrite items that already exist (old values are kept as versions). --dry-runShow what would happen, with a count per class and each setting it would leave; send nothing. --only KEY,...Import only these keys (one file only). --kind KIND, --kind KEY=KINDKind for all keys, or one. --class KEY=secret|setting|publicChange how a line is classed (see below). --kind KEY=KIND also decides the class. --agent-safe KEY,... or allMark keys agent-safe. --agent-safe-pattern PATTERN,...Import matching names as agent-safe plain values. --skip PATTERN,...Leave matching names alone. --no-default-skipImport VERCEL_OIDC_TOKEN, VERCEL_* and TURBO_* too. Imports support quoted multiline values and refuse malformed syntax before saving anything. Rewriting replaces the complete assignment and stops if the file changed while approval was pending. ### Classes Each line is classed before anything is saved: ClassExamplesWhat import does SecretTokens, passwords, connection strings with credentials, key blocksSaved masked SettingPORT, NODE_ENV, LOG_LEVEL, *_ENABLED, *_PORT, true/false valuesLeft in the file PublicNEXT_PUBLIC_*, VITE_*, PUBLIC_*, EXPO_PUBLIC_*, REACT_APP_*, publishable and public keys, IDs and hosts, web addresses with no credentialsSaved as a plain value (not masked, not agent-safe unless you say so) Referencelatchkey://...Left alone A value that carries credentials (a key block, a URL with a user or password) is a secret whatever its name says, and anything unclear is a secret. Settings stay in the file, so --rewrite doesn’t touch them. In the app, the Class column of the import sheet does the same as --class. Classes aren’t remembered between imports yet. Example ``` latchkey import .env.local --dry-run latchkey import .env.local --rewrite --class FEATURE_FLAGS=setting ``` ## History CommandWhat it does latchkey history IDEarlier values: when, why (replaced, deleted, replaced by a restore) and by whom. Never values. latchkey restore ID [--version N]Put back version N (1 is the most recent), or bring back a deleted item with its settings. The current value is kept as a version first. Asks. latchkey deletedItems deleted in the last 30 days, with days left. latchkey forget IDSDelete earlier values for good. Asks. ## Grants CommandWhat it does latchkey grant IDS [--folder DIR] [--for TIME] [--session] [--command CMD]... [--once]Let commands run from DIR (default: here), the folders inside it and that repository’s worktrees read these items without asking. TIME is like 30m, 2h, 1d, or always for a grant that lasts until revoked; default 1 hour, no maximum. IDS can include patterns. Asks once. latchkey grantsGrants in effect, with time left and any limits. latchkey revoke ID or allEnd a grant, or all of them. Doesn’t ask. Narrow a grant with --session (it ends when the agent you run it under quits, and covers only programs started under it), --command "npm test" (only latchkey run of that command, read from the signed tool’s own command line), or --once (one request). The approval panel offers the same: until claude quits and Only for …. ## Rotating CommandWhat it does latchkey touched [--since 24h] [--by NAME] [--grant ID] [--json]Items Latchkey released in that time: to anything, to programs under NAME (such as claude), or under one grant. From the access log; never values. latchkey rotate IDS|PATTERN... | --touched [...] [--open] [--push]Replace items one by one: ends grants that cover them, shows where to make each new key (--open opens it), asks for the new value (the old one stays in history), then pushes to linked environments with --push. After an agent session ``` latchkey touched --since 4h --by claude latchkey rotate --touched --since 4h --by claude --open --push ``` Latchkey can’t make the new key for you: Stripe, GitHub, OpenAI and most services issue keys only in their dashboards. It takes you to the page, saves what you paste, and puts it everywhere it’s linked. ## Remote locations CommandWhat it does latchkey remote list [PROJECT/ENV]Links, with when each was last pushed. latchkey remote link PROJECT/ENV SERVICE KEY=VALUE...Link an environment. SERVICE is vercel, github, railway, fly or ssh (host= and script=; see a service on a Linux server). Asks. latchkey remote unlink LINKRemove a link. Doesn’t ask. latchkey remote status PROJECT/ENVNames missing on each side, and values changed since the last push. latchkey push PROJECT/ENV [--to LINK] [--only IDS] [--dry-run]Push values with each service’s own tool, values on standard input. Asks every time; production needs its own confirmation in the app. Nothing is deployed. ServiceKeysTool vercelenvironment= (development, preview or production), and project= or dir=; optional branch= for one preview branchvercel githubrepo=owner/repo; optional environment= (leave out for repository secrets)gh railwayenvironment=, service=, and project= or dir=railway flyapp=flyctl ## The log CommandWhat it does latchkey log [--limit 20]Recent access log entries: time, what, decision, items, who, folder and command. Never values; likely secrets in command lines are redacted. latchkey log --verifyChecks the log’s chain: exits 0 if every entry is as Latchkey wrote it, 1 with the first line that isn’t. ## Status Synopsis ``` latchkey status ``` Where values are kept, how you approve, how many items and grants, and the socket path. ## Environment variables VariableMeaning LATCHKEY_NO_LAUNCH=1Don’t start the app if it isn’t running; fail with exit 69 instead. LATCHKEY_SOCKET=PATHConnect to a socket forwarded over SSH from the Mac running Latchkey (see from another Mac). ## Exit codes CodeMeaning 0Done 64Wrong usage 66No item with that ID 69The Latchkey app can’t be reached 73A file couldn’t be rewritten 77Refused: not agent-safe, not approved, no grant 127The command couldn’t start On 66 and 77, Latchkey prints the item IDs and what to do, including the latchkey grant command that would allow the refused items. --- Page: Developer docs: how Latchkey fits together · Latchkey URL: https://latchkey.snackstud.io/developers/ # Latchkey for developers Everything you can script: the latchkey command-line tool, the references your files hold, the protocol the tool speaks to the app, and how to put agents and MCP servers behind it. ## The pieces - The app holds the keychain. It runs the broker, shows approval panels, and keeps the log, grants and history. Only the signed app can read Latchkey’s keychain access group. - latchkey, the command-line tool, asks the app for everything over a Unix socket. It starts the app in the background if it isn’t running. - References such as latchkey://shop/production/DATABASE_URL go in env files and environment variables in place of values. How it fits together ``` latchkey (CLI) │ JSON over a Unix socket ▼ Broker (in the app) ──► iCloud Keychain ├─ approval panel, then Touch ID ├─ grants: keychain, this Mac only ├─ access log: access.jsonl (never values) └─ remote pushes: vercel, gh, railway, flyctl, or the services' APIs with a token item ``` ## Where to start Quickstart Install the tool, import an env file, run a command, grant a folder. CLI reference Every command and option, environment variables and exit codes. Agents and MCP Instructions for coding agents, narrower grants, keys an agent can use without reading, rotation after a session, SSH, and Latchkey’s MCP server. References and API The reference formats, the broker protocol, the access log, and the files Latchkey keeps. ## Item IDs An item is either shared, NAME, or belongs to one environment of a project, project/environment/NAME. Each part is letters, digits, _, - and ., at most 64 bytes. For an item, the ID is the only place its project and environment are stored. Environments can be any name; development, preview, staging, production and test sort first. Use names like vercel.preview to tell apart the same environment in different places. KindForMasked in output tokenAPI tokens and keys, one lineYes passwordPasswords and connection strings, one lineYes keyKey material: SSH, GPG, .p8, .pem. Multi-lineYes, line by line valueNot secret: host names, account IDsNo ## What’s released without asking A read is released without a prompt only when the item is agent-safe (No Approval in the app), or a grant covers the folder, session and command as applicable. Allow Once authorizes one request; approvals are not cached. Revoking a grant stops future reads through it, but cannot recall released values. Everything else shows the approval panel, then Touch ID, Apple Watch or your password. Earlier values always ask. Changes (set, update, delete, move, import, restore, push) always ask, once per request: the Touch ID sheet alone, with the panel behind its Details… button (pushes show the panel first). --- Page: Quickstart: install, import and run · Latchkey URL: https://latchkey.snackstud.io/developers/quickstart.html # Quickstart From an env file full of secrets to a command that gets them at start-up, in four steps. ## 1. Install Download the latest disk image and drag Latchkey to Applications, or install it with Homebrew: brew tap zachshallbetter/latchkey, brew trust zachshallbetter/latchkey, then brew install --cask latchkey. The cask adds both commands for you. With the disk image, open it and choose Latchkey › Install Command Line Tool…, which links ~/.local/bin/latchkey, and lk for short, to the copy inside the app so it updates with the app. Make sure ~/.local/bin is on your PATH; in zsh, echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc does it. With the Mac App Store version, see the command-line tool. Terminal ``` latchkey status ``` You should see storage: iCloud Keychain storage (sync status not verified). ## 2. Import an env file Look first. A dry run prints names and where each would go, never values: Terminal ``` cd ~/Projects/shop latchkey import .env.local --dry-run ``` The dry run also classes each line: secret, setting (such as PORT, left in the file), public value (such as NEXT_PUBLIC_*, saved as a plain value) or existing reference. It counts each class and lists each setting it would leave. Change a line with --class KEY=secret|setting|public. Then import, and replace each value in the file with its reference. The project is named after the repository; the environment comes from the file name (.env.local is development). Terminal ``` latchkey import .env.local --rewrite ``` .env.local ``` DATABASE_URL=latchkey://shop/development/DATABASE_URL STRIPE_KEY=latchkey://shop/development/STRIPE_KEY ``` Imports support quoted multiline values and refuse malformed syntax before saving anything. Rewriting replaces the complete assignment and stops if the file changed while approval was pending. The dry run, then the import: one approval, and each value in the file becomes its reference. Here --skip PORT leaves a plain setting as it is. Example data; the output is what Latchkey prints. Every project at once: latchkey import --scan ~/Projects --dry-run, then again without --dry-run. Or latchkey import --batch files.txt, one path per line. Either way, one approval. See the import options. ## 3. Run a command Terminal ``` latchkey run --env-file .env.local -- npm run dev latchkey run --env shop/development -- npm test # no env file needed ``` lk run reads the references, asks Latchkey for the values, and starts the command with them in its environment; anything it prints of them is concealed. Example data; the output is what Latchkey prints. Reads ask unless a grant or the No Approval setting permits them. Values that reach the command’s output are replaced with . The command’s exit status becomes latchkey run’s. ## 4. Let an agent work Before you step away, allow the folder for a while. Commands run from it, its subfolders and the repository’s worktrees read these items without asking until the grant ends. Terminal ``` latchkey grant 'shop/development/*' --folder ~/Projects/shop --for 2h latchkey grants latchkey revoke all ``` Then tell the agent how to run things; see instructions for agents. --- Page: Features: env references, Keychain and agent access · Latchkey URL: https://latchkey.snackstud.io/features.html # Credentials kept by name in Keychain, and filled in when a command starts. Credentials that have IDs, history and a home outside any one project. Env files that hold references. Environments that rebuild on another Mac. Commands and agents that use values only when you've said so, and a record of every time they did. - Credentials - Environments - Devices - Agents and tools - Integrations - Visibility - Pro In this build Works in the development preview.Pending Built but not yet verified for release, or not built yet.Everything on this page is free. What Pro addsScenes replay what Latchkey prints and shows, with example data. Credentials ## Every credential has a name, a place and a past. An item is project/environment/NAME, or just NAME when it's shared by every project. Its kind, service and note travel with it, and replacing its value keeps the old one. The Latchkey window, with example data. With scripts on, it works: search, filter by type or environment, pick a project or service in the sidebar, and open an item. It lists: - shop: DATABASE_URL, STRIPE_KEY, PGHOST and NEXT_PUBLIC_SITE_URL for development; DATABASE_URL for preview, not pushed yet; DATABASE_URL and STRIPE_KEY for production, the key changed since its last push - blog: ADMIN_PASSWORD, SENTRY_DSN and GITHUB_TOKEN - api: the ASC_P8 key file and API_BASE_URL - Shared: OPENAI_API_KEY and ANTHROPIC_API_KEY Opening an item shows its value (hidden until Touch ID), reference, type, access, service, project, environment, note, location, history and recent activity. Review lists what may need a look. The Latchkey window, working with example data: search, filter by type or environment, pick a project or service, and open an item to see its reference, access, location, history and recent activity. Revealing or copying a value asks for Touch ID. The values are made up. ### Store and organize In this build Tokens, passwords, key files and plain values, grouped by project and environment in the app and the CLI. The value is read from standard input or a hidden prompt. ``` lk set shop/development/STRIPE_KEY --kind token --service Stripe ``` Items ### Share one value across projects In this build Importing many projects at once, a key with the same value everywhere becomes one shared item that every file refers to. Rotating it is then one change. ``` lk import --scan ~/Projects --share-identical --dry-run ``` Importing ### Move between environments In this build Values, settings and history move together, and the references in the files they came from are updated. ``` lk mv OPENAI_API_KEY --to shop/development ``` Moving items ### History and restore In this build The last 10 values of each item, and deleted items for 30 days. History lists when and why, never values; Forget History deletes old values for good. ``` lk history shop/development/STRIPE_KEY lk restore shop/development/STRIPE_KEY --version 1 ``` History ### Find duplicates and combine them In this build One approval compares values inside Latchkey and says what to do: give production its own key, or combine the rest into one shared item. Files follow, and the originals go to Recently Deleted. ``` lk duplicates lk combine shop/development/STRIPE_KEY blog/development/STRIPE_KEY --into STRIPE_KEY ``` Duplicates ### Catch plain values before a commit In this build lk scan finds env files that still hold a stored value or something that looks secret, and prints file, line and item, never the value. The pre-commit hook refuses those commits. ``` lk scan ~/Projects lk scan --install-hook ``` Scanning Environments ## References in your files. Values in Keychain. Each environment has a record of its variables: each points at an item or holds a plain setting like PORT=3000. Records sync with your items, so a checkout anywhere can get its env file back. ### Import, then rewrite The dry run shows where each value goes and sends nothing. One approval saves them, and --rewrite puts a latchkey:// reference where each value was. Comments, order and file permissions are kept. ### Import one file or every project In this build The project comes from the repository's folder, the environment from the file name. Each line is classed as a secret, a setting, a public value or an existing reference: settings like PORT stay in the file, public values are saved plain, and anything unclear is a secret. ``` lk import --scan ~/Projects --agent-safe-pattern 'NEXT_PUBLIC_*' --dry-run ``` Importing ### Run without a file In this build --env loads the environment's record, which suits a fresh worktree with no .env. Key files arrive as a temporary path only you can read. ``` lk run --env shop/development -- npm test lk run --file ASC_KEY_PATH=shop/production/ASC_P8 -- fastlane beta ``` Running commands ### Export an env file In this build Writes the environment's file from its record, or --merges into the one you have, keeping comments, order and other variables. --values --clipboard copies an env block for a dashboard; it asks every time and clears after 60 seconds. ``` lk export shop/development --out .env.local --merge ``` Export ### Recognize a checkout In this build A project is linked to its Git remotes, so a clone under any folder name knows which project it is. A match only names the project; it never releases a value or widens a grant. ``` lk project link shop lk project ``` Projects Devices ## The environment travels with the project. The credential stays in your vault. Values, versions, environment records and project links are keychain items in Latchkey's own access group. iCloud Keychain carries them, end to end encrypted, to every Mac signed in to your Apple Account that has Latchkey installed. ### Clone, export, run On the next Mac the environment record is already there: lk project recognizes the clone and lk export writes its env file. Grants stay on the Mac where you made them. Second-Mac test pending ### Signed app access In this build Only the signed Latchkey app can read its keychain group. The lk tool never touches the keychain; it checks the app's signature before sending anything. Storage and sync ### Use it from another Mac over SSH In this build Forward the app's socket. Each read without the No Approval setting asks you on your own Mac; local grants don't apply over the connection. Direct download only, for now. ``` export LATCHKEY_SOCKET=/tmp/latchkey-$USER.sock ``` From another Mac over SSH ### Locks like Passwords In this build The window locks when Latchkey opens, after 5 minutes in the background and when the Mac sleeps; Touch ID unlocks it. Approvals for commands and agents still work while it's locked. App lock ### Intel Macs Pending The app is built for Apple silicon and Intel. The release hasn't been tried on an Intel Mac yet. Install ### Updates itself In this build The direct download checks for updates with Sparkle, or install and upgrade with Homebrew. It sends no system profile; the Mac App Store version updates through the store. ``` brew install --cask latchkey ``` Installing Agents and tools ## Grant access for the task. Revoke it when the task is done. Agents run commands through lk run. You decide what reaches those commands: agent-safe items, grants for a folder and a time, or an approval each time. ### Ask, allow, and ask again when it matters The panel shows the agent, the programs it runs through, the folder and the command, all from macOS, with Touch ID right in it: touch the sensor from whatever app you're in. Several requests from the same agent share one panel and one touch. A folder grant until the agent quits covers its next runs; a production item isn't covered, so it asks. ### Grants with limits In this build For a folder (and its repository's worktrees), for any length of time, until the agent quits, until you revoke it, for one command, or for one request. Kept where only Latchkey can change them. ``` lk grant 'shop/development/*' --session --for 4h lk grant 'shop/development/*' --command "npm test" --for 2h ``` Grants ### Check before a slow run In this build What a run would get without asking, what would ask you, and what's missing. Asks nothing, releases nothing. ``` lk check --env shop/development ``` lk check ### MCP server In this build Status, list, check, run, project, export references and request a grant, for clients without a shell. There's no secret-read tool; grants it asks for cover only its own folder, end when the agent quits, and never include production. ``` claude mcp add latchkey -- ~/.local/bin/latchkey mcp ``` Latchkey's MCP server ### Skill and plugin Pending The Latchkey skill tells an agent to run through lk run, never print values, and stop on 77 or 66. It works from a local checkout. The repository is public, so the marketplace install should work, though it hasn't been tried end to end yet. ``` /plugin marketplace add /path/to/latchkey ``` Skills and plugins ### Masked output In this build A value of a secret kind, 6 characters or longer, that the command prints becomes , even split across chunks. Transformed values aren't caught. Where protection ends Integrations ## From the dashboard where a key is made to the platform that runs it. Save a new key from the page that shows it, push values to deployment platforms with their own tools, and keep some keys out of the command entirely. ### Capture credentials when they're issued When a provider shows you a new key, Latchkey for Safari can recognize it and offer to save it: a Save to Latchkey button sits on the box that holds it. You choose what to save, where it goes and its name; approve, and the panel gives you the reference to use. Spotting happens in the page and nothing leaves it until you press Save. Detection depends on page permissions and supported patterns. What the extension can and can't reach ### Deployment platforms In this build Link an environment to Vercel, GitHub Actions, Railway or Fly, see names missing on either side, and push with each service's own tool. A service on your own Linux server can take its credentials over ssh, one file each. Every push asks; production needs a second confirmation. Pushes run in the app. ``` lk remote link shop/production fly app=shop-api lk remote status shop/production lk push shop/production --dry-run ``` Remote locations ### Fill a field from Latchkey In this build In a field that takes a key, a badge offers the items that may be filled on that site: the item's service and the deployment platforms, or the sites you choose. Touch ID every time. ``` lk update shop/production/PAYMENTS_KEY --fill-sites vercel.com ``` lk update ### Key proxy In this build OpenAI and Anthropic keys stay in lk run; the command gets a placeholder and a local base URL, and the real key goes only to the provider's host. It serves only the command and what it started, and can limit models and requests. ``` lk run --proxy --proxy-models gpt-5 --proxy-requests 50 --env shop/development -- npm test ``` --proxy ### Short-lived AWS credentials In this build STS credentials that expire after 15 minutes by default, while the long-lived key stays in Latchkey. MFA isn't supported yet. ``` lk run --aws-role arn:aws:iam::123456789012:role/dev -- terraform plan ``` AWS ### Other MCP servers In this build An MCP server started as a command can get its keys through Latchkey: wrap the command and keep references in its environment. ``` "command": "latchkey", "args": ["run", "--no-masking", "--", "npx", "-y", "some-mcp-server"] ``` Other MCP servers Visibility ## Know what read what, and prove the record wasn't edited. Every read, change, grant, move, import and push is logged with the program chain and folder, never a value. Each entry is chained to the last, so an edit or deletion shows. ### History, the log and its check lk history lists earlier values by when, why and who. lk log --verify checks the access log's chain and names the first line that isn't as Latchkey wrote it. ### After an agent session In this build Every key released to programs an agent started, from the access log, then a guided rotation that ends the grants covering them. ``` lk touched --since 4h --by claude lk rotate --touched --since 4h --by claude --open ``` Rotating ### Activity and the menu bar In this build Every request in the app's Activity, with what asked and from where; the menu bar panel shows the latest and searches your items. The same log is in the terminal. ``` lk log --limit 20 ``` The app ### Expiry and provider-side usage Pending Latchkey records what it released, not what a service saw. Expiry dates, validity checks and provider-side usage aren't tracked yet; until they are, a note on the item can carry the date. ``` lk update shop/production/STRIPE_KEY --note "expires March 2027" ``` Where protection ends Latchkey Pro ## Everything above is free. Pro adds four sets of tools. Pro is planned as a one-time in-app purchase in the Mac App Store, $79 with updates included. None of it is sold before it exists, and none of what's above is planned to move behind it, duplicates, scanning, rotation and pushing to services included. ### Agent controls Planned Secret requests: an agent asks for a missing key, you paste it in the app, and the agent gets back only the reference. And a hook that stops commands like cat .env and printenv. ### Recovery and migration Planned Importers for 1Password and Bitwarden through their command-line tools, and for the Passwords app's export, plus an encrypted backup with a matching restore. ### Rotation and lifecycle Planned Last-used dates from the log, an expiry date per item with reminders, a list of keys nothing has read in 90 days, and leak alerts from GitHub secret scanning. ### Provider integrations Planned Each key's origin: the service that issued it, the console where it's managed, who made it and when it was last rotated. Compare free and Pro ## Stop being the credential courier. Keep your projects, credentials and coding agents working together, with access you can inspect and control. Latchkey is free to download and use, and the core is meant to stay free. Pro will add more for a one-time price in the Mac App Store. Download freeSee what Pro adds --- Page: Audit which programs read your secrets · Latchkey URL: https://latchkey.snackstud.io/guides/audit-secret-access.html Guide · Audit # See which programs read your secrets A secret sitting in a file can be read by anything that can open the file, and nothing records it. When a key leaks, you want to know who read it. By Zach ShallbetterPublished 14 November 2026Needs the command-line tool In shortOpen Activity in the app or run lk log to see each read with the program chain, folder and command. Run lk log --verify to check that no entry was changed, removed or added. ## Why plain files can't answer this A .env file records nothing about who opened it. A leaked key could have come from your editor, a test run, a script, or an agent working in the folder. Without a record you rotate everything and guess. With Latchkey, values are read through the app, and the app logs each read, change, grant, move, import and push. The log holds the program chain and the folder. It does not hold values. ## Read the record ### Look in Activity In the app, Activity has search, and filters by event and project, grouped by day. An entry's detail shows the action, the items, the decision, who asked and through which programs, the folder and the command. ### Read the log from the terminal The same entries are available from the command line. --limit takes 0 through 1000. Terminal ``` lk log --limit 20 ``` lk log prints one readable line per entry. The file behind it, ~/Library/Application Support/Latchkey/access.jsonl, holds one JSON object per line. The fields to read are op (what happened), names (which items), decision (allowed or approved, with why; or denied or refused), chain (the calling program's parent processes, nearest first), cwd and command. This one is an example: Example entry ``` {"chain":["zsh","claude","Terminal"],"command":"latchkey run -- npm test","cwd":"/Users/you/Projects/shop","decision":"allowed (grant k3v9q2)","names":["shop/development/DATABASE_URL"],"op":"get","time":"2026-11-10T20:14:03Z"} ``` Real entries also carry prev and mac, the hash chain that --verify checks. ### List what one program touched To ask what was released to programs started under a name, such as an agent, use touched. It reads the access log on this Mac, and counts reads that were allowed or approved. Terminal ``` lk touched --since 24h --by claude ``` ### Check the log wasn't edited Each entry carries a keyed hash of itself and the entry before it. The key lives in your keychain, where only Latchkey can read it. Verifying checks the whole chain. Terminal ``` lk log --verify ``` When every entry is as Latchkey wrote it, it prints intact: N signed entries and exits 0. Otherwise it exits 1 and names the first line that isn't, with the reason. It finds an entry that was changed, removed or added, and a log cut short. ### Check an item's earlier values For one item, history lists earlier values by when, why (changed, deleted or restored) and by whom. It never prints the values. Latchkey keeps the last 10 earlier values of each item. Terminal ``` lk history shop/development/STRIPE_KEY ``` ## What this doesn't do - The log can't stop a program running as you from deleting the file. It can only show that it happened. - It records what Latchkey released, not what a service saw. A command that has a value can do what it likes with it. - The caller chain is informative, not proof. The caller itself is checked by signature, but its parents are named by their files, and file names can be faked. Judge an entry by its folder and command too. - Command lines in the log have likely secrets replaced with . That is a heuristic, not a guarantee, so keep secret values out of command arguments. More detail is in the log, history and Security. ## Related Rotate the keys an AI agent touchedList what an agent was given, then replace each key in one pass.Give coding agents API keys without handing them overApprovals, grants, and keys an agent can use but never read. --- Page: Give coding agents API keys without handing them over · Latchkey URL: https://latchkey.snackstud.io/guides/coding-agents-and-api-keys.html Guide · Coding agents # Give coding agents API keys without handing them over An agent that runs your tests needs the keys your tests use. It doesn't need to see them, keep them, or have them pasted into a chat window. By Zach ShallbetterPublished 14 November 2026Needs the command-line tool In shortKeep latchkey:// references in your env files and tell the agent to run commands through latchkey run. Each read asks you with Touch ID, showing the agent, folder and command, unless a grant you made covers it. For OpenAI and Anthropic keys, --proxy lets the command call the API without ever holding the key. ## The usual shortcuts Pasting a key into the conversation puts it in a transcript. Leaving it in .env lets the agent read the file, and so print, log or commit it. Exporting it in your shell hands it to everything that shell starts, for as long as it runs. ## Set it up ### Put references in the env files Import the files so they hold latchkey:// references rather than values. ### Tell the agent how to run things Add this to CLAUDE.md, AGENTS.md or your agent's instructions: Agent instructions ``` Secrets are in Latchkey. Env files hold latchkey:// references, not values. Run anything that needs secrets as `latchkey run --env-file .env.local -- `. Never run `latchkey get`, never print the environment, and never read or write values in .env files. If latchkey exits with 77 (refused) or 66 (missing), stop and ask; don't retry. ``` ### Approve when it asks When the agent runs latchkey run, the approval panel names the agent, the programs it runs through, the folder and the full command. Choose to allow once, allow from that folder for a while, or Deny, then touch the sensor: Touch ID listens right in the panel, from whatever app you're in. Several requests the agent makes in a row share one panel, so one touch answers them all, and each can be denied on its own. A refused run exits with 77 and prints the exact latchkey grant command that would allow it. ### Grant before you step away Terminal ``` lk grant 'shop/development/*' --session --for 4h lk grant 'shop/development/*' --command "npm test" --for 2h ``` A session grant ends when the agent quits; a command grant covers only that command. Every read under a grant is listed in Activity, and you can revoke it early. ## Keys the agent can use but never read Terminal ``` lk run --proxy --env shop/development -- npm test ``` With --proxy, the command gets a placeholder and a local address, and the real OpenAI or Anthropic key is added only to requests bound for that provider. --proxy-models and --proxy-requests limit which models it may name and how many calls it may make. ## After the session Terminal ``` lk touched --since 4h --by claude lk rotate --touched --since 4h --by claude --open ``` See every key released to programs the agent started, then replace the ones you'd rather it no longer knew. Rotation ends the grants that covered them. ## What this doesn't do Approvals and grants decide what reaches a command. They can't control what the command does with a value once it has it. Keep grants narrow and short, and deny requests you don't recognize. ## Related Hide your OpenAI or Anthropic key from an AI agentLet a command call OpenAI or Anthropic without holding the key.Rotate the keys an AI agent touchedList what an agent was given, then replace each key in one pass. --- Page: Find the same API key in many projects · Latchkey URL: https://latchkey.snackstud.io/guides/duplicate-api-keys.html Guide · Duplicates # Find the same API key in many projects Over time one key gets pasted into several projects, and the production key often ends up in a development file too. Latchkey can tell you where the same value is stored twice. By Zach ShallbetterPublished 14 November 2026Needs the command-line tool In shortRun lk duplicates. It compares values inside Latchkey, groups the items that hold the same one, and prints what to do about each group, with the command to run where one applies: give production its own key, or combine the rest with lk combine. ## Why it matters Copies pile up. You import a second project and reuse the key. When production shares a key with development, every place that holds the development copy holds the production key too, and rotating it means finding every copy. Latchkey stores each key as an item, so it can compare them. The comparison happens inside the app. You are never shown a value. ## Find and fix them ### Run the check Terminal ``` lk duplicates ``` It asks for approval every time, and the approval says it is comparing values. Grants and agent-safe settings do not stand in, and agents cannot ask. Plain values and values shorter than 8 characters are left out. The result is counted by kind at the top, then one group per shared value, each with advice and, where one applies, the command to run. The app does the same under Review › Find Duplicates…. ### Give production its own key When production shares a value with another environment, make a new key for production in the service's own dashboard. Latchkey cannot issue it for you. Then save it over the production item. The value is read from standard input or a hidden prompt, and the old one stays as a version. Terminal ``` lk set shop/production/STRIPE_KEY ``` Development keeps the old key, and production now has one of its own. ### Combine a key used across projects When the same key sits in several projects, combine the items into one shared item. The IDs here are examples. Terminal ``` lk combine shop/development/OPENAI_API_KEY,blog/development/OPENAI_API_KEY --into OPENAI_API_KEY ``` One approval does the work. Environment records point at the shared item, references are updated in the files the items were imported from, and the originals go to Recently Deleted for 30 days. If the values differ, nothing changes. The suggested name gets the first project as a prefix, such as MANAGER_DATABASE_URL, when another group suggests the same name or a shared item already has it. ### Tidy the rest The advice also covers two other cases. Several names for one value in one environment, such as PGHOST and POSTGRES_HOST, should be one item. Identifiers rather than secrets, such as IDs, hosts and public keys, should be marked as plain values. The command for each is printed with the group. ## Check the result Run lk duplicates again to see what is left. For the projects you have not imported yet, lk import --scan ~/Projects --share-identical --dry-run shows which names hold the same value in every file that has them. It needs at least two files. ## What this doesn't do - It finds what Latchkey has stored. An env file that has not been imported is not compared; the scan check covers those. - Combining reduces the copies. It does not make the key any less shared, so rotating it still affects every project that uses it. - Latchkey cannot create the new production key. Stripe, GitHub, OpenAI and most services only issue keys in their own dashboards. - combine changes nothing when the values differ, and agents cannot run it. The duplicates and combine reference has the full option list. ## Related Keep API keys out of your .env filesMove values into iCloud Keychain and leave references in the file.Block commits that contain secretsRefuse commits that add plain secrets to env files. --- Page: How to keep API keys out of .env files on a Mac · Latchkey URL: https://latchkey.snackstud.io/guides/env-files-without-secrets.html Guide · Env files # Keep API keys out of your .env files An env file that holds real keys gets copied, synced, pasted and read by every tool in the folder. Keep the names in the file and the values in your Mac's iCloud Keychain instead. By Zach ShallbetterPublished 14 November 2026Needs the command-line tool In shortRun lk import .env.local --rewrite. Each secret moves into iCloud Keychain and the file keeps a latchkey:// reference in its place. Then start the project with lk run --env-file .env.local -- npm run dev, and Latchkey fills the values in for that command only. ## Where plain values leak A .env file is ignored by Git, but nothing else ignores it. Backups and cloud-synced folders copy it, screen shares show it, it gets pasted into chat to "just get the build working", and any program you run in the project, a coding agent included, can open it. Rotating a key means finding every copy. ## Move the values into Keychain ### Install Latchkey and its command-line tool Download it free or install it with Homebrew, whose cask adds latchkey and its short name lk. With the disk image, open it once and choose Latchkey › Install Command Line Tool…. With the Mac App Store version, see the command-line tool. ### Preview the import Terminal ``` lk import .env.local --dry-run ``` The dry run prints item IDs and counts, never values. Each line is classed first: secrets are saved masked, settings such as PORT stay in the file, public values such as NEXT_PUBLIC_* are saved as plain values, and anything unclear is treated as a secret. ### Import and rewrite the file Terminal ``` lk import .env.local --rewrite ``` One Touch ID approval saves everything. Comments, order and the settings stay as they were: .env.local, after ``` STRIPE_KEY=latchkey://shop/development/STRIPE_KEY DATABASE_URL=latchkey://shop/development/DATABASE_URL PORT=3000 ``` ### Run the project the same way as before Terminal ``` lk run --env-file .env.local -- npm run dev ``` Your app still reads process.env.STRIPE_KEY; the value is filled in when the command starts and never written back to the file. ### Catch the next plain value before it's committed Terminal ``` lk scan --install-hook ``` The pre-commit hook refuses a commit that adds an env file line holding a stored value or something that looks secret. It names the file, line and item, never the value. ## Many projects at once Terminal ``` lk import --scan ~/Projects --share-identical --dry-run ``` --scan finds every env file under a folder and skips examples, backups and dependency folders. With --share-identical, a key that has the same value in several projects becomes one shared item, so rotating it is one change. ## What this doesn't do A reference in a committed file gives away a name, not a value. But once a command has a value, it's in that command's memory, and Latchkey can't control what the command does with it. Masking hides exact copies in its output, not altered ones. The security page covers where protection ends. ## Related Block commits that contain secretsRefuse commits that add plain secrets to env files.Set up a clone or worktree without .envGet a new clone or worktree running without copying .env. --- Page: fastlane and an App Store Connect key · Latchkey URL: https://latchkey.snackstud.io/guides/fastlane-app-store-connect-key.html Guide · fastlane # Use an App Store Connect key with fastlane fastlane wants the path of a .p8 file. That file ends up in the repo folder, a Downloads folder or a backup, and it can sign in as your team. By Zach ShallbetterPublished 14 November 2026Needs the command-line tool In shortSave the .p8 as a key item, then run lk run --file ASC_KEY_PATH=shop/production/ASC_P8 -- fastlane beta. The command gets the path of a temporary file only you can read, and Latchkey deletes it when the command exits. ## Why the .p8 file lingers The App Store Connect key is a .p8 file, and fastlane reads it from a path. So the file gets saved somewhere and stays there: in the project, in a shared folder, in a backup, sometimes in Git. Anyone who can read it can use the key. Replacing it means finding every copy. The tool needs a file, not a value in the environment. Latchkey stores the key as an item in iCloud Keychain and writes a file only for the length of the command. Your project folder never holds it, and neither does a backup of that folder. ## Set it up ### Save the key as a key item Use the key kind, the one meant for SSH, GPG, .p8 and .pem files. The value is read from standard input. The file name below is an example. Terminal ``` lk set shop/production/ASC_P8 --kind key < ~/Downloads/AuthKey_EXAMPLE.p8 ``` Saving asks for approval. Once the item is stored, delete the downloaded file. Key items are masked in command output, line by line, and only exact copies are hidden. ### Run fastlane with --file NAME=ID sets the variable NAME to the path of a temporary file holding the item's value. Use the name your lane reads for the key's path. Terminal ``` lk run --file ASC_KEY_PATH=shop/production/ASC_P8 -- fastlane beta ``` The file is readable only by you. Latchkey deletes it when the command exits. Temporary files for different item IDs get different paths, even if the final names match. ### Keep the setting in the project If you run the lane the same way every time, put it in an env file. NAME=latchkey-file://ID does the same as --file, and the file contains no value. .env.local ``` ASC_KEY_PATH=latchkey-file://shop/production/ASC_P8 ``` Terminal ``` lk run --env-file .env.local -- fastlane beta ``` ### Check before a slow run lk check accepts the same options. It shows whether the item would be released without asking, would ask you, or is missing, and it releases nothing. Terminal ``` lk check --file ASC_KEY_PATH=shop/production/ASC_P8 ``` ## With an agent The key item asks for approval each time unless it is agent-safe or a grant covers it. Keep a production signing key out of agent-safe and grant it narrowly if you let an agent run releases. The MCP tool latchkey_run can deliver key files too. See Give coding agents API keys safely. ## What this doesn't do - While the command runs, the file exists on disk. Malware running as you could read it in that time, and so can the command and anything it starts. - Latchkey can't control what a command does with the file. It could copy it. Masking hides exact copies of each line of the key in output, not altered ones. - Your lane still needs the other values it reads, such as the key ID and issuer ID. Those are separate items or plain settings. - The original .p8 you downloaded is a plain copy until you delete it. The key files section and the security page have more. ## Related Give coding agents API keys without handing them overApprovals, grants, and keys an agent can use but never read.Push env vars to your deploy platformsSend one environment's values to Vercel, GitHub, Railway or Fly. --- Page: Guides: development secrets on a Mac · Latchkey URL: https://latchkey.snackstud.io/guides/ Guides # Practical guides Task-sized walkthroughs, each with the exact commands and what it doesn't cover. ## Env files Keep values out of files, find duplicates, and set up new checkouts. Keep API keys out of your .env filesMove values into iCloud Keychain and leave references in the file.Block commits that contain secretsRefuse commits that add plain secrets to env files.Set up a clone or worktree without .envGet a new clone or worktree running without copying .env.Find the same API key in many projectsFind reused keys and give production its own.Merge into an existing .env fileAdd variables to a .env and keep your comments and order.Paste env vars into a dashboard, no filePaste an environment into a hosting dashboard, no file on disk. ## Coding agents Give agents what a task needs, and nothing they could keep. Give coding agents API keys without handing them overApprovals, grants, and keys an agent can use but never read.Hide your OpenAI or Anthropic key from an AI agentLet a command call OpenAI or Anthropic without holding the key.Rotate the keys an AI agent touchedList what an agent was given, then replace each key in one pass.Keep API keys out of MCP server configsStart the server through latchkey run so the config holds references. ## Deploying Get values to platforms, build tools and cloud accounts. Push env vars to your deploy platformsSend one environment's values to Vercel, GitHub, Railway or Fly.Push credentials to a Linux serverSend each credential over ssh to a root-only file your service loads.Use short-lived AWS credentials locallyGive a command AWS credentials that expire, not your long-lived key.Use an App Store Connect key with fastlaneGive fastlane a .p8 key as a temporary file that is deleted when it exits. ## Everyday use Other Macs, Safari, and a record of every read. Use your secrets on another Mac over SSHRun commands on another Mac and approve each secret read on yours.Save an API key straight from the provider's pageSave a new key from the provider's page, and fill it back in later.See which programs read your secretsSee which programs read which secrets, and check the log is intact. --- Page: Push credentials to a Linux server over SSH · Latchkey URL: https://latchkey.snackstud.io/guides/linux-server-credentials.html Guide · Deploy # Send credentials to your Linux server A service on your own Linux server needs API keys and app passwords. Pasting them into files over ssh leaves no record of what's there, and the copy on your Mac and the one on the server drift apart. By Zach ShallbetterPublished 18 November 2026Needs the command-line tool and the direct download In shortGive the server a script that stores one credential from standard input, let your account run it with sudo and no password, name each Latchkey item ADAPTER.ACCOUNT, and link the environment with lk remote link ENV ssh host=… script=…. Every lk push asks you with Touch ID, then sends each value over ssh on standard input. ## How it works The values stay in your Mac's keychain, where you can see, rotate and audit them. The server keeps its own copy, one root-only file per credential, which the service loads at start, for example with systemd's LoadCredential=. Latchkey's job is the delivery: it runs your server's script once per item, over your own ssh connection and keys, with the value on standard input, so it never appears in a command line, an environment variable or your shell history. The service never talks to Latchkey, and keeps running with its last values while your Mac is off. ## Set it up ### Give the server a credential script Latchkey runs it as sudo -n bash SCRIPT ADAPTER ACCOUNT --stdin and sends the value followed by one newline. The script must read at most 64 KiB, strip that one newline, store the value, and print stored ADAPTER.ACCOUNT when it has; anything else counts as a failure. A minimal one, with myapp as the example service: /srv/myapp/add-credential.sh ``` #!/bin/bash set -euo pipefail [[ $# -eq 3 && $3 == --stdin && ! -t 0 ]] || { echo "usage: add-credential.sh ADAPTER ACCOUNT --stdin" >&2; exit 64; } name="$1.$2" [[ $name =~ ^[A-Za-z0-9][A-Za-z0-9_-]*\.[A-Za-z0-9][A-Za-z0-9._-]*$ ]] || { echo "bad name" >&2; exit 64; } value=$(head -c 65536; printf x); value=${value%x}; value=${value%$'\n'} [[ -n $value ]] || { echo "empty value" >&2; exit 1; } dir=/etc/myapp/credentials umask 077 tmp=$(mktemp "$dir/.$name.XXXXXX") printf %s "$value" > "$tmp" && mv "$tmp" "$dir/$name" systemctl restart myapp echo "stored $name" ``` Point the service at those files, for example with a LoadCredential=NAME:/etc/myapp/credentials/NAME line for each credential in its unit, so it reads them from $CREDENTIALS_DIRECTORY. ### Let your account run it without a password A push has no terminal, so sudo can't ask for one. Allow exactly that script, and check from your Mac: /etc/sudoers.d/myapp-credentials ``` you ALL=(root) NOPASSWD: /usr/bin/bash /srv/myapp/add-credential.sh * ``` Your Mac ``` ssh myserver sudo -n -l bash /srv/myapp/add-credential.sh ``` It prints the command when the rule is in place. myserver is the host as named in your SSH config. ### Store each credential under its name Name items ADAPTER.ACCOUNT: Latchkey splits at the first dot. Both parts start with a letter or digit and use letters, digits, _ and -; the account may also contain dots. Terminal ``` lk set myapp/production/bluesky.someone.bsky.social --kind token ``` You're asked for the value without it being shown, and saving asks for Touch ID. ### Link the environment to the server Terminal ``` lk remote link myapp/production ssh host=myserver script=/srv/myapp/add-credential.sh ``` Linking asks once. The host and script may hold only characters a shell reads literally, and a link synced from another Mac is checked again before each push. ### Push, and approve with Touch ID Terminal ``` lk push myapp/production --only myapp/production/bluesky.someone.bsky.social ``` The approval panel names the server, the script and every item. A server counts as production, because its script restarts the service, so tick I mean to change production, then touch the sensor. Each credential the server confirms prints as pushed. ## Keep it current Change a value in Latchkey and push again; the script replaces the file and restarts the service. lk remote status myapp/production lists items never pushed to the server and items changed since they were. The server can't list what it holds, so that comes from Latchkey's own record of what it pushed, not from the server. ## What this doesn't do - It doesn't remove credentials from the server. Unlinking stops future pushes; deleting a file on the server is yours to do. - The server keeps plain-text copies, readable by root. Protect the server as you would any place that holds them. - Each push waits for your approval on your Mac, so a script or agent can start one but can't finish it without you. Agents have no push tool. - It's in the direct download only: the Mac App Store version can't run ssh. One value is at most 64 KiB, and empty values aren't sent. The script contract has every rule in one place, and Push env vars to your deploy platforms covers Vercel, GitHub, Railway and Fly. ## Related Push env vars to your deploy platformsSend one environment's values to Vercel, GitHub, Railway or Fly.Use your secrets on another Mac over SSHApprove on your own Mac what a command on another one asks for. --- Page: How to keep API keys out of MCP server configs · Latchkey URL: https://latchkey.snackstud.io/guides/mcp-server-api-keys.html Guide · MCP servers # Keep API keys out of MCP server configs MCP clients start servers from a JSON config, and the usual way to give a server its key is to type the key into that file. Latchkey lets the config hold a reference instead. By Zach ShallbetterPublished 14 November 2026Needs the command-line tool In shortSave the key in Latchkey, then change the server's command to latchkey run --no-masking -- … and put latchkey://NAME in its env. The client starts the server as before; Latchkey fills the key in for that process. ## Why the config is a problem A config such as .mcp.json or Claude Desktop's settings file holds every server's keys in plain text. It gets shared to set up a teammate, checked into a repository for a project's tools, or synced between Macs, and every key in it goes along. ## Wrap the server ### Save the key in Latchkey Terminal ``` lk set SOME_API_KEY --kind token ``` The value is read from a hidden prompt or standard input, so it never appears in your shell history. ### Start the server through latchkey run MCP server config ``` { "command": "latchkey", "args": ["run", "--no-masking", "--", "npx", "-y", "some-mcp-server"], "env": { "SOME_API_KEY": "latchkey://SOME_API_KEY" } } ``` --no-masking matters here: MCP speaks over standard output, which must pass through untouched. ### Decide how it may read the key The server is started by your agent, so its reads come from the agent's process chain. Either mark the item agent-safe, or grant it for the time you'll be working; otherwise each start asks you. Terminal ``` lk update SOME_API_KEY --agent-safe yes ``` ## Latchkey's own MCP server Terminal ``` claude mcp add latchkey -- ~/.local/bin/latchkey mcp ``` For clients without a shell, Latchkey's server offers status, listing, checking, running commands with references filled in, and asking you for a grant. It has no tool that reads a value, and the output it returns is masked. ## What this doesn't do Only servers started as a command can be wrapped. A server reached over HTTP with a header key can't get it this way. And like any command, a wrapped server holds the key in memory once it starts. ## Related Give coding agents API keys without handing them overApprovals, grants, and keys an agent can use but never read.Hide your OpenAI or Anthropic key from an AI agentLet a command call OpenAI or Anthropic without holding the key. --- Page: Update a .env file without overwriting it · Latchkey URL: https://latchkey.snackstud.io/guides/merge-into-an-existing-env-file.html Guide · Merge # Merge into an existing .env file You have a .env with your own comments and settings, and you want to add the project's variables to it. Writing a fresh file would throw all of that away. By Zach ShallbetterPublished 14 November 2026Needs the command-line tool In shortRun lk export shop/development --out .env.local --merge. Latchkey lists the names it will add and update, asks to go ahead, and leaves every other byte of the file as it is. --replace rewrites the whole file instead. ## Why a plain export is careful An env file collects things over time: notes to yourself, a variable you added for one experiment, blank lines that group sections. A tool that regenerates the file removes all of it. So lk export does not overwrite an existing file. It leaves the file alone and names the variables that would change. The examples use an example project called shop. ## Merge the variables ### See what would change Terminal ``` lk export shop/development --out .env.local ``` With the file already there and no flag, nothing is written. Latchkey names the variables that would change, so you can decide before anything moves. ### Merge Terminal ``` lk export shop/development --out .env.local --merge ``` It updates the variables the environment's record has, appends the ones the file is missing, and lists the names it will add and update. Then it asks to go ahead. Given this file: .env.local, before ``` # Stripe, test mode STRIPE_KEY=example-only # my own notes DEBUG_SQL=1 ``` the result keeps the comments, the blank line, the order and DEBUG_SQL: .env.local, after ``` # Stripe, test mode STRIPE_KEY=latchkey://shop/development/STRIPE_KEY # my own notes DEBUG_SQL=1 DATABASE_URL=latchkey://shop/development/DATABASE_URL ``` A variable that already holds the right value is left as written. An updated line keeps its indentation and any export prefix, but loses an inline comment. Line endings and a last line without a newline are kept. If there is nothing to change, nothing is written. ### Skip the question in a script Terminal ``` lk export shop/development --out .env.local --merge --yes ``` --yes skips the confirmation. Without a terminal it is required. ### Or replace the file Terminal ``` lk export shop/development --out .env.local --replace ``` --replace rewrites the whole file and loses its comments and other variables. Use it when you want the file to match the record exactly. ## In the app Choose Edit › Export Environment… on an item, or right-click a project and choose Export Environment. Pick references or values and a file. If the file exists, the sheet offers Merge, which lists the names it adds and updates before you press it, or Replace the file. It runs the same checks as the command. ## Merging values With --values the file gets real values, in plain text. That asks for approval every time, naming the file, and refuses a file inside a Git checkout unless it is ignored and untracked. A variable already in the file is listed as an update before its value is known, and a merged file becomes readable only by you. Paste env vars into a dashboard is the option that avoids a file. ## What this doesn't do - The file must be UTF-8 KEY=VALUE lines. - It never removes a variable. Ones Latchkey does not manage stay, including ones you no longer want. - If the file changes while the question waits, the merge is refused. Run it again. - A symbolic link, or anything but a regular file, at the destination is refused. - A file that does not exist yet is created, as without --merge. The export reference lists every flag. For new clones, see Set up a clone or worktree without .env. ## Related Set up a clone or worktree without .envGet a new clone or worktree running without copying .env.Paste env vars into a dashboard, no filePaste an environment into a hosting dashboard, no file on disk. --- Page: Copy env vars to a dashboard without a file · Latchkey URL: https://latchkey.snackstud.io/guides/paste-env-into-a-dashboard.html Guide · Dashboards # Paste env vars into a dashboard, no file Hosting dashboards let you paste a whole env block. The usual route is to save the values to a file, open it, copy it and forget to delete it. You can skip the file. By Zach ShallbetterPublished 14 November 2026Needs the command-line tool In shortRun lk export shop/production --values --clipboard. Approve it, paste into the dashboard, and the copy clears itself after 60 seconds. In the app, use Copy Environment as .env…. No file is written. ## Why a file is the wrong middle step A plain-text .env.production holds every value in the open. It sits in your folder, in backups and in cloud-synced directories until you remember to delete it. The dashboard only needs the text once. The examples use an example project called shop with a production environment. ## Copy and paste ### Copy the environment Terminal ``` lk export shop/production --values --clipboard ``` Latchkey builds the env block from the environment's record: its stored values and its plain settings. It asks for approval every time, naming the environment and saying the values go to the clipboard. No grant, agent-safe setting or earlier approval stands in for that. ### Paste it into the dashboard The block has no header comment, so it pastes as a clean list of NAME=value lines. Use it in any dashboard that takes a pasted env block, such as Vercel, Railway, Netlify or Render. ### Let it clear The copy stays on this Mac. It does not travel by Universal Clipboard. It is marked concealed and transient so clipboard managers skip it, and it is cleared after 60 seconds if nothing else was copied in the meantime. A detached latchkey clipboard-clear does the clearing, so the command can exit straight away. If you copy something else first, Latchkey leaves your new copy alone. ## The same thing in the app Open an item in the environment, then choose Edit › Copy Environment as .env…. The approval names the environment, the clipboard and when it clears. The clear time is 60 seconds unless you changed it in Settings › Privacy & Approval, where you can pick 15, 30, 60 or 120 seconds. ## When you want a file or a push instead If you do need a file, --values --out FILE writes one readable only by you. Inside a Git checkout the file must be ignored and untracked, or nothing is asked or written. A file in a folder that syncs to iCloud Drive, Dropbox, Google Drive or OneDrive gets a warning, because the values would leave the Mac. Terminal ``` lk export shop/production --values --out .env.production.local ``` If the environment is linked to Vercel, GitHub, Railway or Fly, lk push shop/production sends the values directly. It asks every time, and production needs its own confirmation in the app. See Push to deployment platforms. ## What this doesn't do - A copy cannot be traced afterwards. The access log records "copied to the clipboard", never the values or where they went. - Once pasted, the values live in the dashboard, outside Latchkey. - Agents, Latchkey for Safari and requests forwarded over SSH cannot copy, (over SSH the clipboard would be on the other computer). - Unconfirmed variables are noted on standard error; a reference to a missing item stops the copy. The security page describes where protection ends, and the export reference lists every flag. ## Related Merge into an existing .env fileAdd variables to a .env and keep your comments and order.Keep API keys out of your .env filesMove values into iCloud Keychain and leave references in the file. --- Page: Stop committing secrets in env files · Latchkey URL: https://latchkey.snackstud.io/guides/pre-commit-secret-check.html Guide · Pre-commit # Block commits that contain secrets One pasted key in a staged env file is enough. A pre-commit check looks at what you are about to commit and stops it before it reaches your history. By Zach ShallbetterPublished 14 November 2026Needs the command-line tool In shortRun lk scan --install-hook once in the repository. From then on, git commit runs lk scan --staged and refuses the commit if an added env file line holds a stored value or something that looks secret. The output names the file and line, never the value. ## Why secrets get committed Git keeps out an env file only when your ignore rules name it. A new file name, such as .env.staging, or a file added with git add -f goes straight in. Once a key is in history, deleting the line later does not remove it from earlier commits. A check at commit time is the cheapest place to catch this. It runs on your Mac, before anything is pushed. ## Set up the check ### Scan the folder you are in Run the scan once by hand to see what it reports. Terminal ``` lk scan ``` It looks for env files under the current folder: .env, .env.* and *.env. It skips examples, templates, backups, and anything in node_modules, build or .git folders. Each finding is printed as FILE:LINE NAME followed by the reason, never a value: Terminal (example) ``` .env.staging:3 STRIPE_KEY holds the value of shop/staging/STRIPE_KEY ``` There are two reasons. The value equals an item you have stored, or it looks secret: a private key, a connection string with credentials, a token with a known prefix such as sk_live_ or ghp_, or a value of 8 or more characters under a name like *_TOKEN, *_SECRET or *_API_KEY. Identifiers, hosts and latchkey:// references are not findings. ### Move what it found into Keychain Import the file and rewrite it, so the value is replaced by a reference. Terminal ``` lk import .env.staging --rewrite ``` Lines it moved are now references, so they no longer count. Keep API keys out of your .env files covers the import in full. ### Install the hook Terminal ``` lk scan --install-hook ``` This writes a pre-commit hook that runs latchkey scan --staged. It honours core.hooksPath and works in worktrees. If the repository already has a hook that is not Latchkey's, it is left alone. Add --force to replace it. ### Commit as usual --staged reads only the lines a commit would add, from the Git index, in env files that are staged. If it finds a plain value, the commit is refused and the file, line and variable name are given, plus the stored item when the value equals one. Fix the file and commit again. To skip the check for one commit, use git commit --no-verify. ## Use the same check in a script lk scan exits 1 when it finds anything, so you can call it from your own script. --json prints place, key, reason (stored or looks-secret) and items for each finding. Terminal ``` lk scan --json ``` The comparison with stored items asks for approval every time. Grants and agent-safe settings do not stand in for it, and agents cannot ask. If Latchkey can't be reached or you don't approve the comparison, values that look secret are still reported, and the exit status is 1, so the hook refuses the commit even when nothing looks secret. ## What this doesn't do - It reads env files only. A key pasted into source code, a README or a config file is not checked. - The "looks secret" test is a heuristic. A secret with an unusual shape under an innocent name can pass. - Stored values shorter than 8 characters, and items saved as plain values, are left out of the comparison with Keychain. - If neither lk nor latchkey is on the PATH, the hook says so and lets the commit through. - git commit --no-verify skips it, as it skips any hook. The CLI reference lists every option, and the security page explains where protection ends. ## Related Keep API keys out of your .env filesMove values into iCloud Keychain and leave references in the file.Find the same API key in many projectsFind reused keys and give production its own. --- Page: Hide an OpenAI or Anthropic key from an agent · Latchkey URL: https://latchkey.snackstud.io/guides/proxy-api-keys-for-agents.html Guide · Key proxy # Hide your OpenAI or Anthropic key from an AI agent Your tests call OpenAI or Anthropic, so the agent that runs them needs a working key. It doesn't need to hold the key, and what it holds it can print. By Zach ShallbetterPublished 14 November 2026Needs the command-line tool In shortRun the command as lk run --proxy --env-file .env.local -- npm test. It gets a placeholder and a local base URL instead of the key, and Latchkey adds the real key only to requests bound for the provider. Add --proxy-models and --proxy-requests to narrow what it can do. ## Why a working key means an exposed key Normally lk run puts the real value in the command's environment. That is how process.env.OPENAI_API_KEY works. It also means the command, and any agent driving it, can print the value, write it to a file or send it somewhere. Masking hides exact copies in the output, nothing more. For OpenAI and Anthropic keys there is a better arrangement. The command doesn't need the key. It needs to make API calls that carry it. So Latchkey adds the key to those calls outside the command. ## Run the command through the proxy ### Keep the key as a whole reference The variable must be exactly a latchkey:// reference to the key, in an env file or in the environment's record. If you haven't moved your keys yet, start with Keep API keys out of your .env files. .env.local ``` OPENAI_API_KEY=latchkey://shop/development/OPENAI_API_KEY ``` ### Add --proxy Terminal ``` lk run --proxy --env-file .env.local -- npm test ``` The command gets a random placeholder in OPENAI_API_KEY, and OPENAI_BASE_URL points at a port on this Mac that lk run listens on. The same applies to ANTHROPIC_API_KEY and ANTHROPIC_BASE_URL. Requests that carry the placeholder go to api.openai.com or api.anthropic.com with the real key in its place. Anything else is refused. Programs that use the OpenAI or Anthropic SDKs, or read those base URL variables, work without changes. ### Narrow what the command may do The proxy lets the command use the key. These two options limit how. Terminal ``` lk run --proxy --proxy-models gpt-4o-mini --proxy-requests 100 --env-file .env.local -- npm test ``` --proxy-models A,B forwards only requests whose JSON body names a listed model. A request with no body, a compressed or malformed body, or a call such as GET /v1/models is refused. --proxy-requests N refuses requests after N have been forwarded, across both providers. When either is set, lk run prints latchkey: proxy limits enforced: ... on standard error, so you can see it took effect. Both need --proxy. ### Use it from an agent that has no shell The MCP tool latchkey_run takes the same settings as fields: proxy: true, proxy_models as an array of model names, and proxy_requests as a number. Both limits need proxy: true. The MCP guide covers adding the server. ## Who can use the proxy Only the command and the processes it starts. A request from any other program gets a 403, even from one that read the placeholder out of the environment, and the proxy stops when the command exits. A process that detaches from the command and is adopted by launchd is refused too. The placeholder is new for each run. ## What this doesn't do - The command and everything it starts can still use the key within your limits. It can send any prompt or file to the provider. Without --proxy-models it isn't restricted to certain paths or methods. - Spend is capped by --proxy-requests only, not by tokens or money. - The placeholder can show up in output or logs. It is useless outside the command's process tree, but it isn't concealed. - Proxy mode refuses to start if a supported key isn't a whole reference, if its base URL is already set, or if the key would also reach the command through another variable or key file. At least one supported key reference is required. - Other credentials are delivered normally. A database URL in the same run is not protected by this proxy. - A program running as you that can attach a debugger to the command or read its memory gets whatever the command has. See the CLI reference and the security page for the details. ## Related Give coding agents API keys without handing them overApprovals, grants, and keys an agent can use but never read.Keep API keys out of MCP server configsStart the server through latchkey run so the config holds references. --- Page: Push env vars to Vercel, GitHub and more · Latchkey URL: https://latchkey.snackstud.io/guides/push-to-deployment-platforms.html Guide · Deploy # Push env vars to your deploy platforms Your keys live in one place on your Mac and in a dashboard for each service that runs your code. Every change means pasting the same value again, and nobody remembers which copy is stale. By Zach ShallbetterPublished 14 November 2026Needs the command-line tool In shortLink an environment once with lk remote link, check it with lk remote status, and send it with lk push. Every push asks you to approve it, and nothing is deployed: new values apply on the service's next deploy. ## Why the copies drift A deployed app can't read your keychain, so each platform keeps its own copy of every value. Vercel has one, GitHub Actions has another, Railway and Fly have more. You change a key on your Mac, paste it into one dashboard, and forget the other two. Weeks later a build fails and nothing says which copy is old. Latchkey can hold the list of places an environment goes. It then compares names and sends values from one place. ## Push an environment The examples use a project called shop with a production environment. Install and sign in to the tool for each service you use first: vercel login, gh auth login, railway login or flyctl auth login. By default Latchkey runs those tools as you and stores no service tokens. ### Link the environment Each link names a service and the target on it. Linking asks for approval. A link covers the whole environment, including items you add later. Terminal ``` lk remote link shop/vercel.preview vercel project=shop environment=preview lk remote link shop/production github repo=me/shop environment=production lk remote link shop/production fly app=shop-api ``` In the app, open an item's Edit menu, choose Remote Locations…, then Add a Location…. The sheet asks for the service's details and says whether its command-line tool is installed. Add Location turns on once the details are complete. It never asks for a service token. ### Check what differs Status shows names missing on each side, and items whose value changed since they were last pushed. It compares names and doesn't use values. Terminal ``` lk remote status shop/production ``` ### Rehearse, then push Use --dry-run for a first look before a real push. Then run the push. You can limit it to one link with --to or to chosen items with --only. Terminal ``` lk push shop/production --dry-run lk push shop/production lk push shop/production --to LINK_ID --only shop/production/DATABASE_URL ``` Every push asks, every time, and no grant covers one. A production target also needs I mean to change production ticked in the approval panel. The Latchkey app does the pushing, so it must be running; lk push asks it. With a command-line tool, values reach the tool on standard input, never as arguments. Find a link's ID for --to with lk remote list shop/production. ### See what changed since the last push After a push, Latchkey records when each item went to each link. An item changed since then gets an orange badge in the list and "Changed since last push" in its detail. Review has a Changes filter that lists those items, and also items not pushed yet, with a Push… action. ## Push through an API instead If you'd rather not depend on the command-line tools, keep the service's access token as an ordinary Latchkey item and name it in the link. Use a token limited to what you push. Terminal ``` lk set VERCEL_TOKEN --kind token lk remote link shop/vercel.preview vercel project=shop environment=preview token=VERCEL_TOKEN ``` The Mac App Store version can only push this way, and it can't push to GitHub. The CLI reference lists every key each service takes. ## A service on a Linux server A service on your own Linux server can read its credentials from files, for example a systemd unit with LoadCredential=. Give the server a script that stores one credential from standard input, and link the environment to it over ssh. Name each item ADAPTER.ACCOUNT: Terminal ``` lk set distribution/production/bluesky.someone.bsky.social --kind token lk remote link distribution/production ssh host=myserver script=/srv/app/add-credential.sh lk push distribution/production ``` Latchkey runs sudo -n bash SCRIPT ADAPTER ACCOUNT --stdin on the server once per item, with your SSH keys and the value on standard input, and counts it as pushed only when the script prints stored ADAPTER.ACCOUNT. Your account needs a sudoers rule to run that script without a password. Every push to a server counts as production, since the script restarts the service. The script contract has the details; the direct download only. ## What this doesn't do - It deploys nothing. Railway and Fly would deploy by default, so Latchkey turns that off. New values take effect on the service's next deploy, which you start. - Unlinking stops tracking and pushing. Values already at the service stay there, on a Linux server too: Latchkey can't remove a credential the script stored. - Pushing Fly secrets through flyctl sends one line per value, so multi-line values aren't supported on that route. When you push through an API token, variable names must be letters, digits and underscores, and GitHub refuses names starting with GITHUB_. - Latchkey records what it sent, not what a service later does with it. A push always waits for your approval, so a script or agent can start one but can't complete it without you. Agents have no push tool. ## Related Paste env vars into a dashboard, no filePaste an environment into a hosting dashboard, no file on disk.Rotate the keys an AI agent touchedList what an agent was given, then replace each key in one pass. --- Page: Rotate the keys an AI agent touched · Latchkey URL: https://latchkey.snackstud.io/guides/rotate-after-an-agent-session.html Guide · Rotation # Rotate the keys an AI agent touched After a long agent session you can't say for sure which keys it ran with. Latchkey keeps a log of every release, so you can list those keys and replace them instead of guessing. By Zach ShallbetterPublished 14 November 2026Needs the command-line tool In shortRun lk touched --since 4h --by claude to list the items Latchkey released to programs under claude. Then run lk rotate --touched --since 4h --by claude --open --push to replace each one, end the grants that covered it and push the new value to linked environments. ## Why you end up rotating everything An agent runs commands for you, and those commands need keys. Once a command has a value, it is in that command's memory and environment. Masking hides exact copies in the output, but it can't stop a command that prints, sends or encodes the value in another form. So after a session you can't prove which keys stayed private. The usual answer is to rotate every key in the project. That is slow, and people skip it. A better answer is to rotate only what the agent could have seen, and to have a list of that. Latchkey writes one entry to its access log for each release, with the program chain, folder and command. It never logs values. The list comes from that log. For the setup that comes before the session, see Give coding agents API keys safely. ## List the keys, then replace them ### See what was released lk touched lists the items released to commands in a time window, including through lk run. --by claude narrows it to programs running under claude, so keys you read yourself in the same hours don't show up. Use the same window you worked in. Terminal ``` lk touched --since 4h --by claude ``` Without --by you get every release in that time, to anything. If you worked under a single grant, --grant ID lists what that grant released. Add --json for scripts. ### Replace them with one command Give lk rotate the same filters and it works through the same list, one item at a time. Add --open to open the service's key page where Latchkey knows it, and --push to send the new values to the environments you linked. Terminal ``` lk rotate --touched --since 4h --by claude --open --push ``` First it ends any grant that covers these items. Then, for each item, it shows where to make the new key and asks for the new value; leave it empty to skip that item. You make the key in the service's dashboard and paste it in. The old value stays in the item's history. With --push, the new value then goes to each linked environment, such as a Vercel project. A push asks every time, and production needs its own confirmation in the app. ### Rotate one key by name You can also name items or use a pattern. This is useful when the list shows one key that matters more than the rest. Terminal ``` lk rotate shop/development/STRIPE_KEY --open --push ``` ### Check Activity Open Activity in the Latchkey app to see the same releases with more detail. An entry shows the action, the items, the decision, who asked through which programs, the folder and the command. You can filter by event and project. ## Shorten the list next time The smaller the grant, the shorter the list. A grant can end when the agent quits (--session), cover one command (--command) or last one use (--once). Keys behind --proxy never reach the command, so you can leave them out of the rotation, though they still appear in the list because lk run itself fetched them. The proxy guide covers that. ## What this doesn't do - It can't make the new key. Stripe, GitHub, OpenAI and most services only issue keys in their dashboards. Latchkey takes you to the page and saves what you paste. - touched reads Latchkey's access log for values released to commands. It says nothing about what a command did with a value. - Values copied or written with lk export --values, filled by Safari or shown from history are logged but not listed by touched; check Activity for those. - Rotation replaces the stored value and ends grants. It does not recall a value that was already released, and it does not disable the old key at the service. Do that in the service. - History keeps old values, with your approval to read them, for up to 30 days after deletion or until they are more than 10 versions old. Use Forget History when an old value shouldn't linger. The CLI reference has the full option list, and the security page says where protection ends. ## Related Give coding agents API keys without handing them overApprovals, grants, and keys an agent can use but never read.Hide your OpenAI or Anthropic key from an AI agentLet a command call OpenAI or Anthropic without holding the key. --- Page: Save an API key from Safari to Latchkey · Latchkey URL: https://latchkey.snackstud.io/guides/save-keys-from-safari.html Guide · Safari # Save an API key straight from the provider's page A provider shows you a new key once. You copy it, paste it somewhere to keep it, and hope the clipboard and that somewhere stay private. By Zach ShallbetterPublished 14 November 2026 In shortTurn on Latchkey for Safari. When a page shows a new key, press Save to Latchkey, name it, and approve. Later, the extension can fill it into a key field on the right site after you approve with Touch ID. ## Why new keys end up in the wrong places Most services only issue keys in their dashboards, and show the value once. The fast path is copy, paste into a note or a chat, then into an env file. Each stop is another copy of a secret, and some of them sync or get backed up. Latchkey for Safari recognises the key on the page and keeps the value in the page until you press Save, when it goes to the app. Spotting happens in the page. ## Save a key ### Turn the extension on Open Safari, then Settings, then Extensions, and enable Latchkey. Safari asks you to allow it on each site, or on all of them. Its toolbar button says whether it can reach Latchkey and lists what it found on the page. Use Safari's website permissions to choose which sites it may inspect. ### Make the key at the provider Go to the provider's key page and create the key. The extension knows about twenty or so providers, including Stripe, OpenAI, Anthropic, GitHub and npm. It also catches private keys, database URLs that contain a password, and long random values labelled as a secret or token. It skips masked values, examples, Stripe and PostHog public keys, and bare hashes. When the page says it won't show the key again, the save panel opens by itself, once. Otherwise a Save to Latchkey button appears on the box holding the key, for strong matches. ### Choose a place and a name The panel opens beside the key, not over it. Choose where it goes, either shared or a project's environment, and give it a name. A live or test key is matched to production or development when it can be. Press Save to Latchkey. ### Approve and copy the reference The app asks you to approve, and shows the page's site. After the save, the panel shows the latchkey:// reference, ready to copy, and a new item's note says where it came from. Saving over an existing item keeps the old value in its history. Example reference ``` STRIPE_KEY=latchkey://shop/development/STRIPE_KEY ``` ### Fill it back in later Click into a field that expects a key, token or secret, and a Latchkey badge appears in it. Pick an item from the list, approve with Touch ID, and the value goes into that field. Fill asks every time. ## If it missed the key Select the text, Control-click, and choose Save Selection to Latchkey. Less certain finds aren't marked on the page. The toolbar button shows a count, and its panel lists them with a short preview, never the value. ## What this doesn't do - Fill works only on the item's own service site, such as dashboard.stripe.com for a Stripe key, and on deployment dashboards such as Vercel, GitHub, Railway and Fly. It never fills on sites a platform hosts for customers, such as vercel.app. You can set the sites per item with Fill in Safari on; the list replaces the default. - Fill works over https only and never inside a frame. No grant or agent-safe setting replaces the approval. - Detection covers the main page, not embedded frames or shadow roots, and it depends on the permissions you gave and on supported patterns. Password fields aren't read. - The extension can't read stored values. The one exception is fill, after you approve it. See what the extension can and can't reach. To use the saved key in a project, keep references in your env files. ## Related Keep API keys out of your .env filesMove values into iCloud Keychain and leave references in the file.Find the same API key in many projectsFind reused keys and give production its own. --- Page: Use local secrets on a Mac over SSH · Latchkey URL: https://latchkey.snackstud.io/guides/secrets-over-ssh.html Guide · SSH # Use your secrets on another Mac over SSH You work on a second Mac through SSH and its commands need keys that live on your laptop. Copying a .env file across leaves a plain-text copy behind. By Zach ShallbetterPublished 14 November 2026Needs the command-line tool In shortConnect with ssh -R to forward Latchkey's socket, set LATCHKEY_SOCKET on the other Mac, and run latchkey run there. The request reaches the app on your own Mac, which asks you to approve each read of an item that needs approval. ## Why files are the wrong answer A remote shell has no Touch ID and no keychain of yours. The usual fixes are to copy the env file over, or to paste values into the session. Both leave the values in a file or in shell history on a machine you may not control as tightly as your laptop. Latchkey's command-line tool never touches the keychain. It asks the app over a Unix socket. If you forward that socket over SSH, the tool on the far Mac asks the app on your Mac, and the approval appears where you are sitting. ## Set it up Your Mac needs the Latchkey app running; the other Mac needs the latchkey tool, which is macOS only. Forwarding needs the direct-download app on your Mac: the Mac App Store version doesn't support it yet. If the other Mac has the App Store version installed, set LATCHKEY_BROKER=direct there too. $USER expands to your login name on each Mac: use the same name on both, or put a fixed name in both commands. ### Forward the socket when you connect Run this on your own Mac, with the Latchkey app running. devmac is an example host name. Your Mac ``` ssh -o StreamLocalBindUnlink=yes \ -R /tmp/latchkey-$USER.sock:"$HOME/Library/Application Support/Latchkey/broker.sock" \ devmac ``` ### Point the tool at the forwarded socket In that SSH session, on the other Mac, set LATCHKEY_SOCKET to the path you forwarded to. The other Mac ``` export LATCHKEY_SOCKET=/tmp/latchkey-$USER.sock ``` ### Run your command Use latchkey run as you would at home. Here shop/development is an example environment. The other Mac ``` latchkey run --env shop/development -- npm test ``` ### Approve on your Mac The approval panel opens on your own Mac. It says the request came over SSH and shows what the tool on the other computer says it is running, marked as unchecked. Approve with Touch ID, or deny. A request nobody answers is denied after two minutes. ## What is different from working locally - Each read asks, unless the item is set to need no approval. Your Mac sees only your ssh client, not the program on the other computer, so grants don't apply and can't be made over the connection. - latchkey status on the other Mac says it can't check the app's signature through a forwarded socket. - Copying to the clipboard is refused over SSH, because the clipboard would be on the other computer. The Agents and MCP reference has the same setup in short form, and Security explains how Latchkey identifies callers. ## What this doesn't do - It doesn't sync secrets to the other Mac. Nothing is stored there: the value goes to the command you run. Syncing items to a second Mac through iCloud Keychain is a separate feature, and its second-Mac test is still pending. - The forwarded socket on the other computer is created owner-only, using sshd's default StreamLocalBindMask. Anyone with your account there can use it while you are connected. - Your Mac can't verify the far side. The program name in the panel is only what the tool reports. Read the command, and deny what you don't recognise. - Once a command has a value, Latchkey can't control what that command does with it. ## Related Give coding agents API keys without handing them overApprovals, grants, and keys an agent can use but never read.See which programs read your secretsSee which programs read which secrets, and check the log is intact. --- Page: Temporary AWS credentials for local commands · Latchkey URL: https://latchkey.snackstud.io/guides/short-lived-aws-credentials.html Guide · AWS # Use short-lived AWS credentials locally A long-lived AWS access key in your shell or an env file works until someone deletes it. A command that only needs to run for a few minutes should get credentials that stop working on their own. By Zach ShallbetterPublished 14 November 2026Needs the command-line tool In shortRun lk run --aws-session --env shop/development -- terraform plan. Latchkey signs a request to AWS STS with your stored access key and gives the command the temporary credentials that come back, valid for 15 minutes by default. Add --aws-role ARN to assume a role instead. ## Why the long-lived key is the problem Put a long-lived access key in ~/.zshrc, a .env file or a CI log and it keeps working, for anyone who has a copy, until you rotate it. Most local commands, a Terraform plan or a deploy script, run for minutes. A credential that outlives them is more than they need. The alternative is temporary credentials from AWS STS. Latchkey requests them for you and hands them to one command, so the long-lived key can stay in iCloud Keychain. Each run gets a fresh set, so there is nothing to refresh by hand and nothing to clean up afterwards. ## Set it up ### Store the long-lived key as references The two halves of your access key are items in an environment, referenced by the names AWS tools look for. Import them from an env file, or save each one with lk set. Both variables must be latchkey:// references. .env.local ``` AWS_ACCESS_KEY_ID=latchkey://shop/development/AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY=latchkey://shop/development/AWS_SECRET_ACCESS_KEY ``` ### Ask for a session Terminal ``` lk run --aws-session --env shop/development -- terraform plan ``` Latchkey signs a request to AWS STS with the stored key. The command receives AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN and AWS_CREDENTIAL_EXPIRATION. The long-lived key never reaches it. You don't need the AWS CLI installed. ### Assume a role instead Pass --aws-role with the role's ARN to get that role's credentials. The ARN below is an example. Terminal ``` lk run --aws-role arn:aws:iam::123456789012:role/dev --env shop/development -- terraform plan ``` ### Pick how long it lasts The credentials last 15 minutes unless --aws-for says otherwise, from 15 minutes to 12 hours; a shorter time is raised to 15 minutes. A role's own maximum session duration still applies, and AWS refuses a longer request. Use the shortest time that covers the command. Terminal ``` lk run --aws-role arn:aws:iam::123456789012:role/dev --aws-for 1h --env shop/development -- terraform plan ``` ## With an agent An agent that runs your infrastructure commands is a good fit for this. If the credentials end up in its output, a file or a transcript, they stop working when the time is up. The long-lived key was never in the command, so there is nothing long-lived to rotate afterwards. Items that aren't agent-safe or covered by a grant ask you first, as with any other run. See Give coding agents API keys safely for approvals and grants. ## What this doesn't do - Short-lived is not the same as narrow. The credentials can do what the key, or the role, can do until they expire. Limit the role in AWS if the command needs less. - Without a role, the credentials come from AWS's GetSessionToken, and AWS doesn't let those call IAM operations without MFA. If the command manages IAM, assume a role with --aws-role. - MFA isn't supported yet. - Latchkey uses AWS's global STS endpoint, so it doesn't cover accounts in the China or GovCloud partitions. - Within the time window, a command that holds the credentials can still print, write or send them. Masking only hides exact copies in its output. - Latchkey doesn't change your AWS setup. The access key and the role must already exist. The CLI reference lists the options, and the security page says where protection ends. ## Related Rotate the keys an AI agent touchedList what an agent was given, then replace each key in one pass.Give coding agents API keys without handing them overApprovals, grants, and keys an agent can use but never read. --- Page: Set up a git worktree without copying .env · Latchkey URL: https://latchkey.snackstud.io/guides/worktrees-and-fresh-clones.html Guide · Worktrees # Set up a clone or worktree without .env A fresh clone or a new git worktree has no .env, because the file was never committed. Copying it from another folder spreads your keys one folder further. By Zach ShallbetterPublished 14 November 2026Needs the command-line tool In shortRun lk project in the new checkout to see which project it is, then either write an env file of references with lk export shop/development --out .env.local or skip the file and start the app with lk run --env shop/development -- npm run dev. ## Why the file is missing An env file is gitignored, so it stays in the folder where you made it. git worktree add and git clone give you the tracked files only. The usual fix is to copy the old file across, and every copy is another place a key can leak from. Latchkey keeps a record for each environment: its variables, each pointing at a stored item or holding a plain setting such as PORT=3000. The record belongs to the project, not to a folder, so a new checkout can use it. The examples below use an example project called shop. ## Set up the new checkout ### Ask which project this is Terminal ``` cd ~/Projects/_worktrees/shop/fix-checkout lk project ``` Latchkey matches the checkout to a project by its Git remotes, read from git's config and never with credentials. It shows the matching project, its environments, and a suggested export command. ### Link the checkout if nothing matches Terminal ``` lk project link shop ``` This remembers the checkout's origin as project shop and asks you first. Use --remote R to name another remote. After that, a clone in any folder resolves to shop, and an import from it names items after the project rather than the folder. ### Write an env file of references Terminal ``` lk export shop/development --out .env.local ``` The file holds latchkey:// references and plain settings, sorted by name, and no values. If the file already exists, it is left alone and the variables that would change are named. Merge into an existing .env file covers that case. .env.local, after ``` # Latchkey environment shop/development DATABASE_URL=latchkey://shop/development/DATABASE_URL PORT=3000 STRIPE_KEY=latchkey://shop/development/STRIPE_KEY ``` ### Or run without a file Terminal ``` lk run --env shop/development -- npm run dev ``` --env sets the environment's variables from its record when the command starts. Nothing is written to the folder. Without a record for that environment, it loads what the older lookup finds and says so. ## Let an agent work in the worktree If a coding agent works in the new worktree, a grant for the main repository's folder covers it. Grants cover the folder, the folders inside it and that repository's worktrees. Terminal ``` lk grant 'shop/development/*' --folder ~/Projects/shop --for 2h ``` The grant asks once, lasts two hours here; --for always makes one that lasts until you revoke it. See Give coding agents API keys safely. ## What this doesn't do - A project match only names the project. It never releases a value or widens a grant. - A match through a remote other than origin, as a fork has, is flagged and never taken as the project. - Values are still released only after approval, unless an item is agent-safe or a grant covers it. - A file written without --values holds references, not values, so it needs Latchkey to fill them in when a command starts. - If an environment has no record yet, lk env migrate builds one from what Latchkey already knows. Variables found through old file locations stay unconfirmed until you run lk env confirm. See the environments and export reference. ## Related Merge into an existing .env fileAdd variables to a .env and keep your comments and order.Give coding agents API keys without handing them overApprovals, grants, and keys an agent can use but never read. --- Page: Latchkey: free Mac secrets manager for .env files and agents URL: https://latchkey.snackstud.io/ A native Mac tool for developers # Your projects move. Your secrets don't. Development credentials live in your Mac's iCloud Keychain. Latchkey fills them in when a command starts. Download free See how it works Free · Notarized by Apple · macOS 15 or later Your app gets the variables it expects; nothing is rewritten around a new secrets API. Example data. ## From scattered .env files to a working project. Import the environment you already have. Latchkey stores the credentials and replaces their values with references. On another Mac, restore the project's environment and get back to work. The environment travels with the project; the credential stays in your vault. 1 ### References in your files. Values in Keychain. Point Latchkey at an env file. A dry run shows where each value would go and sends nothing. Then one approval saves them to iCloud Keychain under the repository's name and the environment the file name implies, and --rewrite leaves a reference where each value was. Settings such as PORT are recognised and left in the file; --skip leaves out anything else you name. Terminal ``` lk import .env.local --dry-run --skip PORT lk import .env.local --rewrite --skip PORT ``` Importing, every option 2 ### Recreate the env file in any checkout. Project environment records sync with your credentials across your Macs. A fresh checkout or worktree shouldn't mean rebuilding your environment by hand: lk project recognizes the checkout from its Git remote, and lk export writes its env file from the record, with references and plain settings, never a value, and without relying on the original machine's file paths. Environments, projects and export 3 ### Your credentials aren't tied to one Mac. Items, their history and each environment's record are keychain items in Latchkey's own access group, carried end to end encrypted by iCloud Keychain to every Mac signed in to your Apple Account with Latchkey installed. On the next Mac, clone and export, and the same environment is there. Grants stay on the Mac where you made them. Second-Mac test pending Keychain sync is Apple's; we haven't yet run this whole sequence on a second Mac for the release. How sync works, and its limits 4 ### Agents run the commands. You decide what they get. Agents can check what a task needs, run commands through Latchkey, and ask for access when a grant doesn't cover it. Set grants for a folder, a session, a command or a time limit. Review activity, and revoke the grant when the work is done. A request the grant doesn't cover, like production, asks again. Agents, skills and MCP ## Be the person at the Mac An agent's command is asking for two keys. Choose in the panel the way you would in the app: Deny prints the real refusal, Allow Once runs the tests with the values concealed, and a grant shows the next run going through, or, limited to one command, asking again. You're the person at the Mac: when the agent's command asks, choose in the panel. Everything the panel shows comes from macOS, not from the request: the program and those that started it, the folder it runs in, and its full command line. A script that talks to Latchkey directly instead of through the signed lk tool is named by its path, with a warning. The same limits can be set ahead of time with lk grant 'shop/development/*' --session --for 4h. claude in ~/Projects/shop Claude wants to use 2 itemsClaude in ~/Projects/shop shop/development/DATABASE_URL, shop/development/STRIPE_KEY Details Asked by Claude, via zsh › claude › Terminal Folder ~/Projects/shop Command lk run --env shop/development -- npm test Allow from this folder until claude quitsfor 1 hourfor 8 hoursfor 1 dayfor 7 days Only for npm test ## Every item, grant and request in one Mac window Items grouped by project and environment, which ones agents may read without asking, where each is used, every request in Activity, and the grants in effect. This window works with example data. What you chose in the panel above is already in its Activity, and a grant you made is under Grants, where Revoke stops future reads through it. Changes ask for Touch ID; revealing a value asks unless its No Approval setting permits it. The Latchkey window, with example data. With scripts on, it works: search, filter by type or environment, pick a project or service in the sidebar, and open an item. It lists: - shop: DATABASE_URL, STRIPE_KEY, PGHOST and NEXT_PUBLIC_SITE_URL for development; DATABASE_URL for preview, not pushed yet; DATABASE_URL and STRIPE_KEY for production, the key changed since its last push - blog: ADMIN_PASSWORD, SENTRY_DSN and GITHUB_TOKEN - api: the ASC_P8 key file and API_BASE_URL - Shared: OPENAI_API_KEY and ANTHROPIC_API_KEY Opening an item shows its value (hidden until Touch ID), reference, type, access, service, project, environment, note, location, history and recent activity. Review lists what may need a look. Example data; the values are made up. The menu bar icon opens a smaller panel with search and recent activity, like the one above the terminal. ### When a key changes, the reference doesn't. lk touched lists every key Latchkey released to programs an agent started. lk rotate walks through them: it ends the grants that cover them, opens each service's page for a new key, and saves what you paste, with the old value kept in history. Every file and environment that refers to the item keeps working; with --push, linked Vercel, GitHub Actions, Railway and Fly environments get the new value too. Rotating ## Keep supported API keys out of agent processes For OpenAI and Anthropic, Latchkey's local proxy keeps the upstream key out of the command while forwarding its API requests. The process can still use the provider; it never receives the original key. Try what a command could do with it: In the command's environment ``` OPENAI_API_KEY=lk-proxy-3f9c…8e4a OPENAI_BASE_URL=http://127.0.0.1:52817/v1 ``` Arriving at api.openai.com ``` POST /v1/chat/completions Authorization: Bearer lk-proxy-3f9c…8e4a ``` ``` Choose something for the command to try. ``` The command gets a placeholder and a base URL on your Mac; Latchkey adds the real key to requests bound for api.openai.com or api.anthropic.com and refuses unauthenticated ones. Other credentials are still delivered normally. For AWS, lk run --aws-session gives the command STS credentials that expire after 15 minutes, while your long-lived key stays in Latchkey. Terminal ``` lk run --proxy --env shop/development -- npm test lk run --aws-role arn:aws:iam::123456789012:role/dev -- terraform plan ``` ## Works with your terminal, coding agents, deploy platforms and Safari Terminal and CLIRun commands with values filled in, check what a run would get, and manage items, environments and history with lk. Coding agentsA skill for Claude Code, Codex, Gemini CLI and Cursor; an MCP server with no secret-read tool; approvals and scoped grants. Deployment platformsLink an environment to Vercel, GitHub Actions, Railway or Fly, see what's missing, and push with each service's own tool. Browser and providersLatchkey for Safari saves a new key from the page where you made it. The proxy covers OpenAI and Anthropic; STS covers AWS. ## What it protects, and where it stops Values live in iCloud Keychain in an access group only the signed Latchkey app can read. The lk tool checks the app's signature before sending anything, the app reads each caller's identity from the kernel, and every release, change and refusal goes in a tamper-evident log. The limits are stated as precisely as the protections. A released value is out of its handsA command you allowed has the key, and Latchkey can't control what it does with it. --proxy is the exception, for OpenAI and Anthropic: the command gets a placeholder, never the key. A reference isn't permissionIt names a secret; it doesn't grant access to it. A committed file of references gives away names, not values, and every read that isn't agent-safe or granted still asks. Anything running as you can askAny program in your Mac account can ask, not only agents. The panel names who asked and from where; keep grants narrow and short, and deny what you don't recognize. The security model, trust boundaries and limits ## Free today. Pro is planned as a one-time purchase. Everything above is free in the direct download, and will be in the Mac App Store version, with no account and no trial. Latchkey Pro adds four sets of tools on top, as a one-time in-app purchase in the Mac App Store, with updates included and no subscription. LatchkeyFree Available now, and the core is meant to stay free. - iCloud Keychain storage and latchkey:// references - Env file import and lk run - Approvals, grants and the security protections - The CLI, the MCP server and the header-injecting proxy - Exporting references and your own values - Pushing values to Vercel, Railway, Fly and GitHub Actions Download free Latchkey Pro$79 one time Planned Everything in Latchkey, plus: - Agent controls: secret requests, where an agent asks you for a missing key and gets back only the reference, and a hook that stops commands like cat .env - Recovery and migration: importers for 1Password, Bitwarden and the Passwords app, and an encrypted backup with restore - Rotation and lifecycle: last-used dates, expiry dates with reminders, and leak alerts - Provider integrations: each key's origin: the service, the console where it's managed, and when it was last rotated Request early access Pro isn't on sale yet; the price is proposed. Compare editions ## Start from what you came to do For developersLatchkey is free to download and use. Start there, and see what Latchkey Pro will add when it's ready. Download freeFree and ProGuides For teamsMove a small team's credentials out of scattered env files with a fixed-scope migration from Snack Studio, and help shape Latchkey Teams. Developer Credential MigrationLatchkey Teams For technical evaluatorsInspect how values are stored and released, where protection ends, every command, and what's built and what isn't. Security modelDeveloper docsRoadmap ## One developer, building in the open. Latchkey is designed and built by Zach Shallbetter, a systems engineer in Spokane, Washington, and published by his studio, Snack Studio. The source is on GitHub, every change is in the changelog, and questions reach the studio at latchkey@snackstud.io. ## Stop being the credential courier. Keep your projects, credentials and coding agents working together, with access you can inspect and control. Latchkey is free to download and use, and the core is meant to stay free. Pro will add more for a one-time price in the Mac App Store. Download freeSee what Pro adds - 1Download and installOpen the latest disk image and drag Latchkey to Applications, or run brew tap zachshallbetter/latchkey, brew trust zachshallbetter/latchkey and brew install --cask latchkey. - 2Add the command-line toolThe Homebrew cask adds both for you. With the disk image, open Latchkey and choose Latchkey › Install Command Line Tool… to add latchkey and lk to ~/.local/bin. They link to the tool inside the app, so they update with it. - 3Check itRun lk status. Beside how you approve, your item and grant counts and the socket, it should say storage: iCloud Keychain and that the app's signature was checked. Development previewLatest version 0.4.0 (what's new). Notarized by Apple and free. macOS 15 or later; Intel verification is pending; iCloud Keychain on for sync between Macs. Installation steps · Source · Command reference --- Page: Pricing: free today, with Latchkey Pro planned · Latchkey URL: https://latchkey.snackstud.io/pricing.html # Free to use. Pro for the work it saves. Latchkey is free to download and use: everything it does today costs nothing, and the core is meant to stay free. When it's ready, Latchkey Pro will be a one-time purchase in the Mac App Store, for working across projects, Macs and coding agents. Latchkey Teams is a separate subscription for organizations. Neither is on sale yet. Your credentials never depend on paying.Keychain storage, references, import, running commands, approvals, the security protections and exporting your own values are in every plan. Pro charges for extra tools around the core, never for access to what's yours. Free ## Latchkey $0 Available now. Free for every developer. - iCloud Keychain storage and latchkey:// references - Env file import and lk run - Approvals, grants and the security protections - The CLI, the MCP server and the key proxy - Exporting references and your own values - Pushes to Vercel, Railway, Fly and GitHub Actions A free download, notarized by Apple. Download free One-time purchase ## Latchkey Pro $79 one time In the Mac App Store. No subscription; updates included. Everything in Latchkey, plus: - Agent controls: secret requests, where an agent asks you for a missing key and gets back only the reference, and a hook that stops commands like cat .env - Recovery and migration: importers for 1Password, Bitwarden and the Passwords app, and an encrypted backup with restore - Rotation and lifecycle: last-used dates, expiry dates with reminders, and leak alerts - Provider integrations: each key's origin: the service, the console where it's managed, and when it was last rotated Not on sale yet. We'll write when Pro is in the Mac App Store. Request early access Team subscription ## Latchkey Teams $15 per user a month Billed yearly, when it's ready. Everything in Latchkey Pro, plus: - Shared organizational environments - Membership and roles - Approval workflows and central evidence - Managed team credentials In design. Teams needs substantial new engineering. Become a design partner Prices are planned, not current offers. Pro will be sold only through the Mac App Store, and no plan's features are promised by a date. ## What each plan includes The free column is what Latchkey does today. Pro and Teams rows are planned and marked as such. CapabilityFreeProTeams Keychain storage and referencesIncludedIncludedIncluded Env file import and command executionIncludedIncludedIncluded Approvals, grants and security protectionsIncludedIncludedIncluded Duplicates, scanning, rotation and pushing to servicesIncludedIncludedIncluded Exporting references and valuesIncludedIncludedIncluded Agent controlsPlanned: secret requests, a hook that stops cat .envNot includedIncludedIncluded Recovery and migrationPlanned: importers for 1Password, Bitwarden and Passwords; encrypted backupNot includedIncludedIncluded Rotation and lifecyclePlanned: last-used and expiry dates, reminders, leak alertsNot includedIncludedIncluded Provider integrationsPlanned: each key's service, console and last rotationNot includedIncludedIncluded Organization-wide credential sharingPlannedNot includedNot includedIncluded Central policy administration and evidencePlannedNot includedNot includedIncluded Team provisioning and managed accessPlannedNot includedNot includedIncluded ## Buy it once. Keep it. Latchkey runs on your Mac and has no server of its own, so Pro works like a tool you own. One purchasePro is a one-time purchase in the Mac App Store, with no subscription or renewal. Updates includedUpdates come through the Mac App Store. Restore the purchase on your other Macs with the same Apple Account. The core isn't ProStorage, references, import, running commands, approvals and export aren't part of Pro, and aren't planned to be. For teams · Snack Studio ## Start with a migration A fixed-scope engagement that inventories a small team's env files, finds what's duplicated, stale or in conflict, and moves its supported local workflows into Latchkey. From $2,500 per small team What the engagement includes The inventory starts with a dry run of names and counts, never values. Example data; the output is what Latchkey prints. ## Price, licensing and what’s next Is Latchkey free? Yes. Everything Latchkey does today is free to download and use, with no account or trial. Storage, references, import, running commands, approvals, the security protections and export aren't part of Pro. What will Pro add? Pro is for one developer working across projects, Macs and agents: agent controls, recovery and migration, rotation and lifecycle, and provider integrations. They're planned, and none is sold before it exists. Shared team environments are Latchkey Teams, a separate product. Can I buy Pro now? No. Pro isn't on sale. It will be a one-time in-app purchase in the Mac App Store version, with its features stated before anyone pays. Ask to hear when it is. Will the free download stay? That's the plan: the direct download stays free, with everything that is free in Latchkey. Pro is only in the Mac App Store version. Will my credentials ever depend on a license? No. Your values stay in your iCloud Keychain, and you can always read or export them through Latchkey's approvals, whatever plan you're on. Does Latchkey send my credentials anywhere? Not to Latchkey: there's no Latchkey server or account. Values sync through iCloud Keychain to your own Macs, and leave them only where you send them: to a command you've allowed, or to a deployment platform you push to. Is the source available? Yes. Latchkey is source-available under the Functional Source License (FSL-1.1-ALv2): free to read, change and use for anything but a competing product, with each version becoming Apache 2.0 two years after release. Read it on GitHub. When is Teams coming? When real teams have shown they'll pay for it. We're looking for two or three design partners first; nothing is built before then. Can you help my team move over? Yes. The Developer Credential Migration is a fixed-scope engagement for small teams on Macs, from $2,500. See what it includes. How do refunds and other Macs work? Apple handles both: refunds through reportaproblem.apple.com, and Pro unlocks on the Macs signed in to your Apple Account. See the terms. ## Stop being the credential courier. Keep your projects, credentials and coding agents working together, with access you can inspect and control. Latchkey is free to download and use, and the core is meant to stay free. Pro will add more for a one-time price in the Mac App Store. Download freeSee what Pro adds --- Page: Privacy policy · Latchkey URL: https://latchkey.snackstud.io/privacy.html # Privacy policy Latchkey itself collects nothing about you. There is no Latchkey server, account, telemetry, analytics or advertising. Snack Studio never receives your credentials or anything about how you use them. Effective 12 November 2026. Applies to the Latchkey app, its command-line tool, MCP server and Safari extension, and to this website. ## What stays on your Macs - Your values are kept in your keychain: iCloud Keychain, which syncs them end to end encrypted between your own Apple devices, or this Mac's login keychain. Apple can't read iCloud Keychain contents, and neither can we. - Item details, environment records, grants and the access log are kept in your keychain and in Latchkey's folder on your Mac. They never leave it except through iCloud Keychain sync or an export you ask for. - Folders and files you choose are remembered on your Mac so Latchkey can rewrite them later. Removing the permission forgets them. ## When values leave your Mac Only when you, or a command you allowed, sends them: - Commands you run with lk run receive the values you approved, and do with them what they do. - Deployment platforms you push to (Vercel, Railway, Fly, and, in the copy downloaded from this site, GitHub and your own Linux hosts over ssh) receive the values you push, either through their own command-line tools and your own sign-in to them, or, in the Mac App Store version and for any link where you choose a token item, in direct requests from the app to the service’s own API (api.vercel.com, backboard.railway.com, api.machines.dev, and api.github.com from the downloaded copy only) using the access token in the item you chose, which is sent only to that service. The Mac App Store version doesn’t push to GitHub. Their privacy policies apply. - The key proxy forwards your requests to OpenAI or Anthropic with your key, when you run a command with --proxy. - Short-lived AWS credentials are requested from AWS (sts.amazonaws.com) with your key, when you ask for them. - The Safari extension fills or saves values on the pages you choose, after your approval. - The clipboard: copied values stay on this Mac, are hidden from clipboard history apps, and are cleared after a short time. ## Updates The copy of Latchkey downloaded from this site checks https://latchkey.snackstud.io/appcast.xml for new versions. That's a standard web request with Latchkey's version number; no system profile (hardware, operating system or usage details) is sent. Turn it off in Settings with Check for updates automatically, or check by hand with Check for Updates…. The Mac App Store version is updated by the App Store. ## Purchases Latchkey Pro will be sold by Apple through the Mac App Store; it isn't on sale yet. Apple processes the payment and tells the app, on your Mac, that Pro is unlocked; we receive Apple's standard sales reports, which don't identify you. Apple's privacy policy applies to the purchase. ## Crash reports If you share crash reports and analytics with app developers in macOS settings, Apple may pass us anonymous crash reports for Latchkey. They never contain your values. ## This website The site uses no cookies, analytics or third-party requests: fonts are your system's, and every script is served from this site. The host keeps standard request logs (address, page, time) for operating the site. ## Email If you write to latchkey@snackstud.io, we keep the conversation to answer you and delete it when it's no longer needed. Never send a real secret. ## Children Latchkey is a developer tool and isn't directed at children. ## Changes and contact Changes to this policy are published on this page with a new effective date. Latchkey is made by Snack Studio. Questions: latchkey@snackstud.io. --- Page: Roadmap: what's built and what's next · Latchkey URL: https://latchkey.snackstud.io/roadmap.html Roadmap · November 2026 # What’s built, what’s next and what Latchkey won’t do Latchkey keeps secrets for one person's Macs and the agents running on them. Files hold latchkey:// references; the app holds the values and releases them when a command starts. Below is what's built and what's planned, by tier, and then what Latchkey won't do. Guiding rule: values move from the keychain straight to the process that needs them. People approve; agents get references. - BuiltCLI: run, check, import, export, scan, duplicates, environments, grants, rotate, push, log, MCP - BuiltMac app: window, import sheet, menu bar, settings, Latchkey for Safari - BuiltApproval panel, then Touch ID, Apple Watch or password; grants; a tamper-evident access log - BuiltA public, notarized release, with Homebrew and in-app updates - PendingSync tried end to end on a second Mac Only what's next up S smallM mediumL large Tier 1 ## Fix the basics Things that undercut daily use or trust today. S ### Sign the app with your team Built Gap: unsigned builds can't use iCloud Keychain, so nothing syncs, and every reinstall makes macOS ask for your login password per item. Built: with DEVELOPMENT_TEAM set in App/project.yml, scripts/install.sh signs with your team and lk status reports iCloud Keychain storage. Notarization only matters for sharing builds. - You S ### CLI starts the app when it isn't running Built Gap: if the app is closed, every latchkey command fails with “cannot reach the app”. Built: when the socket is missing, the tool launches Latchkey in the background, waits for it to answer, then carries on. - YouAgents M ### Time-limited grants Built Gap: when you step away, approval prompts time out and agents stall. Plan: grants such as “agents in ~/Projects/site may read these 4 items for 2 hours”, created from the window or from an approval. Each grant appears in Activity and can be revoked. - Agents M ### “Allow for this project” on the approval Built Gap: the system sheet can only say yes or no, with one line of context. Built: a Latchkey panel shows who is asking, from which folder and for which command, with Deny, Allow Once, and Allow from Folder for a set time, and reads Touch ID right in the panel. Several requests from the same agent share one panel and one touch. - YouAgents M ### Verify callers by code signature Gap: the caller chain is process names, which any program can fake, and callers are identified by PID, which can be reused. Built: the caller is identified by its audit token and checked by code signature as Latchkey's own tool or not. Next: check the signing team of each parent in the chain (Claude, Cursor, Terminal), which are still named by their files. - Agents Tier 1b ## Where secrets come from and where they go Know what each key is for, notice when one leaks, and get to the right place to replace it. M ### Origin and rotation details Next up Gap: an item is a name and a value. When one leaks, nothing says which service issued it or where to make a new one. Plan: record what the Passwords app records for a login, adapted to keys: the service, account or project, the console URL where it's managed, who made it and when, when it was last rotated, and which projects use it. import and the app fill these in where they can (for example from a key's prefix: sk_live_ is Stripe, ghp_ is GitHub). - YouAgents L ### Leak alerts Next up Gap: if a key is pushed to a public repo or pasted somewhere, you find out from the provider, if at all. Plan: read GitHub secret-scanning alerts for your repos through gh, scan your own repos and history locally (fingerprints only, values never leave the Mac), and match what's found against your items. A match marks the item compromised, notifies you, and shows where it was found. - You M ### Compromised: replace it in one place Built Gap: replacing a leaked key means remembering the console, the new value, and every project and service that used it. Built: lk rotate ends the grants that cover an item, opens its service's page for a new key, saves what you paste with the old value in history, and pushes to linked environments with --push. lk touched lists what an agent was given. - You M ### Projects and environments Built Gap: one flat list doesn't capture that a project has development, staging and production values. Built: IDs project/environment/NAME (latchkey://acp/production/DATABASE_URL), import placement from the repo and file name, moving items with their references, project-wide grants, and a service field filled in on import. Next: remote locations (Vercel, GitHub Actions, Fly) recorded alongside local files. - YouAgents L ### Remote machines and services Built Gap: values are needed on servers, in CI and in hosted environments, and today they're copied by hand. Built: link an environment to Vercel, GitHub Actions, Railway or Fly; names-only status; push with approval every time and an extra confirmation for production; out-of-date tracking. Also built: forward the Latchkey socket over SSH, so a command on another Mac asks you on yours, and push credentials to a script on a Linux server over ssh. Next: agents on a Linux server that ask your Mac for values, with an identity for the server and grants it can use unattended. - YouAgents M ### Version history and recovery Built Gap: a changed or deleted value was gone, and a file rewritten to references could lose its only copy. Built: the last 10 values of each item, Recently Deleted for 30 days, restore with approval, synced like the items. - You M ### Duplicates and combine Built Gap: the same key copied into many projects meant many places to rotate it, and production sharing a key with development. Built: latchkey duplicates compares values inside Latchkey with one approval and recommends what to do; latchkey combine makes them one shared item, and the files follow. - You Tier 2 ## Coding agents Where Latchkey can be clearly better than a .env file or a password manager. M ### Use a value without holding it Gap: “agent-safe” means the agent can hold the value: it can call latchkey get, and masking only catches exact copies. Plan: refuse get to agent callers, and mask base64, URL-encoded and JSON-escaped copies too. - Agents M ### MCP server Built Gap: agents learn Latchkey from instructions and shell commands. Built: latchkey mcp with tools for status, listing items, checking and running a command with references filled in, the checkout's project, writing an env file of references, and asking for a grant. No tool returns a value. - Agents M ### Secret requests Gap: to add a key, an agent has to handle the value or ask you to do it out of band. Plan: the agent asks for STRIPE_KEY for this project, a notification opens a field in the app, you paste the value, and the agent gets back only the reference. - AgentsYou S ### Agent setup kit Gap: every agent needs to be told how to use Latchkey, and nothing stops it from running cat .env. Built: the Latchkey skill and Claude Code plugin tell an agent to run through lk run, never print values, and stop on 77 or 66. Next: a hook that blocks commands like cat .env and printenv. - Agents L ### Rules beyond one switch Built Gap: agent-safe is one yes/no per item. Built: grants per folder and its worktrees, for a time, until the agent quits, for one command or one request, e.g. lk grant shop/development/DATABASE_URL --command "npm test". - AgentsYou L ### Header-injecting proxy Built Gap: any value in a process's environment can be printed or written to a file. Built: lk run --proxy gives the command a placeholder and a local base URL, and adds the real OpenAI or Anthropic key only to requests for the provider's host. Next: more providers. - Agents Tier 3 ## Day-to-day use Smaller features that remove friction. M ### Key files Built Gap: tools that want a file path (.p8, .pem, service-account JSON) can't use an environment value. Plan: GOOGLE_APPLICATION_CREDENTIALS=latchkey-file://gcp-sa writes a 0600 temporary file and deletes it when the command exits. - YouAgents M ### Project commands Gap: there's no standard way to set up a project or check it in CI. Built: latchkey check confirms what a run would get without reading values, and latchkey export writes an env file of references from the environment's record. Next: latchkey init and a shell hook. - YouAgents M ### Last used, expiry and rotation Gap: nothing says which tokens are stale, unused or about to expire. Plan: last-used dates from the log, an expiry date per item, reminders before expiry, and a list of items nothing has read in 90 days. - You M ### Items with fields Gap: AWS and database credentials come in sets that are stored as unrelated items. Plan: group items such as aws.access_key_id and aws.secret_access_key as one card with fields. - You M ### Scan for plain-text secrets Built Gap: secrets already sitting in repos and old .env files stay there. Built: latchkey scan finds env files holding a stored value or one that looks secret, naming file, line and item but never the value, and a pre-commit hook refuses those commits. - YouAgents S ### Activity alerts Gap: denied or unusual reads are only visible if you open Activity. Plan: notifications for denials and first-time callers, and filters by item, folder and outcome. - You Tier 4 ## Moving in Getting existing secrets into Latchkey, and getting them back out safely. S ### Import from Passwords Gap: tokens you've saved in the Passwords app can't be read by other apps. Plan: read a Passwords CSV export (File > Export), pick the entries that are really API tokens, import them, then delete the CSV. - You M ### Import from other managers Gap: secrets in 1Password or Bitwarden have to be copied over one by one. Plan: importers that use the op and bw command-line tools. - You M ### Encrypted backup Gap: there's no copy of your values outside the keychain, so nothing to restore from if it's lost. Plan: an export encrypted with a passphrase, and a matching restore. - You Tier 5 ## Later Larger work that builds on everything above. L ### SSH agent with Secure Enclave keys Gap: SSH keys sit on disk as files. Plan: keys that can't be exported and ask for Touch ID on each use, also usable for git commit signing. Each Mac gets its own key. - YouAgents L ### Approve from iPhone Gap: when you're away from the Mac, only the Apple Watch can approve. Plan: an iPhone companion that receives approval requests, for agents working while you're out. - YouAgents M ### Distribution Built: a notarized disk image, a Homebrew cask, and in-app updates for the download. Plan: release the Mac App Store version, where Pro is sold. Its one-time purchase and restore are built. - You M ### Test coverage Gap: there are no end-to-end tests for latchkey run or the socket server, and no UI tests. Plan: tests that run the CLI against a broker with a test approver, plus a few UI tests for the window. - You ## Limits and non-goals ### Items in the Passwords app Apple doesn't let other apps write to or read from the Passwords app. Latchkey uses the same iCloud Keychain underneath, in its own group. CSV import is the bridge. ### Passkeys as API tokens A passkey only signs logins for one website. Latchkey uses the same Touch ID check for approvals, and Secure Enclave keys for SSH. ### Teams and other platforms Latchkey is for one person's Macs. Windows and Linux are out of scope, and shared team vaults would be Latchkey Teams, a separate product. Sizes are rough. "Built" marks what's done; "Next up" marks the recommended next batch. ## Stop being the credential courier. Keep your projects, credentials and coding agents working together, with access you can inspect and control. Latchkey is free to download and use, and the core is meant to stay free. Pro will add more for a one-time price in the Mac App Store. Download freeSee what Pro adds --- Page: Security model: what's protected and where it stops · Latchkey URL: https://latchkey.snackstud.io/security.html # What Latchkey protects, and where it stops Latchkey keeps secret values out of files and transcripts, and makes you the one who decides which command gets which value. Every mechanism has a boundary, and the boundaries matter as much as the mechanisms. - Storage - Sync - Who's asking - Releasing values - Delivery paths - The log - Guarantees - Limits - Reporting A reference in a committed file names the item and nothing more. A script that asks Latchkey directly, instead of through the signed lk tool, is named by its path with a warning, and is refused unless you allow it. The scene uses example data. ## Six distinctions worth knowing - The keychain protects stored values, not released ones.Once a command has a value, it's in that command's memory and environment, and Latchkey can't control what it does with it: print it, write it to a file or send it on. Masking catches exact copies in output, not changed ones. - A reference names a secret; it doesn't grant access to it.latchkey://shop/development/STRIPE_KEY in a committed file reveals a name. Reading the item still needs it to be agent-safe, a grant covering the caller, or your approval. - A proxy hides a key without narrowing what it can do.With --proxy the command never holds the OpenAI or Anthropic key, but it can still make any call that key allows through the proxy. --proxy-models and --proxy-requests narrow that. - iCloud Keychain sync is separate from agent authorization.Items and environment records sync to your Macs. Grants don't: each is kept on the Mac where you made it. - The access log records releases, not provider-side use.It shows what Latchkey gave to which program, from where. What that program then did at the service is the service's record. - A shared credential means fewer copies of the same authority.One shared item used by five projects is one value to rotate, and still one key that all five can use. ## Storage Values live in the keychain, behind the signed app. - Values are generic-password items in the data-protection keychain, in an access group only the signed Latchkey app can use. Versions, remote links, environment records and project links are keychain items too; records and links hold item IDs, remotes and plain settings, nothing secret. A plain setting that looks secret is refused. - One process holds values. The command-line tool never touches the keychain; it asks the app over a Unix socket readable and writable only by you, and the app accepts connections only from your user account. - Before sending anything, a signed latchkey checks that the program on the socket is the Latchkey app signed by the same team. A program that took the socket while the app wasn't running gets nothing, not even a value you're saving. An unsigned development build can't check, and falls back to the login keychain on one Mac. - Synced items use the "after first unlock" protection class, so scheduled jobs can read agent-safe items while the screen is locked. ## Sync between Macs iCloud Keychain carries items; permissions stay put. Latchkey's items sync through iCloud Keychain, end to end encrypted, to each Mac signed in to your Apple Account that has Latchkey installed. There's no Latchkey server or account. That protection is Apple's: anyone who controls your Apple Account and a trusted device can reach synced items. Apple describes it in iCloud Keychain security overview and iCloud data security overview. Grants, approvals and the access log stay on each Mac. A second Mac gets your items and environment records, not the permissions you gave agents on the first. Second-Mac test pending ## Who's asking Identity comes from the kernel, not the request. - For each connection the app gets the caller's identity from the kernel, not from the request: its working folder, its command line, its parent processes, and whether it is Latchkey's own command-line tool, by code signature. - The approval panel and the log show those. Any other program talking to the socket is named by its path, with a warning. Grants are matched against the folder the caller really runs in. - The caller is checked by signature; its parents are named by their files, and file names can be faked. Judge a request by its folder and command as well. ## Releasing values Approvals, grants, and items agents may read. ### Approvals Approvals use macOS LocalAuthentication: Touch ID, a paired Apple Watch, or your account password. Every request shows Latchkey's panel with what it covers and the caller's folder, command and process chain, and Touch ID is read inside the panel; Use Password… opens the system sheet. Touch ID runs in the Secure Enclave either way, so a lookalike panel drawn by another app gets a touch that authorizes nothing. Requests from the same process tree in the same folder that arrive while the panel is up are listed in it and answered by one touch, and a request joining restarts Touch ID. Pushes, requests over SSH, from Latchkey for Safari or from a program that isn't identified are always asked on their own. Nothing unanswered is allowed: a request is denied after two minutes. Allow Once authorizes one request; approvals are never cached. A request doesn't hold Latchkey while it waits for you. When you answer, it runs again from the start and uses your answer only if it asks the same thing about values that haven't changed; otherwise it asks again. ### App lock Latchkey's window, Settings and menu bar panel lock behind Touch ID (in the lock screen or the menu bar panel itself) or your Mac password when it opens, after time in the background and when the Mac sleeps or the screen locks, and revealed values are hidden. The lock keeps the window private; it doesn't decide what's released. Requests from commands, agents and Safari still go through approval, locked or not. ### Grants A grant lets commands from one folder (and its repository's worktrees) read named items without asking, for as long as the approval says (any length of time, or until you revoke it), and can be narrowed to an agent's session, one command or one request. Grants are kept in a keychain item only Latchkey can read or change, on this Mac only. No file holds them, so no other program can write itself one. Grants an agent asks for through the MCP server cover only its own folder, end with the agent's session, and can't include production. ### Agent-safe items An item marked agent-safe is released to any program that asks, with no prompt. Use it for values that aren't really secret, such as NEXT_PUBLIC_* settings that ship to browsers anyway. ## How a command gets a value The guarantee depends on which path a value takes into the command. PathWhat the command holdsWhat it protects lk runThe value, in its environmentFiles and transcripts hold references; output that repeats an exact value of 6 characters or more is masked. --proxyA random placeholder and a base URL on 127.0.0.1The OpenAI or Anthropic key stays in the signed lk process and goes only to the provider's own host. Requests without that run's placeholder are refused; upstream redirects aren't followed. --aws-sessionSTS credentials that expire (15 minutes by default)The long-lived AWS key stays in lk run. A leaked value soon stops working. --fileThe path of a temporary fileThe file is in a new folder only you can open, readable only by you, and deleted when the command exits. export --valuesA plain-text fileAsks every time, naming the file; nothing stands in for that approval. Written readable only by you and renamed into place. Agents can't use it. ## Latchkey for Safari Sandboxed, and limited to names, saves and one fill. The extension is sandboxed and reaches the app through its own socket, which admits only Latchkey's signed extension and only to list item names, save a value (which asks like any change) and fill one item into the page you're on. Key detection runs inside the page: a value goes to the app only when you press Save. Password fields aren't read. Fill asks every time, works only on the item's fill sites (by default its service's own site and deployment platforms), over https only, never in a frame, and is logged. Otherwise it can't read a stored value. ## The access log Every read, change, grant, move, import and push is logged with the program chain and folder. Stored values aren't logged; likely secrets in command arguments are replaced with , which is heuristic, so keep values out of command arguments. Each entry carries a keyed hash (HMAC-SHA256) of itself and the one before it, with the key kept in the keychain, so lk log --verify finds an entry that was changed, removed or added, or a log cut short. It can't stop a program running as you from deleting the file, only show that it happened. ## Guarantees and limits Each mechanism, what it protects against, and what it doesn't promise. MechanismProtects againstDoesn't guarantee Keychain storageValues in plaintext files, backups and synced folders; values readable on a lost MacSafety after a value is released to a command ReferencesSecrets copied into config files and commitsPermission to read the item Approval panelReads you didn't approve; shows the caller as macOS sees itControl over what an approved command does next GrantsRepeated prompts for a folder, for a timeTelling programs apart within that folder: any program asking from there is covered MaskingExact copies of a value in a command's outputCatching values that were encoded or transformed Key proxyThe OpenAI or Anthropic key reaching the commandLimits on which calls the command makes with it; protection for other credentials STS credentialsThe long-lived AWS key reaching the commandLeast privilege, which depends on the role's policy Access logUndetected edits, removals or truncationA record of what the service saw, or protection against the file being deleted iCloud KeychainValues exposed in transit or at rest between your MacsSafety from someone with your Apple Account and a trusted device Shared itemsMany copies of the same valueSeparate authority per project ## Where protection ends Read these before you rely on Latchkey. - Anything running as you can ask. The socket is open to every process in your user account. Agent-safe items and grants are released to any program that asks from the right place, so keep them narrow and short. - A released value is out of Latchkey's hands. A command can write it to a file, send it over the network or transform it. Masking only hides exact copies. - lk get prints the value. Keep agents away from it with your agent instructions or a hook that refuses it. - The same Mac account. Malware running as you could ask for approvals until you click one, or read a temporary key file while the command runs. Latchkey raises the bar; it doesn't replace a clean machine. - History keeps old values for up to 30 days after deletion, or until there are more than 10 versions. Use Forget History when an old value shouldn't linger, and rotate leaked keys at the service either way. - An exported file is a plain copy. Delete it when you're done, and keep it out of Git. The full write-up is in the repository's docs/security.md, with the wire protocol and stored files described under References and API. ## Reporting a problem Privately, never in public. Report a vulnerability privately: by email to latchkey@snackstud.io with "Security" in the subject, or through GitHub, in the repository's Security tab › Report a vulnerability. Please don't open a public issue for it. Include the Latchkey and macOS versions, what an attacker can do and what they need first, and steps to reproduce with example values only. Never send a real secret. ## Stop being the credential courier. Keep your projects, credentials and coding agents working together, with access you can inspect and control. Latchkey is free to download and use, and the core is meant to stay free. Pro will add more for a one-time price in the Mac App Store. Download freeSee what Pro adds --- Page: Support and troubleshooting · Latchkey URL: https://latchkey.snackstud.io/support.html # Support and troubleshooting Most answers are in the docs. For anything else, write to latchkey@snackstud.io; we answer by email. ## Start here - Quickstart: install, import an env file and run a command. - The command-line tool: getting it with the Mac App Store version or the direct download. - CLI reference and Agents and MCP. - latchkey status shows whether the command-line tool reaches the app, how you approve, and where values are kept. Include its output when you write (it never shows values). ## Common problems - "cannot reach the Latchkey app" (exit 69): the tool starts Latchkey itself, so this usually means LATCHKEY_NO_LAUNCH=1 is set or the app can't start. Open Latchkey once and try again. It stays in the menu bar after you close its window, and keeps answering the tool. - A command still sees latchkey:// references: run it through lk run -- …, which replaces them with values for that command only. - Values don't appear on another Mac: both Macs need iCloud Keychain turned on with the same Apple Account, and the items must have been saved to iCloud Keychain. Syncing to a second Mac hasn't been tested end to end yet. ## Latchkey Pro Pro isn't on sale yet. When it is, it's bought in the Mac App Store. To unlock it on another Mac, sign in with the same Apple Account and choose Restore Purchases in Latchkey's Settings. Refunds go through Apple at reportaproblem.apple.com. ## Report a mistake on this site If a page says something Latchkey doesn't do, or leaves out a limit, email latchkey@snackstud.io with the page and what's wrong, or open an issue. Corrections are listed in the changelog. ## Report a security issue Please don't post it publicly. Email latchkey@snackstud.io with "Security" in the subject, the Latchkey and macOS versions, what an attacker can do and what they need first, and steps to reproduce with example values only. Never send a real secret. Security explains what's in scope. ## More Privacy policy · Terms · Roadmap --- Page: Developer Credential Migration for small teams · Latchkey URL: https://latchkey.snackstud.io/teams.html For teams · Snack Studio # Developer Credential Migration We help a small development team find every env file it depends on, see which credentials are duplicated, stale or in conflict, and move its supported local workflows into Latchkey, with safer access for its coding agents. From $2,500per small-team engagement · fixed scope Request an assessmentWhat's included Requests go to latchkey@snackstud.io. Scope, confidentiality and credential handling are agreed in writing before any work starts. The inventory starts with a dry run that prints names and counts, never values: where each file goes, the key every project shares, what expires, and files that disagree. Example data; the output is what Latchkey prints. ## What the engagement leaves you with A result, not a license: your team's credentials organized, its Macs set up, and the procedures written down. - Credential and environment inventoryEvery env file under your projects, where each value would go, and what's shared, skipped or in conflict. - Dependency and migration reportWhich projects and environments use which credentials, the duplicates and stale ones, and the order to move them in. - Latchkey set up on supported MacsProjects linked to their repositories, env files of references, and environment records your developers can export on any Mac. - Access and recovery proceduresHow each developer gets a credential, what agents may read without asking, how grants are made, and how to rotate and restore. - Onboarding and handoffA walkthrough for your developers, and the documentation to bring the next one on without us. - Safer agent accessGrants scoped to folders, sessions and commands, and the agent instructions that keep values out of transcripts. ## How it runs - 1Agree scopeWhich projects, Macs and deployment platforms, and how credentials are handled, in writing. - 2InventoryDry runs on your team's Macs: names, counts, duplicates and conflicts, never values. - 3MigrateImports with one approval per developer, references in place of values, projects and records set up. - 4Hand offProcedures, onboarding, and a check that every project runs through Latchkey. ## How your credentials are handled - Values are stored in each developer's iCloud Keychain, not on a Snack Studio server; the inventory and reports work from names and counts, which is all lk import --dry-run prints. - Each import and grant is approved by the developer whose Mac it is, with Touch ID. - Scope, confidentiality and credential-handling terms are agreed in writing before we start. We don't accept customer secrets outside those terms. A dry run lists names, never values; the import asks the developer whose Mac it is for Touch ID, and leaves references in the file. Example data; the output is what Latchkey prints. ## What it covers, and what it doesn't Fixed scope, limited to what Latchkey supports today. - Covered: Macs on macOS 15 or later, env files and the local workflows Latchkey supports, and linking environments to Vercel, GitHub Actions, Railway or Fly. - Not covered: Windows or Linux machines, secrets platforms already in production use that we'd have to replace, or a security audit. It's an implementation engagement, not security consulting. - Pricing starts at $2,500 for a small team; larger scopes are quoted before the work is agreed. Latchkey Teams · in design ## Shared environments for the whole team Latchkey, and Latchkey Pro after it, are for one developer's Macs. Teams would be a separate product for what organizations automating development ask for: - Shared organizational environments and managed team credentials - Membership, roles and team provisioning - Approval workflows and central evidence of access $15 per user a month, billed yearly, planned We'll build it with two or three teams who would pay for it, before building a hosted service. If your team wants shared environments, organizational controls and audit evidence, we'd like to hear what it would need to do. Become a design partner In design. Write to latchkey@snackstud.io to be one of the first two or three teams. ## Evaluating Latchkey first? Everything an engineer needs to judge it is public on this site. - The security modelWhat each mechanism protects, where it stops, and the trust boundaries. - The command referenceEvery command, option and exit code, and what each one asks. - Plans and pricingWhat's free, what Pro will add, and how updates work. Snack Studio · from $2,500 ## Start with an inventory of every env file your team depends on. A fixed-scope migration that leaves your credentials organized, your Macs set up and the procedures written down. Request an assessmentDownload free --- Page: Terms of use · Latchkey URL: https://latchkey.snackstud.io/terms.html # Terms of use Latchkey is made by Snack Studio. These terms cover the app, its command-line tool, MCP server and Safari extension, and this website. Effective 12 November 2026. ## Which terms apply - Copies from the Mac App Store, including Latchkey Pro, are licensed under Apple's Licensed Application End User License Agreement, together with these terms. - The direct download is free to use under these terms. - The source code is licensed under the Functional Source License, Version 1.1, ALv2 Future License (FSL-1.1-ALv2). Each version becomes available under the Apache License 2.0 two years after it's released. ## Latchkey Pro Pro isn't on sale yet. When it is: - Pro is a one-time in-app purchase in the Mac App Store version. It unlocks Pro features on the Macs signed in to your Apple Account, under Apple's rules for purchases and Family Sharing. - Pro includes the Pro features described on the pricing page and the updates we release to them. There's no subscription. - Apple handles payment, receipts and refunds. To ask for a refund, use reportaproblem.apple.com. - Storing, reading and exporting your own values never depends on Pro, and stays available if Pro is ever unavailable. ## Your credentials and your responsibility - Your values are yours. Latchkey keeps them in your keychain; Snack Studio never has access to them. - You're responsible for what you approve: a command, agent or platform you allow receives the values you give it. Security explains what each protection does and where it ends. - Keep your own backups and recovery: if you lose access to your Apple Account and devices, we can't recover your values. ## Acceptable use Don't use Latchkey to get at credentials you aren't authorized to use, or to break the terms of the platforms you connect it to. ## No warranty Latchkey is provided "as is", without warranties of any kind, to the extent the law allows. To the extent the law allows, Snack Studio isn't liable for indirect or consequential losses, or for losses from credentials you released, exported or pushed, and its total liability is limited to what you paid for Latchkey. Nothing here limits rights you have under the law where you live that can't be limited. ## Changes and contact We publish changes to these terms on this page with a new effective date. Questions: latchkey@snackstud.io.