Skip to content
06Free course · Lesson 6 of 12 · 5 min

Sharing a codebase with a person and their agent, safely

GitHub shares the code. The hard part is the keys: never paste them into a chat, a .env you send, or an agent's context.

Roman Urdu: Code share krna aasan ha, keys mushkil. Keys kabhi chat ya .env mein na bhejein. Har banday ko apni alag key do jo woh use kre magar dekh na sake, aur jab chaho wapas le lo.

Why sending keys goes wrong

A Stripe, Supabase or OpenAI secret key usually gives full access. Once someone has it, you cannot take it back without rotating it everywhere, and you cannot tell their calls from yours. An agent that sees a key can also leak it into logs, commits or chats.

The safe pattern

  • Mocks first: they run the app on local mocks with demo data (lesson 7). Often that is all they need.
  • One key per person: when they need the live service, give them their own access, not your key.
  • Use, never see: their agent gets a placeholder; the real value is added on your machine, only for hosts you allow.
  • Expire and revoke: access ends by itself, or at once when you say so.

How LogicPacks does it

Your key sits in an encrypted vault on your machine. A teammate's calls go through your machine, which adds the key and scrubs it from the response, so access pauses while your machine is offline. There is no spend cap per key yet, so for metered APIs also set a spending limit at the provider.

Try it

Install the CLI, store a key once (hidden prompt), then share it with someone for a week and take it back:

$ pipx install logicpacks
$ logicpacks login
$ logicpacks key add OPENAI_API_KEY --hosts api.openai.com --rate 60
$ logicpacks share OPENAI_API_KEY @friend --ttl 7d
$ logicpacks revoke OPENAI_API_KEY --from @friend

Before you push anything, logicpacks scan checks your files, .env included, for keys.

More: Keys in plain words · Sharing docs