Skip to content

仓库 files navigation

@level0x40/react-git

A Level 0x40 Labs project.

A CLI that turns any local Git repository into a static, publishable React UI for browsing source artifacts — commits, refs, trees, blobs, diffs, and contribution heatmaps. Powered by @lazarv/react-server.

npm version License Powered by react-server Docs


npx @level0x40/react-git build /path/to/your/repo

The output is plain HTML, JSON, and assets — drop it on Cloudflare Pages, Netlify, GitHub Pages, S3 + CloudFront, or any static host.

See the published docs at react-git.level0x40.com and the npm package at @level0x40/react-git.

仓库 layout

This is a pnpm workspace. Two members live under it.

.
├── packages/
│   └── react-git/          # @level0x40/react-git — the published CLI + runtime
└── docs/                   # @level0x40/react-git-docs — the documentation site

The CLI is what gets published to npm. The docs site is private — it builds with @lazarv/react-server and deploys to Cloudflare Pages.

Prerequisites

  • Node.js ≥ 22 (the .nvmrc pins the version this repo develops against)
  • pnpm 10.33+ (use corepack enable to get the version pinned in package.json)
  • Git ≥ 2.40

Develop

pnpm install                     # link the workspace
pnpm react-git dev /path/to/repo # run the CLI in dev mode against a repo
pnpm docs dev                    # run the docs site locally on :3000

Both pnpm react-git and pnpm docs are workspace-filter passthroughs — they run against @level0x40/react-git and @level0x40/react-git-docs respectively, so any extra arguments forward to the package's own scripts.

Release

发布 are managed with Changesets. The flow is:

  1. Author your change. Make code changes on a branch, open a pull request.
  2. Add a changeset. Run pnpm changeset and follow the prompts to describe what changed and pick a semver bump (patch/minor/major). The command writes a markdown file under .changeset/. Commit it with your PR.
  3. Merge the PR. When the PR lands on main, the Release GitHub Action opens (or updates) a "Version 包" PR with the bumped versions and updated CHANGELOG.md.
  4. Merge the Version 包 PR. That triggers the same workflow to publish the bumped packages to npm.

For the release workflow to publish, set an NPM_TOKEN repository secret with publish permissions for the @level0x40 scope. The GITHUB_TOKEN provided by 操作 is sufficient for the PR creation step.

Contributing

See CONTRIBUTING.md for the full guide. The short version: fork, branch, run pnpm changeset to record your change, open a PR.

This project follows the Contributor Covenant. By participating you agree to abide by its terms.

License

MIT © Level 0x40 Labs.


Level 0x40 Labs

A Level 0x40 Labs project. For developers, artists and gamers.

Website · GitHub · X

关于

Static Git source artifact viewer powered by @lazarv/react-server. Render any local Git repo as a publishable React UI.

Topics

Resources

Code of conduct

Contributing

Stars

1 star

关注者

0 watching

复刻s

发布

贡献者

Languages