Your first workspace
This walks a developer through a full cycle. It assumes the
development stack is running and you have bob’s token —
he owns src/server and docs, and cannot read secrets/.
1. Log in
Section titled “1. Log in”nit login http://localhost:8080# Token for http://localhost:8080: nit_…Logged in to http://localhost:8080 as bobCredential stored in /home/you/.nit/credentials.jsonThe token is verified before it is stored. A credential that does not work fails here, not three commands later on an unrelated screen.
The file is mode 600 and keyed by server, so one machine can talk to a staging
and a production deployment without the tokens overwriting each other.
2. Clone
Section titled “2. Clone”nit clone backend-api registering the workspace waiting for the server to prepare the changes downloading 273 bytesCloned backend-api into /home/you/backend-api3 file(s) updated2 file(s) withheld by policyTwo files were withheld. Look at what actually arrived:
cd backend-apifind . -type f -not -path './.git/*' -not -path './.nit/*'./docs/readme.md./src/server/api.go./src/ui/app.tsls secrets# ls: cannot access 'secrets': No such file or directoryThis is the whole point. secrets/ is not encrypted, not greyed out, not
permission-denied. It is not there. There is nothing on this disk to leak.
What the clone left behind
Section titled “What the clone left behind”It is an ordinary git repository with one commit:
git log -1 --format='%s%n%b'nit: sync backend-api@main
Nit-Upstream-Commit: 5e0deb3c78c35440c00a4978483da66fd5219f7fNit-Policy-Version: sha256:f6040b6d6a8381dcNit-Workspace: f9e428ab-3a8d-42c8-a2d7-6ef5a0ac61bcThat commit is your sync point: the upstream commit whose projection you are
holding. The trailers make it recoverable from git history alone, which survives
a deleted .nit/state.json.
3. Change something and push
Section titled “3. Change something and push”Work normally. Commit normally.
echo '// reviewed' >> src/server/api.gogit commit -am 'annotate the handler'Check what would happen before committing to it:
nit push --check uploading 164 bytes1 file(s) would be pushed, 0 refused--check runs the authorization and queues nothing. The forge does not move.
Now push for real:
nit push -m 'annotate the handler' uploading 164 bytes runningPushed 1 file(s) to backend-api@main as 978464d55d39The commit that landed upstream is authored by bob, from the authenticated session — not from anything the client claimed. The author field of a git commit is free text, and a system that trusted it would let anyone attribute a change to a colleague.
4. Try what you may not do
Section titled “4. Try what you may not do”mkdir -p secrets && echo 'TOKEN=stolen' > secrets/prod.envgit add -A && git commit -m 'take a secret'
nit push -m 'should not land'nit: the patch touches paths you may not change
secrets/prod.env (create) refused by rule secrets-are-platform-only Production secrets are owned by the platform team.Exit status is 1, the forge did not move, and nothing was queued — so the refusal cost no clone on the server.
Note what the message contains: the path, the action it needed, the rule that
refused it, and that rule’s own message to you. A denial nobody can act on
becomes a support ticket, so rules carry a description and nit shows it.
Undo the attempt:
git reset --hard HEAD~15. Pull a colleague’s work
Section titled “5. Pull a colleague’s work”Someone else changes docs/readme.md and rotates secrets/prod.env.
nit pull waiting for the server to prepare the changes downloading 173 bytesUpdated backend-api@main to 81d30159ee921 file(s) updated1 file(s) withheld by policyThe readable change arrived. The confidential one did not — and still is not on your disk.
6. Know where you are
Section titled “6. Know where you are”nit statusrepository: backend-apibranch: mainserver: http://localhost:8080workspace: f9e428ab-3a8d-42c8-a2d7-6ef5a0ac61bcsync: 190e4b2fec37changes: nothing to pushTwo messages you will meet
Section titled “Two messages you will meet”“Your change landed, but the branch has moved on. Run: nit pull”
Your push succeeded. But something else landed while it was queued and your change was rebased onto it, so your workspace no longer matches upstream — it is missing a colleague’s commit. This is a normal outcome, not an error. Pull, and carry on.
stale_sync_point — “your workspace is behind; run: nit pull”
You are pushing from a base your workspace has moved off. Pull first.
- Filtered projections — why any of this works the way it does.
- Your first policy — write the rules yourself.
- nit — the developer CLI — every command and flag.