06 [Free course](https://logicpacks.io/learn) · 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:

```sh
pipx install logicpacks
```

```sh
logicpacks login
```

```sh
logicpacks key add OPENAI_API_KEY --hosts api.openai.com --rate 60
```

```sh
logicpacks share OPENAI_API_KEY @friend --ttl 7d
```

```sh
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](https://logicpacks.io/docs/security) · [Sharing docs](https://logicpacks.io/docs/sharing)

[Previous : What is a pack?](https://logicpacks.io/learn/packs) [Next : Mocks and demo data: building without paid API keys](https://logicpacks.io/learn/mocks)

---

Canonical URL: https://logicpacks.io/learn/share-safely

Developed by TechRealm (techrealm.online), the software team. Operated by Al Jash Trading (Establishment), Abu Dhabi, since 1994, the legal entity that hosts and is responsible for the service. Economic licence CN-1030597, Abu Dhabi Registration Authority. Address: Office 5, Bani Yas West 4, Bani Yas, Abu Dhabi, UAE. Website: https://aljashtrading.com. Contact: hello@logicpacks.io, security@logicpacks.io, WhatsApp +1 713 632 2262 (https://wa.me/17136322262).

Machine-readable index: [/llms.txt](https://logicpacks.io/llms.txt). Plain facts: [/about.md](https://logicpacks.io/about.md). Safety: [/safety.md](https://logicpacks.io/safety.md).
