Your coding agent sets Loxmith up for you. Signing in and anything that gives access stay with you.
With your coding agent
Open Claude Code, Codex or any agent that works in your terminal, in your project's folder, and paste this:
Set up Loxmith in this project. Follow the agent steps at
https://loxmith.dev/docs/setup#agent-steps.
Never ask me for a password, token or key, and never print one.Your agent finds the passwords and keys written into your project, swaps each one it can for a temporary key, and changes how your app starts. It stops and asks you for two things:
- Signing in. You run
ward login --webyourself. Loxmith won't let an agent sign in as you. - Anything that gives access, like a new rule or connector. You approve it in the console.
Agent steps
For the agent. Run each command from the project's folder.
- Run
ward status. If it says you are not signed in, ask the person to runward login --webin their own terminal, then wait. Don't try to sign in yourself. - Ask the person which Loxmith project this folder belongs to, then run
ward init <project> --no-import. It writesward.json, which holds no secrets. - Run
ward check --jsonto find hard-coded passwords and keys. It never prints a value. - Run
ward templates --jsonto see the rules this person can use. - For each finding a rule covers, add it to
ward.jsonunderleases, for example"DATABASE_URL": "orders-read", and remove the hard-coded value from the code and from.env. Ask before deleting a file. - Change the project's start and test commands to run through
ward run --, for exampleward run -- npm start. Each lease goes into its variable and ends when the command exits. - Run the tests through
ward run, then runward checkagain. It exits 0 when nothing is left. - For a finding no rule covers, don't make a rule. Tell the person which one it is: an admin can add a rule, and it waits for their approval in the console.
- Finish with a short summary: what moved, what is left, and that next time they can start you with
ward agent run --policy <policy> -- <command>so you run with your own temporary keys.
Never ask for, print or write down a credential, never use --show-secrets, and never run ward login.
By hand
The same setup, one command at a time.
1. Sign in
Point the ward CLI at your Loxmith server, then approve the code it shows in the console.
export WARD_URL=https://your-loxmith-server
ward login --webward init shop --no-importward checkward templates5. Swap a password for a temporary key
List the key in ward.json, take the password out of your code and .env, and start your app through ward run.
{
"project": "shop",
"environment": "dev",
"leases": { "DATABASE_URL": "orders-read" }
}ward run -- npm startward agent run --policy analyst -- claudeward leases
ward revoke 8fde951c