Cloak
chevron_rightGet Cloak

How to lock VS Code on your Mac

Lock VS Code so it will not open without Touch ID or your password. Four steps, about a minute.

Lock VS Code on Mac, step by step

  1. Download Cloak from trycloak.app and open it. Set up Touch ID or a password the first time it asks. There is no account.
  2. Click the plus button under Locked apps, tick VS Code, and click Lock.
  3. Quit VS Code if it is open.
  4. Open VS Code again. Cloak now asks for Touch ID before it will launch.

Your Mac password works as a fallback by default. If other people know that password, open Cloak's Settings, turn off "Let my Mac password unlock Cloak", and set a Cloak password instead.

Who this is for

For freelancers and employees who keep client or company material in VS Code on a Mac that family or visitors also use.

What Screen Time can't do

Apple has no way to lock a single app on a Mac. The closest thing is Screen Time, which puts a daily time limit on VS Code. A limit is not a lock. VS Code opens normally until the time runs out, the Screen Time passcode is four digits, and anyone who knows it can click Ignore Limit for the rest of the day. It was built to manage screen time, not privacy. Cloak asks for Touch ID or your password every single time VS Code opens.

Why lock VS Code at all

VS Code holds source code, API keys in env files, and client projects that should stay behind a lock on any shared Mac. Because a colleague or visitor glancing at your screen is all it takes for sensitive material to leak, VS Code is exactly the kind of app worth putting behind Touch ID.

Why a Mac-level lock beats VS Code's own settings

A workspace tool might log you out after hours of inactivity, but that does nothing for the laptop you stepped away from for two minutes. A Mac-level lock is instant and applies the moment the app is launched, regardless of any in-app session.

Frequently asked questions

Does locking VS Code with Cloak slow it down?

No. Cloak only steps in at launch to ask for Touch ID. Once VS Code is unlocked it runs exactly as it normally would, with no background overhead.

Will I still get VS Code notifications while it is locked?

Notification behaviour is controlled by macOS, not by Cloak. If you want VS Code alerts hidden too, pair the lock with hiding the app, or turn off previews for VS Code in System Settings under Notifications.

What happens if Touch ID is not available?

By default Cloak offers your Mac login password as a fallback, so you can still open VS Code on a Mac without a Touch ID sensor or if your finger is not recognised. If other people know your Mac password, you can turn that fallback off and use a separate Cloak password instead.

Can I lock VS Code with Screen Time instead?

Screen Time sets a time limit, not a lock. VS Code opens normally until the limit is reached, and the limit can be ignored for the day by anyone who knows the four-digit passcode. Cloak asks for Touch ID every time.

Related app guides

Keep reading

Lock VS Code in under a minute

Cloak locks VS Code and any other app behind Touch ID, hides apps completely, and encrypts folders with AES-256. Everything stays on your Mac. No account, one-time purchase.

Get Cloak