cookiejar

Stop copying cookies out of your browser

Your coding agent can't log into Linear, GitHub, or your admin panel. cookiejar picks the exact cookies an agent needs, groups them into a password-protected bundle, and hands them a token — without copying your whole browser.

Free and open source. A CLI. Nothing else.

A cookie jar holding browser cookies, handing one to an agent
$ npm install -g @puffle/cookiejar

Needs Node 22+. Next: cookiejar setup creates the encrypted jar.

Why you'd want this

Cookies are already there

You logged in once in Chrome or Safari. cookiejar reads those sessions live and turns them into a token, so the agent doesn't need its own login.

Values never leave your machine

The encrypted vault stores only which cookies a bundle can use. Values are read fresh from the browser each time. Re-logging refreshes the agent automatically.

One switch to cut it off

Revoke a token, stop the daemon, lock the jar, or hit the auto-lock timer — every agent loses access immediately, even mid-session.

Cloud agents, no secrets

Tunnel the daemon and issue a proxy-only token. The agent can make authenticated requests but never sees the cookie itself.

How it works

  1. 1

    Set up the jar. cookiejar setup asks which browsers you use and creates an encrypted vault at ~/.cookiejar.

  2. 2

    Pick cookies and make a bundle. cookiejar cookies linear.app shows names and flags only. Pick the ones an agent needs, then create a bundle and issue a token.

  3. 3

    Hand the token to an agent. Start cookiejar serve and give the agent the MCP config, a CLI command, or the HTTP endpoint. Locking the jar cuts them off instantly.

Try it in one command

Install, set up, and create your first bundle from the terminal:

$ npm i -g @puffle/cookiejar && cookiejar setup
  • Creates ~/.cookiejar, encrypted behind a master password
  • Lets you pick which browsers to read from
  • Then cookiejar sites, bundle new, token new
GitHub 0

From any language

cookiejar speaks plain HTTP when cookiejar serve is running. Pick a token up once and use a normal client.

Client:

        

From the terminal

Every operation is a command. No UI, no browser tab, no account to manage.

Terminal
$ cookiejar sites
linear.app              2 cookies  chrome:Default
notion.so               2 cookies  chrome:Default
github.com              3 cookies  chrome:Default

$ cookiejar bundle new "linear agent"
created linear-agent-9f0b73

$ cookiejar token new linear-agent-9f0b73 --label devin --days 7 --proxy-only
cjr_····························
6ca24d828102 · devin · proxy only, values stay here

$ cookiejar serve
cookiejar is answering agent tokens at http://127.0.0.1:4088
auto-lock: 30 idle minutes  ·  stop it to cut every agent off

FAQ

What actually is it?
A small CLI you run on your own machine. It reads the cookies your browsers already hold, lets you pick which ones to share, groups them into bundles, and hands each bundle to an agent through a token. The agent talks to a loopback daemon that never leaves your machine unless you tunnel it.
Does it store my cookies on the internet?
No. The encrypted vault stores only profile, domain, and cookie names. Values are read live from your browsers when an agent asks. There is no cloud service, no account, and no telemetry.
Can a cloud agent use it?
Yes, with a tunnel. Expose the daemon with cloudflared, Tailscale Funnel, or ngrok, and give the cloud agent a proxy-only token. It can call POST /agent/fetch to make authenticated requests, but the cookie values stay on your machine.
Is it safe to give an agent my cookies?
Cookies are bearer credentials — anything you bundle, the agent can act as you with. Keep bundles small, use expiry dates, prefer proxy-only tokens, and revoke access as soon as the agent is done. Every access is written to a local audit log.