나는 오픈소스 프로젝트가 받을 수 있는 무료 혜택을 알려주는 CLI를 만들었습니다
Source: Dev.to
TL;DR: 오픈소스 유지보수자는 아무도 이를 한데 모아주지 않기 때문에 수천 달러에 달하는 무료 크레딧과 도구를 놓치고 있습니다. 저는 OSS Perks – 15개 이상의 벤더 혜택 프로그램을 나열하고 한 명령으로 레포지토리의 자격을 확인해 주는 웹사이트 + CLI를 만들었습니다.
문제
Vercel, Sentry, JetBrains, Cloudflare — 모두 OSS 유지보수자에게 무료 혜택을 제공합니다:
- 호스팅 크레딧 $3,600
- 5 백만 오류 이벤트
- 무제한 IDE 라이선스
그 중 절반은 아무도 모릅니다.
모든 혜택은 서로 다른 웹사이트에 흩어져 있고, 마케팅 페이지에 파묻혀 있으며, 각각 고유한 자격 규정과 신청 절차가 있습니다. 저는 주말 내내 “오픈 소스를 위한 무료 도구”를 구글링하고 탭을 오가며 제 프로젝트가 어떤 혜택을 받을 수 있는지 파악하려고 애썼습니다.
그때 @5harath 가 만든 getfirstcheck.com 을 보았습니다 — 창업자에게 무료 크레딧과 보조금을 제공하는 스타트업 프로그램을 큐레이션한 디렉터리였습니다. 출시 트윗을 보고 깨달았습니다: 창업자에게는 firstcheck 가 있었지만, OSS 유지보수자에게는 그런 것이 없었습니다.
그래서 저는 OSS Perks 를 만들었습니다.
무엇인가
두 가지:
- 웹사이트 – OSS 혜택 프로그램을 검색할 수 있는 디렉터리이며, 9개 언어를 지원합니다.
- CLI – 어떤 리포지토리에서든
ossperks check를 실행하면 당신이 받을 수 있는 혜택을 알려줍니다.
Source: …
Architecture
ossperks/
├── packages/
│ ├── data/ # JSON programs + Zod schemas
│ └── cli/ # CLI that checks eligibility
├── docs/ # Next.js 16 + Fumadocs website
└── pnpm-workspace.yaml핵심 아이디어: @ossperks/data는 단일 진실 소스입니다. 모든 프로그램은 JSON 파일로 관리됩니다. 예시:
{
"slug": "vercel",
"name": "Vercel for Open Source",
"provider": "Vercel",
"url": "https://vercel.com/open-source-program",
"category": "hosting",
"description": "Vercel provides platform credits, community support, and an OSS Starter Pack.",
"perks": [
{
"title": "$3,600 Platform Credits",
"description": "$3,600 in Vercel platform credits distributed over 12 months."
},
{
"title": "OSS Starter Pack",
"description": "Credits from third‑party services to boost your project."
}
],
"eligibility": [
"Must be an open-source project that is actively developed and maintained.",
"Must show measurable impact or growth potential.",
"Must follow a Code of Conduct.",
"Credits must be used exclusively for open-source work."
],
"duration": "12 months",
"tags": ["hosting", "deployment", "serverless", "credits"]
}이 하나의 파일이 세 가지 용도로 사용됩니다:
- Website – 프로그램 페이지를 렌더링합니다.
- CLI –
list,show,search기능에 활용됩니다. - Build script – 파일을 MDX로 변환한 뒤 lingo.dev 를 통해 추가 8개 언어로 번역합니다.
JSON을 수정하면 모든 것이 자동으로 업데이트됩니다.
핵심 트릭: 자격 확인
ossperks check는 GitHub/GitLab에서 리포지토리 메타데이터를 읽어온 뒤, 모든 자격 규칙을 매처 체인을 통해 실행합니다.
const matchRule = (rule: string, ctx: RepoContext): RuleVerdict =>
checkSubjective(rule, ctx) ??
checkProvider(rule, ctx) ??
checkStars(rule, ctx) ??
checkActivity(rule, ctx) ??
checkLicense(rule, ctx) ??
checkRepoAttrs(rule, ctx) ?? { reason: rule, verdict: "unknown" };각 체크러는 인간이 읽을 수 있는 자격 문자열에 정규식을 적용해 규칙 유형을 추론하고, 리포지토리를 검증합니다. 예시 – 라이선스 체크러:
const checkLicense = (rule: string, ctx: RepoContext): RuleVerdict | null => {
const label = ctx.license ?? "no detected license";
if (/permissive\s+(?:open[\s-]?source\s+)?licen[sc]e/i.test(rule)) {
return isPermissive(ctx.license)
? { verdict: "pass" }
: {
reason: `requires a permissive license (detected: ${label})`,
verdict: "fail",
};
}
if (/open[\s-]?source\s+licen[sc]e|recognized\s+licen[sc]e/i.test(rule)) {
return isOsiApproved(ctx.license)
? { verdict: "pass" }
: {
reason: `requires an OSI‑approved license (detected: ${label})`,
verdict: "fail",
};
}
return null;
};프로그램별 if 문을 별도로 작성할 필요가 없습니다 – 자격 규칙은 JSON에 문자열 형태로 존재하고, 엔진이 의도를 패턴 매칭해 리포지토리를 검사합니다. 새로운 프로그램을 추가하려면 새로운 JSON 파일을 추가하기만 하면 되며, 체크러가 자동으로 처리합니다.
샘플 출력:
✔ next.js — MIT · 131,247 stars · last push today
Eligibility across 15 programs — 8 eligible, 5 need review, 2 ineligible
✔ vercel eligible
✔ sentry eligible
✔ github-copilot eligible
✔ jetbrains eligible
⚠ cloudflare needs review
• non‑commercial requirement cannot be auto‑verified
✖ browserstack ineligible
• requires 500+ stars (you have 42)데이터 파이프라인: JSON → 9개 언어
packages/data/src/programs/*.json (source of truth)
│
▼
docs/scripts/generate-programs-mdx (convert JSON → MDX)
│
▼
lingo.dev (translate MDX into 8 additional languages)이 파이프라인은 단일 진실 원본을 통해 모든 프로그램 페이지가 지원되는 모든 언어에서 제공되도록 보장합니다.
.mjs (JSON → MDX)
│
▼
docs/content/programs/en/*.mdx (English)
│
▼ lingo.dev
docs/content/programs/{es,fr,de,ja,ko,zh-CN,pt-BR,ru}/*.mdx생성 스크립트
생성 스크립트는 각 JSON 프로그램으로부터 구조화된 Markdown을 생성합니다:
const buildMarkdownBody = (p) => {
const sections = [
buildMetaSection(p),
buildPerksSection(p),
buildEligibilitySection(p),
buildRequirementsSection(p),
buildApplicationProcessSection(p),
buildTagsSection(p),
].filter(Boolean);
return sections.join("\n\n");
};웹사이트에서 파싱
웹사이트에서는 번역된 MDX가 다시 구조화된 데이터로 파싱되어 렌더링에 사용됩니다:
const parsePerks = (
section: string
): { title: string; description: string }[] =>
section
.split("\n")
.filter((l) => /^-\s+\*\*/.test(l.trim()))
.map((line) => {
const match = line.match(/\*\*(.+?)\*\*\s*[::]\s*(.*)/);
return match
? { description: match[2], title: match[1] }
: { description: "", title: line };
});Note: JSON → MDX → 구조화된 데이터로 다시 파싱하는 것은 왕복 과정입니다. 실용적인 결정으로 lingo.dev가 원시 JSON이 아니라 MDX 파일을 번역하도록 했습니다.
왜 이 스택인가
접근 방식
| Stack | Reason |
|---|---|
| 정적 사이트 + JSON API | i18n 없음, 문서 프레임워크 없음 |
| Astro | 대규모에서 i18n 생태계가 적음 |
| Docusaurus | 무겁고, 당시에는 React 18만 지원 |
| Fumadocs + Next.js 16 (선택) | 무료 i18n, MDX, OG 이미지, 검색 제공. 로케일 접두사 라우트, 언어 전환, OG 이미지 생성, 로케일별 콘텐츠 소스를 즉시 제공. |
| Commander | 표준 CLI 라이브러리 |
Zod를 이용한 검증
모든 프로그램은 import 시점에 Zod를 통과합니다. 잘못된 JSON은 즉시 실패합니다:
export const programSchema = z.object({
applicationProcess: z.array(z.string()).optional(),
applicationUrl: z.string().url().optional(),
category: categoryEnum,
contact: contactSchema.optional(),
description: z.string(),
duration: z.string().optional(),
eligibility: z.array(z.string()),
name: z.string(),
perks: z.array(perkSchema),
provider: z.string(),
requirements: z.array(z.string()).optional(),
slug: z.string(),
tags: z.array(z.string()).optional(),
url: z.string().url(),
});
export const programs: Program[] = raw.map((p) => programSchema.parse(p));절충점
- MDX 라운드‑트립 – JSON → MDX → 다시 파싱하는 과정이 어색하지만, lingo.dev가 JSON이 아니라 MDX를 번역하기 때문에 필요합니다.
- 정규식 자격 매칭 – 현재 15개 프로그램에 대해서는 동작하지만 취약합니다; 구조화된 규칙이 장기적으로 더 견고할 것입니다.
- 기본적으로 인증 없음 – CLI가 인증 없이 GitHub API에 접근하므로, 속도 제한에 걸릴 수 있습니다. 이를 방지하려면
GITHUB_TOKEN을 설정하세요. - 제한된 프로그램 수 – 현재 15개 프로그램만 포함되어 있으며, DigitalOcean, AWS, MongoDB, Datadog 등 수십 개의 프로그램은 JSON 파일만 추가하면 됩니다.
시도해 보기
웹사이트
git clone https://github.com/Aniket-508/ossperks.git
cd ossperks
pnpm install
pnpm --filter docs devCLI
npx @ossperks/cli
# Check the current repo
ossperks check
# Check a specific repo
ossperks check --repo vercel/next.js
# List all programs
ossperks list
# Search
ossperks search hosting
# Show program details
ossperks show vercel다음에 만들 것
- 프로그램 추가 –
{slug}.json파일을 만들고 PR을 제출하세요. 끝입니다. - 구조화된 자격 규칙 – 자유 텍스트를
{ "type": "min-stars", "value": 500 }같은 객체로 교체하여 체크러가 정규식에 의존하지 않게 합니다. - GitHub Action – CI에서
ossperks check를 실행하고 결과를 PR 코멘트로 게시합니다. - 만료 추적 – 많은 혜택이 12 개월 후에 만료됩니다; 알림 기능이 있으면 좋겠습니다.
- 커뮤니티 제출 – API 경로 (
/api/submit-program)가 이미 존재합니다.
오픈소스 프로젝트를 유지한다면 npx @ossperks/cli check를 실행해 보세요. 어떤 혜택을 받을 수 있는지 놀라실 수도 있습니다.
Links
- GitHub:
- Website:
- NPM:
누락된 프로그램을 알고 계신가요? 이슈 열기 또는 JSON 파일을 추가하세요. 약 5 분 정도 걸립니다.
