Skip to content

Repository files navigation

oss-init

Scaffold a production-grade open source repository in one command.

CI Zero dependencies License Node Version

oss-init generates a complete, production-ready repository skeleton: professional README (English and Chinese), LICENSE, CONTRIBUTING, CODE_OF_CONDUCT, SECURITY, CHANGELOG, .gitignore, and optional GitHub Actions CI/CD and release workflows. Every file is real, useful content �?not empty boilerplate.

Zero dependencies. No build step. Works with Node.js >= 18.

Why oss-init?

Every open source maintainer does the same tedious work for every new repository: writing a README, picking a license, adding CONTRIBUTING, CODE_OF_CONDUCT, SECURITY, setting up CI and release workflows. oss-init removes that friction so you can focus on the code that matters.

Unlike other scaffolding tools:

  • Zero dependencies �?no supply chain risk, no install weight
  • Real content �?every generated file is complete and usable as-is
  • Bilingual support �?English and Chinese README out of the box
  • Production-grade defaults �?CI matrix, release automation, security policy included

Installation

npx oss-init

or install globally:

npm install -g oss-init

Usage

Interactive wizard

oss-init

Prompts guide you through project name, language, license, documentation language, and CI options.

Non-interactive

oss-init my-project --lang node --license mit --docs bilingual --ci --publish

Options

Option Values Default Description
--lang node, python node Template language (python planned for v0.2)
--license mit, apache-2.0 mit License to generate
--docs en, zh, bilingual bilingual README language
--name string directory name Package name (npm naming rules)
--ci flag off Generate .github/workflows/ci.yml
--publish flag off Generate .github/workflows/release.yml
--force, -f flag off Overwrite a non-empty directory
--help, -h flag �? Show help
--version, -v flag �? Show version

What gets generated

Category Files
Documentation README.md (English), README.zh-CN.md (Chinese), CHANGELOG.md
Community CONTRIBUTING.md, CODE_OF_CONDUCT.md, SECURITY.md
Legal LICENSE (MIT or Apache-2.0)
Tooling .gitignore, .gitattributes, package.json
Issue & PR templates .github/ISSUE_TEMPLATE/ (bug, feature), .github/PULL_REQUEST_TEMPLATE.md
CI/CD .github/workflows/ci.yml, .github/workflows/release.yml (optional)
Starter code src/index.js, test/index.test.js with passing tests

Examples

# Bilingual Node.js project with CI and release automation
oss-init my-lib --lang node --docs bilingual --ci --publish

# English-only, MIT, minimal
oss-init tool --lang node --docs en --license mit

Preview

$ oss-init my-lib --lang node --docs bilingual --ci

Generated 18 files in /path/to/my-lib:
  README.md
  README.zh-CN.md
  LICENSE
  CONTRIBUTING.md
  CODE_OF_CONDUCT.md
  SECURITY.md
  CHANGELOG.md
  .gitignore
  .gitattributes
  package.json
  src/index.js
  test/index.test.js
  .github/workflows/ci.yml
  .github/ISSUE_TEMPLATE/bug_report.yml
  .github/ISSUE_TEMPLATE/feature_request.yml
  .github/PULL_REQUEST_TEMPLATE.md

Next steps:
  cd my-lib
  git init && git add -A && git commit -m "Initial commit"
  Push to GitHub and enable Actions.

Development

# Run the test suite (node:test, zero dependencies)
npm test

# Syntax-check all source files
npm run lint

Documentation

Roadmap

  • Python template (v0.2)
  • Go template
  • oss-init update �?sync generated files in existing repositories
  • --template for custom template directories

License

MIT © oss-init contributors �?see LICENSE.

About

Scaffold a production-grade open source repository in one command: bilingual README, LICENSE, CONTRIBUTING, SECURITY, CI/CD workflows. Zero dependencies.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

22 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages