project
yaylib
2026.05.27
yaylib is an unofficial client library for Yay!, a Japanese social app. It lets you talk to the service from code — log in, read a timeline, post, send messages — and it comes in Go, TypeScript, and Python. This is the story of why it exists and why I rebuilt it.
where it started
I’ve spent time on Yay! and on Himabu before it — an earlier app from the same company that has since shut down. Both are built around voice as much as text: you meet people online and actually talk. I like that. The way someone speaks carries their mood and how they think far better than text ever does.
yaylib began as plain curiosity, plus an interest in building something with a small team. A few people in the community were clearly automating things, but there was no shared, established way to do it. So I made one — for myself first. The first version was Python, mostly because that’s what would reach the most people who might want to use it.
the maintenance problem
The original version came from taking the app apart by hand. That works once, but the app keeps updating, and on each update I couldn’t reliably tell what had changed. Keeping up by hand didn’t scale, and the library slowly fell behind.
By then yaylib had a name in the community and people were depending on it, so letting it rot felt wrong. That’s what pushed me to rebuild it properly rather than patch it again.
one spec, many clients
The idea I’d been turning over was simple: stop maintaining each client by hand, and instead keep a single source of truth — an OpenAPI description of the API — then generate the clients from it.
I’ll keep the analysis side to myself and won’t describe how the description is produced; that part stays private on purpose. What matters is the shape of it. The description is built deterministically — derived, not guessed — and everything downstream flows from that one file. Nothing makes up an endpoint or a type on its own.
Centralising on OpenAPI is what makes three languages almost free. I shipped Python first to reach users, but I personally reach for Go and TypeScript far more often, so this time all three come from the same spec and stay in step.
| from | to |
|---|---|
| one OpenAPI | Go · TypeScript · Python |
using it
Because the three clients come from the same description, they read almost the same. Logging in and posting looks like this:
client := yaylib.NewClient()
client.LoginWithEmail(ctx).Email("...").Password("...").Execute()
client.CreatePost(ctx).XJwt(client.GenerateXJwt()).PostType("text").Text("hello from yaylib").Execute() const client = new Client();
await client.loginWithEmail({ email: '...', password: '...' });
await client.createPost({
xJwt: client.generateXJwt(),
postType: 'text',
text: 'hello from yaylib'
}); async with yaylib.Client() as client:
await client.login_with_email(email="...", password="...")
await client.create_post(x_jwt=client.generate_x_jwt(), post_type="text", text="hello from yaylib") Same shape in all three — that’s the point of generating them from one spec. The session is cached for you, and every operation hangs off the client directly.
unofficial, and my own
A note on what this is and isn’t. yaylib is unofficial — not affiliated with or endorsed by the people who make Yay!, and offered with no warranty. I keep the analysis private and don’t publish how it’s done.
It’s also entirely my own work, from the research through to the published libraries. None of it is taken from anyone else’s.
what it’s for
The reason I made it, underneath the curiosity, was to make Yay! a little more convenient — and, ideally, more fun. Automation can be entertainment.
The example I’m happiest with is one I built myself: MindReader AI, a bot that reads someone’s timeline and writes a light, playful take on their personality. It went out in May 2023; by that November it had been used by more than 7,000 people and had posted around 20,000 replies of its own. That’s the direction I like — automation that gives something back to the people using it.
the part I’m unsure about
I’m glad it’s used. A Discord of more than a hundred people grew up around it, the repo has picked up a fair number of stars, and now and then someone asks how to do something and we help. That’s the good version, and most of it is the good version.
The part I’m less sure about is abuse. Yay! has its share of spam, and a tool that makes automation easy can feed that as easily as it feeds something like MindReader. I’d rather it didn’t. I built it hoping for the other side of that, and I still do.
If any of this is useful to you, yaylib is on GitHub — a star there helps more people find it, and quietly tells me it’s worth keeping up.