{"id":13467567,"url":"https://github.com/keygen-sh/keygen-api","last_synced_at":"2025-04-13T18:34:32.448Z","repository":{"id":171701655,"uuid":"55925153","full_name":"keygen-sh/keygen-api","owner":"keygen-sh","description":"Keygen is a fair source software licensing and distribution API built with Ruby on Rails. For developers, by developers.","archived":false,"fork":false,"pushed_at":"2025-04-04T21:56:07.000Z","size":84483,"stargazers_count":1085,"open_issues_count":188,"forks_count":76,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-04-06T16:06:14.775Z","etag":null,"topics":["api","fair-source","hacktoberfest","license-keys","rails","rails-api","ruby","ruby-on-rails","software-distribution","software-licensing","source-available"],"latest_commit_sha":null,"homepage":"https://keygen.sh","language":"Gherkin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/keygen-sh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"ezekg"}},"created_at":"2016-04-10T22:10:48.000Z","updated_at":"2025-04-05T22:28:36.000Z","dependencies_parsed_at":"2023-10-14T17:02:02.078Z","dependency_job_id":"2c272be8-4923-455e-b61e-b7e93124031b","html_url":"https://github.com/keygen-sh/keygen-api","commit_stats":{"total_commits":4846,"total_committers":6,"mean_commits":807.6666666666666,"dds":"0.0033016921172100977","last_synced_commit":"294b67cbb6bb31a0358a4d52469253a5bbbd6996"},"previous_names":["keygen-sh/keygen-api"],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keygen-sh%2Fkeygen-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keygen-sh%2Fkeygen-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keygen-sh%2Fkeygen-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keygen-sh%2Fkeygen-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/keygen-sh","download_url":"https://codeload.github.com/keygen-sh/keygen-api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248761064,"owners_count":21157483,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","fair-source","hacktoberfest","license-keys","rails","rails-api","ruby","ruby-on-rails","software-distribution","software-licensing","source-available"],"created_at":"2024-07-31T15:00:57.970Z","updated_at":"2025-04-13T18:34:32.420Z","avatar_url":"https://github.com/keygen-sh.png","language":"Gherkin","readme":"\u003ca href=\"https://keygen.sh?ref=keygen-api\"\u003e\n  \u003cdiv\u003e\n    \u003cimg src=\"https://keygen.sh/images/logo-pill.png\" width=\"200\" alt=\"Keygen\"\u003e\n  \u003c/div\u003e\n\u003c/a\u003e\n\u003cbr\u003e\n\n[![Keygen CI](https://github.com/keygen-sh/keygen-api/actions/workflows/test.yml/badge.svg)](https://github.com/keygen-sh/keygen-api/actions)\n[![Discord Community](https://img.shields.io/badge/discord-community-blue)][discord]\n\n# Keygen\n\nKeygen is a fair source software licensing and distribution API, built\nfor developers, by developers. Use Keygen to add license key validation,\nentitlements, and device activation to your business's desktop apps,\nserver applications, on-premise software, and other products.\n\n## Software licensing for everyone\n\nKeygen comes in two editions. Keygen CE is our Community Edition, and is\nfree (as in beer) to self-host for personal and commercial use. Keygen\nEE is our Enterprise Edition, and it requires a license key to use.\nKeygen EE comes with dedicated support, as well as enterprise-grade features\nlike request logs, audit logs, permissions, environments, and more.\n\nWe built Keygen to make software licensing accessible to everyone.\n\n## Managed hosting with Keygen Cloud\n\nThe easiest way to get started with Keygen is with [our official managed\nservice in the cloud][keygen-cloud]. We'll handle the hard stuff — high\navailability, backups, security, and maintenance — while you focus on\nproduct.\n\nOur managed hosting can save a substantial amount of developer time and\nresources. For most businesses, this ends up being the best value\noption and the revenue goes to funding the maintenance and further\ndevelopment of Keygen. So you’ll be supporting [Fair Source](https://fair.io)\nsoftware and getting a great service!\n\n## Self hosting with Keygen CE\n\nKeygen is a fair source software licensing and distribution API, and we have a\nfree (as in beer) [self-hosted solution][self-hosting]. Keygen Community\nEdition (CE) is exactly the same code base as our managed solution, Keygen\nCloud, but with a less frequent release schedule (think of it as an LTS\nrelease).\n\nBug fixes and new features are released to Keygen Cloud several times\nper week. Features are battle-tested in Keygen Cloud, which allows us to fix\nany bugs before the general self-hosted release. Every 6 months or so, we\ncombine all the changes into a new self-hosted release.\n\nKeygen CE does lack a few features from Keygen Cloud, most of which are\navailable in Keygen EE.\n\nInterested in self-hosting Keygen? Take a look at our [self-hosting docs][self-hosting].\n\n## Self hosting with Keygen EE\n\nKeygen is also enterprise-grade, and battle-tested in Keygen Cloud with some of\nthe best brands in the world. The following features are available in\nKeygen Enterprise Edition (EE):\n\n- **Request logs**: keep a historical record of API requests, along with who\n  made the request, the request body, response body, status code, IP address,\n  and other information.\n- **Event logs**: keep an audit trail of every single event that happens on a\n  Keygen account.\n- **Environments**: manage separate environments within a Keygen account, from\n  test environments, to a sandbox, to QA, to production.\n- **Permissions**: enterprise-grade roles and permissions.\n- **Import/export**: migrate from Keygen Cloud to Keygen EE (and vice-versa).\n- **OCI/Docker**: license and distribute private container images via Keygen's\n  license-gated, OCI-compliant container registry.\n- **SSO/SAML**: support for SSO/SAML.\n\nIn addition, Keygen EE customers are entitled to dedicated self-hosting\nsupport. We're here to make sure you're successful.\n\nKeygen uses Keygen EE in production to run Keygen Cloud, which is used to\nlicense Keygen EE. It's ~~turtles~~ Keygens all the way down (we love\ndogfooding our own products).\n\nTo obtain a license key, please [reach out][sales].\n\n## Sustainability\n\nOur only sources of funding for Keygen is our premium, managed service for\nrunning Keygen in the Cloud, and Keygen EE. But if you're looking for an\nalternative way to support the project, we've put together [some\nsponsorship options][sponsor].\n\nIf you choose to self-host Keygen CE, you can [become a sponsor][sponsor],\nwhich is a great way to give back to the community and to contribute\nto the long-term sustainability of the project.\n\n## Support\n\nKeygen CE is a community supported project and there are **no guarantees** that\nyou will receive support from the creators of Keygen to troubleshoot your\nself-hosting issues. Keygen offers **best-effort** support for Keygen CE. There\nis [a community-supported Discord server][discord] and [a forum][forum] where\nyou can ask for help with self-hosting.\n\nIf you do need support guantantees, consider becoming a [Keygen Cloud][keygen-cloud]\ncustomer, or [purchasing Keygen EE][sales].\n\n## Developing\n\n### Secrets\n\nTo generate a [secret key](https://guides.rubyonrails.org/security.html) for\nthe application, run:\n\n```bash\nexport SECRET_KEY_BASE=\"$(openssl rand -hex 64)\"\n```\n\nTo generate [at-work encryption](https://guides.rubyonrails.org/active_record_encryption.html) secrets, run:\n\n```bash\nexport ENCRYPTION_DETERMINISTIC_KEY=\"$(openssl rand -base64 32)\"\nexport ENCRYPTION_PRIMARY_KEY=\"$(openssl rand -base64 32)\"\nexport ENCRYPTION_KEY_DERIVATION_SALT=\"$(openssl rand -base64 32)\"\n```\n\n### Setup\n\nTo install dependencies, run:\n\n```bash\nbundle\n```\n\nTo setup Keygen, run:\n\n```bash\nbundle exec rails keygen:setup\n```\n\n### Seeding\n\nTo seed the database with sample data, run (optional):\n\n```bash\nbundle exec rails db:seed:development\n```\n\n### Running\n\nTo start the server, run:\n\n```bash\nbundle exec rails server\n```\n\nTo start a worker, run:\n\n```bash\nbundle exec sidekiq\n```\n\nTo start a console, run:\n\n```bash\nbundle exec rails console\n```\n\n### Testing\n\nTo setup the test environment, run:\n\n```bash\nbundle exec rake test:setup\n```\n\nTo run the entire test suite, specs and features, run (takes ~20 mins on a 16-core CPU):\n\n```bash\nbundle exec rake test\n```\n\nTo run Cucumber features, run:\n\n```bash\nbundle exec rake test:cucumber\nbundle exec rake test:cucumber[features/api/v1/licenses/actions/validations.feature:369]\nbundle exec rake test:cucumber[features/api/v1/licenses/actions/validations.feature]\nbundle exec rake test:cucumber[features/api/v1/licenses]\n```\n\nTo run Rspec specs, run:\n\n```bash\nbundle exec rake test:rspec\nbundle exec rake test:rspec[spec/models/license_spec.rb:199]\nbundle exec rake test:rspec[spec/models/license_spec.rb]\nbundle exec rake test:rspec[spec/models]\n```\n\n## License\n\nKeygen is licensed under the [Fair Core License](https://fcl.dev). The Fair\nCore License, or FCL, provides the best balance between user freedom and\ndeveloper sustainability for a project like Keygen that monetizes via SaaS and\nself-hosting. The FCL is a mostly-permissive non-compete [Fair Source](https://fair.io)\nlicense that eventually contributes to Open Source after 2 years.\n\nThe 2-year timeframe applies to each software version made available, whether\nthrough pushing a Git commit, tagging a release on GitHub, or publishing an\nimage to Docker Hub. After 2 years, the code licensed under the FCL becomes\nOpen Source under the Apache 2.0 license.\n\nTo obtain an Open Source version of Keygen, run the following:\n\n```bash\ngit clone https://github.com/keygen-sh/keygen-api \u0026\u0026 cd keygen-api\ngit checkout `git rev-list -n 1 --before='2 years ago' master`\n```\n\nIf the `LICENSE.md` file is FCL, and that code is 2 years old, you may use that\nversion under the Open Source terms of the change license, which is currently\nthe Apache 2.0 license.\n\nYou can...\n\n1. self-host Keygen EE to license your enterprise applications.\n2. embed Keygen CE in your on-premise applications.\n3. run Keygen CE on a private network.\n3. modify Keygen to add additional functionality.\n4. fork Keygen into a private repo.\n\nIf the FCL happens to not work for your company or use-case, please [reach out][sales].\n\nThe license is available [here](https://keygen.sh/license/).\n\n## Contributing\n\nIf you discover an issue, or are interested in a new feature, please open an\nissue. If you want to contribute code, feel free to open a pull request. If the\nPR is substantial, it may be beneficial to open an issue beforehand to discuss.\n\nThe CLA is available [here](https://keygen.sh/cla/).\n\n## Security\n\nWe take security at Keygen very seriously. We perform annual pen-tests on our\ncode base and infrastructure. In addition, we regularly perform code audits.\nOur most recent pen-test was performed by [Greg Molnar](https://greg.molnar.io/security-consultancy/),\nan OSCP-certified security researcher in the Ruby and Rails community.\n\nIf you believe you've found a vulnerability, please see our [`SECURITY.md`](https://github.com/keygen-sh/keygen-api/blob/master/SECURITY.md)\nfile.\n\n## Is it any good?\n\n[Yes.](https://news.ycombinator.com/item?id=3067434)\n\n[keygen-cloud]: https://keygen.sh\n[self-hosting]: https://keygen.sh/docs/self-hosting/\n[sponsor]: https://github.com/sponsors/ezekg\n[support]: mailto:support@keygen.sh\n[discord]: https://discord.gg/TRrhSaWSsN\n[forum]: https://github.com/keygen-sh/community/discussions\n[license]: https://keygen.sh/license/\n[sales]: mailto:sales@keygen.sh\n","funding_links":["https://github.com/sponsors/ezekg"],"categories":["Gherkin"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkeygen-sh%2Fkeygen-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkeygen-sh%2Fkeygen-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkeygen-sh%2Fkeygen-api/lists"}