HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
keygen-sh
keygen-api
Gherkin2023–2025
keygen-sh / keygen-api

keygen-api

Keygen is a modern, fair source software licensing and distribution API. For developers, by developers.

3Distinct people
15Mentions
0Explicit recommenders
1.6KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Keygen is a modern, fair source software licensing and distribution API. For developers, by developers.

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 1:49:46 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by month15 dated mentions

Observed mentions: 2023-06-02 17:29:36 UTC to 2025-06-06 15:11:34 UTC.

0123452023-06-01 00:00:00 UTC to 2023-07-01 00:00:00 UTC (exclusive): 5 mentions; 1 submissions, 4 commentsJun 20232023-07-01 00:00:00 UTC to 2023-08-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-08-01 00:00:00 UTC to 2023-09-01 00:00:00 UTC (exclusive): 3 mentions; 0 submissions, 3 comments2023-09-01 00:00:00 UTC to 2023-10-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-10-01 00:00:00 UTC to 2023-11-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2023-11-01 00:00:00 UTC to 2023-12-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-12-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-01-01 00:00:00 UTC to 2024-02-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-02-01 00:00:00 UTC to 2024-03-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-03-01 00:00:00 UTC to 2024-04-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-04-01 00:00:00 UTC to 2024-05-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-05-01 00:00:00 UTC to 2024-06-01 00:00:00 UTC (exclusive): 4 mentions; 1 submissions, 3 comments2024-06-01 00:00:00 UTC to 2024-07-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 commentsJun 20242024-07-01 00:00:00 UTC to 2024-08-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-08-01 00:00:00 UTC to 2024-09-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2024-09-01 00:00:00 UTC to 2024-10-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-10-01 00:00:00 UTC to 2024-11-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-11-01 00:00:00 UTC to 2024-12-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-12-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-01-01 00:00:00 UTC to 2025-02-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-02-01 00:00:00 UTC to 2025-03-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-03-01 00:00:00 UTC to 2025-04-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-04-01 00:00:00 UTC to 2025-05-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-05-01 00:00:00 UTC to 2025-06-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-06-01 00:00:00 UTC to 2025-07-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 commentsJun 2025

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
Jun 20232023-06-01 00:00:00 UTC2023-07-01 00:00:00 UTC514
Jul 20232023-07-01 00:00:00 UTC2023-08-01 00:00:00 UTC000
Aug 20232023-08-01 00:00:00 UTC2023-09-01 00:00:00 UTC303
Sep 20232023-09-01 00:00:00 UTC2023-10-01 00:00:00 UTC000
Oct 20232023-10-01 00:00:00 UTC2023-11-01 00:00:00 UTC101
Nov 20232023-11-01 00:00:00 UTC2023-12-01 00:00:00 UTC000
Dec 20232023-12-01 00:00:00 UTC2024-01-01 00:00:00 UTC000
Jan 20242024-01-01 00:00:00 UTC2024-02-01 00:00:00 UTC000
Feb 20242024-02-01 00:00:00 UTC2024-03-01 00:00:00 UTC000
Mar 20242024-03-01 00:00:00 UTC2024-04-01 00:00:00 UTC000
Apr 20242024-04-01 00:00:00 UTC2024-05-01 00:00:00 UTC000
May 20242024-05-01 00:00:00 UTC2024-06-01 00:00:00 UTC413
Jun 20242024-06-01 00:00:00 UTC2024-07-01 00:00:00 UTC000
Jul 20242024-07-01 00:00:00 UTC2024-08-01 00:00:00 UTC000
Aug 20242024-08-01 00:00:00 UTC2024-09-01 00:00:00 UTC101
Sep 20242024-09-01 00:00:00 UTC2024-10-01 00:00:00 UTC000
Oct 20242024-10-01 00:00:00 UTC2024-11-01 00:00:00 UTC000
Nov 20242024-11-01 00:00:00 UTC2024-12-01 00:00:00 UTC000
Dec 20242024-12-01 00:00:00 UTC2025-01-01 00:00:00 UTC000
Jan 20252025-01-01 00:00:00 UTC2025-02-01 00:00:00 UTC000
Feb 20252025-02-01 00:00:00 UTC2025-03-01 00:00:00 UTC000
Mar 20252025-03-01 00:00:00 UTC2025-04-01 00:00:00 UTC000
Apr 20252025-04-01 00:00:00 UTC2025-05-01 00:00:00 UTC000
May 20252025-05-01 00:00:00 UTC2025-06-01 00:00:00 UTC000
Jun 20252025-06-01 00:00:00 UTC2025-07-01 00:00:00 UTC101

What Hacker News says

15 sources
This is interesting. I've been using my transactional email provider (Sendgrid) to manually [0] send newsletters to ~10k subscribers -- essentially the active accounts -- but I've noticed that my response rate has been super low the last year or so (relatively), so I'm wondering if my domain rating has taken a hit. This firewall is interesting. Maybe I should switch to a newsletter provider like this instead of sending as transactional email? I figured it wouldn't scale and that it'd bite me eventually... [0]: https://github.com/keygen-sh/keygen-api/blob/master/lib/task... p.s. it's a pet-peeve of mine when docs subdomains have no obvious link to the top domain!
In Buttondown's email subscription spam firewall
Part of my "week of open source" [0], today I released union_of. This gem for Ruby on Rails allows you to create Active Record associations that combine other associations using SQL UNION under the hood. It has full support for joins, preloading, etc., because the UNION association is a real association. That also means it can also be used for complex through-union associations. I've been working on this gem for about the last year [1]. It took me around 9 months to implement in a performant way, and I'd say it's the pinnacle of my Ruby career. It's definitely some of the most complex code I've ever written, touching so much surface area of the Rails internals. It helped me successfully make it through one of the most complex data migrations I've ever had to do, and all without breaking backwards compatibility. Many failures [2], but ulti
Read the rest
mately I got to scream "I am invincible!" when all my tests passed. I built this to facilitate migrating from a one-to-many relationship to a many-to-many relationship in a backwards compatible way. A classic problem a lot of us have experienced as well. And it's been used in production to performantly query millions and millions of rows. [0]: https://x.com/_m27e/status/1823029064372031586 [1]: https://github.com/keygen-sh/keygen-api/issues/534#issuecomm... [2]: https://github.com/keygen-sh/keygen-api/pull/802
In Show HN: union_of – Combine multiple Active Record associations with SQL UNION
I looked at SSPL, but it was really between BUSL and ELv2 for me. I ultimately chose ELv2 because it allowed me to keep my community edition and enterprise edition in a monorepo, where the latter edition is protected by license keys, i.e. ELv2 has a clause to where you can't remove or circumvent the license key functionality. Since Keygen was previously closed source, I didn't want to split the repo up into the ee/ directory structure that you commonly see in other open core and fair source projects. I deemed doing so as 'too risky' -- too much code churn for little benefit -- as those changes would have a direct effect on the SaaS. Instead, I opted for ELv2 because it offered me the ability to say, "hey, I'm making this fair source, do what you want with it, just don't compete with me or remove the license gates for the paid features." H
Read the rest
ere's some of my internal dialog i.r.t. the license choice: https://github.com/keygen-sh/keygen-api/pull/668
In Ask HN: Founders who offer free/OS and paid SaaS, how do you manage your code?
I have a single code base [0] for the self-hosted editions and for the SaaS. I split features up across two editions: community edition (CE) and enterprise edition (EE), and then also two modes: singleplayer and multiplayer (single- vs multi-tenant). The switching is done via environment variables, KEYGEN_EDITION and KEYGEN_MODE. The SaaS offering actually runs the EE edition in multiplayer mode, and is right now the only instance of the EE edition in multiplayer mode (other EE customers are entitled to singleplayer only). I've been running this set up for about a year [1] and it's working well. Having a single code base was a requirement before I made the project fair source [2]; the fair source ELv2 license lets me add feature gates to facilitate this, while protecting me from forks giving away EE features for free (while still allowing
Read the rest
forks). Updates are pushed to the SaaS offering daily. I cut self-hosted releases bi-annually unless it's for a critical fix. [0]: https://github.com/keygen-sh/keygen-api [1]: https://keygen.sh/blog/all-your-licensing-are-belong-to-you/ [2]: http://fair.io/
In Ask HN: Founders who offer free/OS and paid SaaS, how do you manage your code?
In Useless Ruby sugar: Pattern matching
Honestly, I don't have many resources to provide. I read a lot of policy tests via GitHub search (e.g. path:spec/policies/*/*.rb), but couldn't find anything that looked like what I wanted. I wrote the DSL as-needed in order to fully test my app's authz while migrating from Pundit to ActionPolicy (while also introducing fine-grained permissions). It's not the prettiest when you actually look beneath the covers [0], but it does what I wanted -- providing an easy way to write exhaustive authz tests. Without the DSL, I probably wouldn't have written the tests. The PR for said migration was massive [1], and was a prerequisite to going open source [2]. [0]: https://github.com/keygen-sh/keygen-api/blob/master/spec/sup... [1]: https://github.com/keygen-sh/keygen-api/pull/647 [2]: https://github.com/keygen-sh/keygen-api/issues/644
In I don’t buy “duplication is cheaper than the wrong abstraction” (2021)
> I personally find tests that have a ton of extra helper classes/functions to do stuff like set up fixtures or do assertions to be painful to deal with. I think it depends on the context. For example, I typically agree, but when I was writing authz tests [0], I ended up writing a DSL so that 1) I'd more more inclined to write the thousands and thousands of tests, and 2) I'd be able to focus on the actual authz assertion and not on verbose setup. I couldn't imagine writing those policy tests without that abstraction. I would have lost my mind with all of the repetition, and would have almost assuredly made mistakes. [0]: https://github.com/keygen-sh/keygen-api/blob/master/spec/pol...
In I don’t buy “duplication is cheaper than the wrong abstraction” (2021)
Composer makes it hard [0] to offer an artifact service for it because it authenticates per-domain, not per-package. For example, if you required 2 private packages from GitHub from php.pkg.github.com, you wouldn't be able to authenticate with both separately. You can only authenticate with php.pkg.github.com, not php.pkg.github.com/org-1/package and php.pkg.github.com/org-2/package. It's not ideal, but the workaround for this is to use subdomains: - org-1.php.pkg.github.com/package - org-2.php.pkg.github.com/package I wonder if that had any impact on their decision. [0]: https://github.com/keygen-sh/keygen-api/issues/490
In GitHub support for PHP Packages: “no longer planned”

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.