@anymux/github
v0.1.0
Published
GitHub file system, git, and hosting adapter for AnyMux
Maintainers
Readme
@anymux/github
GitHub file system and git operations provider for AnyMux.
Installation
pnpm add @anymux/githubUsage
import { GitHubProvider } from "@anymux/github";
const provider = new GitHubProvider({
token: process.env.GITHUB_TOKEN,
owner: "my-org",
repo: "my-repo",
ref: "main",
});
await provider.initialize();
// File system operations
const fs = provider.getCapability("file-system");
const readme = await fs.readFile("/README.md", "utf-8");
// Git operations
const git = provider.getCapability("git-repo");
const branches = await git.listBranches();
// GitHub platform operations
const host = provider.getCapability("git-host");
const prs = await host.listPullRequests({ state: "open" });API Overview
GitHubProvider
Implements IProvider with capabilities:
file-system— Read/write files via GitHub Contents APIgit-repo— Branches, commits, tags, diffs via Git Data APIgit-host— Pull requests, issues, reviews, releases, CI pipelines
Configuration
token— GitHub personal access token or OAuth tokenowner— Repository owner (user or organization)repo— Repository nameref— Branch, tag, or commit SHA (default:"main")
License
MIT
