Getting Started
This guide will walk you through installing Ghit and setting up your first workflow.
Installation
Install Ghit globally using your preferred package manager:
pnpm add -g ghitnpm install -g ghityarn global add ghitFirst Steps
1. Authenticate with GitHub
Run the login command to authenticate:
ghit loginThis will:
- Open your browser to GitHub's OAuth flow
- Request necessary permissions
- Store your token securely in
~/.ghit/db.sqlite
2. Set a Default Repository
Set a default repository to avoid typing owner/repo on every command:
ghit set-repo owner/repository-nameFor example:
ghit set-repo toneflix/ghit3. Verify Your Setup
Check that everything is configured correctly:
ghit infoThis displays:
- Your authentication status
- Current default repository
- Configuration details
Working with Issues
Interactive Mode
Launch the interactive issues dashboard:
ghit issuesThis lets you:
- Browse all issues in your repository
- View detailed information
- Close or reopen issues
- Edit titles and descriptions
- Delete issues
Creating Issues
Create a single issue:
ghit issues:create --title "Bug: Login fails" --body "Description here"Bulk Operations
Seed multiple issues from a directory of markdown files:
ghit issues:seed ./issues-directoryUpdate existing issues:
ghit issues:update ./issues-directoryDelete multiple issues:
ghit issues:delete --start 1 --end 50Generated API Commands
Ghit can generate commands directly from GitHub's OpenAPI specification.
Generate Commands
Run the generator once:
ghit generate:apisThis creates .ghit/apis.generated.js containing all GitHub REST API endpoints as CLI commands.
Using Generated Commands
Once generated, use any GitHub API endpoint as a command:
# Create an issue
ghit issues:create --title "New feature" --owner org --repo repo
# List repository issues
ghit issues:list --owner org --repo repo --state open
# Get a specific issue
ghit issues:get --owner org --repo repo --issue_number 42
# List organizations
ghit orgs:list-for-authenticated-user --per_page 50TIP
The generated file is ignored by git (add .ghit/ to .gitignore). Regenerate when GitHub's API updates.
Configuration
View or modify configuration:
ghit configAvailable options:
debug— Enable detailed error messagestoken— Your GitHub personal access tokendefault_repo— Default repository context
Next Steps
- Quick Start Guide for common workflows
- Commands Reference for all available commands
- API Documentation for generated command details
