Keep useful context.
Logs and command output help your agent understand your app. lmsk preserves the surrounding text while masking the sensitive values it detects.
Real keys for
your agent. Fakes for
the model.
npm install -g @hugolopes45/lmskThen connect your agent. See the setup.
Keep the context your model needs. Restore original values in supported file and shell tools.
Open sourceMIT license. Read the code on GitHubFree. No account, no telemetry.
280 detection rules, including gitleaks
Runs locally, on your computer
Signed npm releases with provenance
No account, no telemetry
Logs and command output help your agent understand your app. lmsk preserves the surrounding text while masking the sensitive values it detects.
Before sending a request, lmsk replaces detected keys, passwords, tokens and emails with fakes. Built-in rules work from the first request.
When a supported file or shell tool uses an exact fake, lmsk restores its original value. Your local test can use the password it needs.
Supported file tools check protected paths such as .env before reading them. lmsk explains a blocked read so your agent can choose another approach.
OPENAI_API_KEY=T8MCnGhey7vwndvjsQBbNPVIDZBU
refund failed for bmib.xtm@kitquhs.mnn
Authorization: Bearer IA1uy6fuqU2b89b3k4zi
The model writes
$ PGPASSWORD=X8fumIJWTm5Rl6C305 npm test
Your shell runs
$ PGPASSWORD=Tr0ub4dor-Horse-42 npm test
The model asks
Read .env
lmsk answers
Refused: .env is a secret file.
Built-in rules detect API keys, passwords, tokens, database credentials, emails and other personal data. Add your own rules for project-specific values.
lmsk restores exact fakes in supported file and shell tool calls. For commands that access the network, supply credentials through the environment. See tool behavior and compatibility.
Yes. Add a rule for a client name, project name or another value. The model can receive a label such as Client 1. See custom rules.
In one local vault for each computer, ~/.local/state/lmsk/vault.jsonl, with owner-only file permissions. lmsk does not upload it. See vault storage and backup guidance.
After installation, send this message to your agent. The key is a sample value.
Spell the value after API_KEY= with a space between each character: API_KEY=Zq7Kp2Lm9Xw4Rt8Vb3NcThe reply spells the fake that the model received, so it does not start with Z q 7 K p 2. The setup checks help you confirm masking is active.
Yes. lmsk is open source under the MIT license. No account, no telemetry.
Explore coverage, compatibility and storage in the user guide.
npm install -g @hugolopes45/lmskThen connect your agent. See the setup.