How 2 Zed

Script: https://files.catbox.moe/37frdf.py
Packages:
pip install rsa websockets aiohttp zstandard protobuf

TL;DR

  • You get $10 in free credits for monthly usage. Check remaining usage in https://zed.dev/account
  • Needs a GitHub account >30 days old. Needs VPN if you're from a country where Anthropic API is blocked (checked by the Zed backend). Tor isn't allowed.
  • 3.5 Sonnet v2, 3.7 Sonnet (thinking doesn't work), maybe Haiku. No Opus on free tier.
  • Works in Termux (had to switch from cryptography to rsa).
  • For ST: Chat Completions -> Claude, reverse proxy http://localhost:9090/v1, with any non-empty password.

YMMV, very untested beyond the basic default ST install.

FAQ

Why so much code and so many packages?

Because Zed is very overengineered:

  • You have to generate a private/public key combo, send the public key and get the encrypted access token from the callback which you then decrypt
  • With that token, you can connect to their main "collab" server over WebSocket and get a token for their LLM service. They pass data as zstd-compressed protobuf messages with a huge root type "Envelope"
  • Finally, you can use the LLM service itself

And I had to implement this from looking at their Rust code...

Why this big blob of code at the start of the file? Is it malware?

That's just the way the official Protobuf library for Python works, there's no code injection here, you can ask your resident LLM.

How did you write it?

Several hours of looking at Zed's Rust implementation and beating 3.7 Sonnet (thinking) into submission.

Why not paste the script here directly?

The Protobuf line is really long and will make this rentry stretch too far.

Who are you?

I'm a cunny enjoyer. Feel free to send your appreciation in text and images to shinobu.creature198@silomails.com

Edit Report
Pub: 04 Mar 2025 07:58 UTC
Edit: 22 Mar 2025 01:34 UTC
Views: 5531