New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

ghit

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ghit

A CLI tool for managing GitHub repositories, issues, and workflows from your terminal, combining custom workflows with full GitHub API coverage.

latest
Source
npmnpm
Version
0.1.20
Version published
Weekly downloads
23
-89.25%
Maintainers
1
Weekly downloads
 
Created
Source

Ghit

NPM Downloads npm version License CI Deploy Docs

Command-line toolkit for GitHub: authenticate once, set a repo, and work with issues in bulk or interactively. Includes a generator that syncs the CLI surface with the GitHub OpenAPI spec.

Install

pnpm add -g ghit
# or npm i -g ghit

Quick start

  • Login: ghit login (opens browser flow, stores token locally)
  • Set default repo: ghit set-repo owner/name
  • Optional: enable Use Current Repo for Commands in ghit config to auto-detect repo from your current git workspace
  • Inspect info: ghit info
  • Work with issues (interactive): ghit issues to list, view, close/reopen, edit, or delete
  • Seed/update/delete issues in bulk: ghit issues:seed, ghit issues:update, ghit issues:delete

Auth and repo resolution

  • When Use Current Repo for Commands is enabled, Ghit resolves the active repository from remote.origin.url in your current workspace.
  • If Git credentials are already available for that repo (via your git credential helper), Ghit reuses that token for API calls.
  • If no workspace credential is available, Ghit falls back to the token saved by ghit login.
  • If workspace detection is disabled or no git repo is found, Ghit uses the configured default_repo.

Generated API commands (dynamic)

The CLI can generate commands directly from the GitHub OpenAPI spec. This keeps available commands and params in sync with GitHub without hand-coding.

  • Generate commands (writes .ghit/apis.generated.js):
    ghit generate:apis
    
  • Use generated commands (examples):
    • Create issue: ghit issues:create --title "Bug" --owner org --repo repo
    • List issues: ghit issues:list-for-repo --owner org --repo repo
    • Get single issue: ghit issues:get --owner org --repo repo --issue_number 123

Notes

  • The generator runs once and the CLI will auto-load .ghit/apis.generated.js on subsequent runs.
  • Only the command usage matters; you do not need to edit the generated file by hand.

Contributing

Contributing

Contributions are welcome! Please follow these steps:

  • Fork the repository
  • Create a feature branch (git checkout -b feature/amazing-feature)
  • Commit your changes (git commit -m 'Add amazing feature')
  • Push to the branch (git push origin feature/amazing-feature)
  • Open a Pull Request

Development Guidelines

  • Write TypeScript with proper type definitions
  • Follow existing code style
  • Add tests for new features
  • Update documentation for API changes
  • Ensure all tests pass before submitting PR

License

This project is licensed under the ISC License - see the LICENSE file for details.

Support

Acknowledgments

© Copyright 2026 - ToneFlix Technologies Limited

Keywords

ghit

FAQs

Package last updated on 23 Mar 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts