A middleware library for interacting with the GitHub API. Version 0.5.4 is the current stable release. It provides a CommonGithubClient class that wraps @octokit/core for common GitHub operations like fetching page tree nodes. The package includes TypeScript definitions and uses js-base64 for encoding. Release cadence is irregular. Key differentiator: simplifies GitHub API calls for blog workflows (e.g., Hexo) with a lightweight abstraction.
npm install zhi-github-middlewareNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Create a GithubConfig with owner, repo, and token, then instantiate CommonGithubClient to fetch a page tree node.
Pin to exact version and test before upgrading.
Always provide a valid GitHub token. For public repos, use a minimal token or PAT.
Check the changelog or use the latest method name.
Use import { GithubConfig } from 'zhi-github-middleware';Ensure tsconfig.json has 'moduleResolution': 'node' and install the package with npm.