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

@invertase/gitbash

v0.2.1

Published

CLI for asking questions about GitHub repos through gitbash.ai

Downloads

343

Readme

gitbash

gitbash is a terminal CLI for asking questions about GitHub repositories.

Install it globally:

npm i -g @invertase/gitbash

Then use it locally:

gitbash --repo invertase/react-native-firebase "How does auth work?"

Quick start

Set your defaults once:

gitbash config \
  --model anthropic/claude-haiku-4-5 \
  --anthropic-token "$ANTHROPIC_API_KEY"

Then ask questions:

gitbash --repo invertase/react-native-firebase "How does auth work?"
gitbash --repo invertase/react-native-firebase --ref next "Summarize the Firebase app setup"
gitbash "Tell me about invertase/react-native-firebase"

If --repo is omitted, gitbash will try to infer owner/repo from the prompt.

Models

--model supports provider-prefixed models such as:

  • anthropic/claude-haiku-4-5
  • openai/gpt-4.1
  • google/gemini-2.5-flash
  • xai/grok-4
  • local or local/<model-id>: OpenAI-compatible servers on your machine (LM Studio, Ollama /v1, etc.)

Examples:

gitbash --model anthropic/claude-haiku-4-5 --repo invertase/react-native-firebase "Explain auth"
gitbash --model openai/gpt-4.1 --repo invertase/react-native-firebase "Explain auth"
gitbash --model google/gemini-2.5-flash --repo invertase/react-native-firebase "Explain auth"
gitbash --model xai/grok-4 --repo invertase/react-native-firebase "Explain auth"

Local LLM (example: LM Studio serving at http://localhost:1234/v1):

export GITBASH_LOCAL_BASE_URL=http://localhost:1234/v1
gitbash --model local --repo invertase/react-native-firebase "Summarize the README"
# or pin a model id your server exposes:
gitbash --model local/qwen2.5-coder-7b --local-base-url http://localhost:1234/v1 --repo invertase/react-native-firebase "Explain auth"

local uses the server default model; local/<id> names a specific model. An API key is optional for most local servers; use --local-token or GITBASH_LOCAL_API_KEY if yours requires one.

Bare Anthropic model names also work:

gitbash --model claude-haiku-4-5 --repo invertase/react-native-firebase "Explain auth"

That is treated as anthropic/claude-haiku-4-5.

Config

Configuration is stored in ~/.gitbash/config.json.

Set a default model and token:

gitbash config \
  --model google/gemini-2.5-flash \
  --google-token "$GOOGLE_GENERATIVE_AI_API_KEY"

Store multiple provider tokens:

gitbash config \
  --anthropic-token "$ANTHROPIC_API_KEY" \
  --openai-token "$OPENAI_API_KEY" \
  --google-token "$GOOGLE_GENERATIVE_AI_API_KEY" \
  --xai-token "$XAI_API_KEY"

Default local OpenAI-compatible base URL and model (optional --local-token if your server needs it):

gitbash config \
  --model local \
  --local-base-url http://localhost:1234/v1

Override config for one command:

gitbash \
  --model openai/gpt-4.1 \
  --openai-token "$OPENAI_API_KEY" \
  --repo invertase/react-native-firebase \
  "How does auth work?"

Flags

  • --repo <owner/repo>: repository to inspect
  • --ref <ref>: git ref to mount, defaults to main
  • --model <provider/model>: model to use
  • --token <token>: generic provider token
  • --anthropic-token <token>: Anthropic API token
  • --openai-token <token>: OpenAI API token
  • --google-token <token>: Google API token
  • --xai-token <token>: xAI API token
  • --local-base-url <url>: OpenAI-compatible API base URL for local models (e.g. http://localhost:1234/v1)
  • --local-token <token>: optional API key for local OpenAI-compatible servers
  • --api-url <url>: override the gitbash API base URL

Environment variables

You can use environment variables instead of flags:

  • GITBASH_MODEL
  • GITBASH_API_URL
  • GITBASH_API_TOKEN
  • GITBASH_ANTHROPIC_API_KEY or ANTHROPIC_API_KEY
  • GITBASH_OPENAI_API_KEY or OPENAI_API_KEY
  • GITBASH_GOOGLE_API_KEY, GOOGLE_GENERATIVE_AI_API_KEY, or GOOGLE_API_KEY
  • GITBASH_XAI_API_KEY or XAI_API_KEY
  • GITBASH_LOCAL_BASE_URL: base URL for local models (no trailing slash)
  • GITBASH_LOCAL_API_KEY: optional API key for local OpenAI-compatible servers

Resolution order:

  • CLI flags
  • environment variables
  • ~/.gitbash/config.json
  • built-in default for apiUrl

model must be set before a prompt can run. Cloud providers also need a matching API token; the local provider does not require a token unless your server enforces one.