npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@kvasar/openclaw-git

v1.5.9

Published

Git management plugin for OpenClaw — clone, branch, diff, commit and push without leaving chat

Readme

openclaw-git

Full Git workflow for OpenClaw — clone repos, manage branches, diff changes, stage, commit and push without leaving chat.

Tools provided

| Tool | Description | |------|-------------| | git_status | Working-tree status: branch, staged, modified, untracked | | git_clone | Clone a remote repo (supports shallow clones) | | git_checkout | Switch branch or create + checkout a new one | | git_branch | List local/remote branches | | git_diff | Unified diff (unstaged or staged, optionally scoped to a file) | | git_log | Recent commit history | | git_add | Stage files (or everything) | | git_commit | Create a commit from staged changes | | git_push ⚠️ | Push branch to remote | | git_pull | Fetch + merge from remote | | git_stash | Push/pop/list stash | | git_reset ⚠️ | Move HEAD (soft / mixed / hard) |

Tools marked ⚠️ are optional and must be explicitly allowed in config.


Installation

# 1. Install the plugin
openclaw plugins install @kvasar/openclaw-git

# 2. Restart the gateway
openclaw gateway restart

Or from source:

git clone https://github.com/kvasar/openclaw-git
openclaw plugins install ./openclaw-git
openclaw gateway restart

Configuration

Bitbucket private repos (optional)

Generate an API token in Bitbucket:

  1. Go to Bitbucket → Personal settings → API tokens
  2. Click Create API token
  3. Give it a label (e.g. openclaw-git)
  4. Set scope: Repositories → Read (add Write if you want to push)
  5. Copy the generated token

Then add to your OpenClaw config:

{
  "plugins": {
    "entries": {
      "openclaw-git": {
        "enabled": true,
        "config": {
          "bitbucketApiToken": "ATBBxxxxxxxxxxxxxxxx"
        }
      }
    }
  }
}

How it works: Bitbucket API token auth uses the static username x-bitbucket-api-token-auth with your token as the password. You can either pass a clean Bitbucket HTTPS URL and let the plugin inject the token from config, or pass a fully credentialed URL directly. The token is redacted from plugin responses.

For SSH clones ([email protected]:...) no token is needed — your SSH key handles auth normally.

Optional tools allowlist

{
  "tools": {
    "allow": ["git_push", "git_reset", "git_clone"]
  }
}

Usage examples

Once installed, just ask the agent naturally:

Clone https://github.com/eclipse-edc/Connector into ~/projects/edc
Show me the status of ~/projects/my-app
Stage all changes in ~/projects/my-app and commit with message "fix: resolve NPE in auth filter"
Show me the diff of src/main/java/App.java before I stage it
Create a new branch feature/vc-policy and push it to origin
Pull the latest changes from main

Development & Testing

Install dev dependencies

cd openclaw-git-plugin
npm install

Test files

| File | What it tests | |------|--------------| | src/config.test.ts | Unit tests — isBitbucketUrl, injectBitbucketCredentials, redactCredentials | | src/git-ops.test.ts | Integration tests — all git ops against a real temp repo (no network) | | plugin.contract.test.ts | OpenClaw SDK contract — plugin registration, tool schemas, tool execution |

Run tests

# All tests (vitest)
npm test

# Watch mode during development
npm run test:watch

# Contract tests only (SDK-level validation)
npm run test:contract

# Node built-in test runner (no install needed, Node >= 22)
npm run test:node

# Type-check + all tests
npm run check

What the contract test validates

Using createTestRuntime from openclaw/plugin-sdk/testing, the contract test verifies:

  • Plugin id is "openclaw-git"
  • Exactly 12 tools are registered with correct names
  • git_clone, git_push, git_reset are marked optional: true
  • All 9 required tools are not optional
  • Every tool has a parameters schema and a description > 10 chars
  • git_status, git_log, git_diff, git_branch return correct text content
  • git_add + git_commit round-trip works against a real repo
  • Bitbucket URL without config → credential warning (not a crash)
  • Bitbucket URL with config → no credential warning (attempts clone)

Type-check only

npm run typecheck

Dependencies:


License

MIT © KVASAR Technologies