@ahmadawais/open-github
v0.0.2
Published
CLI tool to open GitHub repositories in browser
Readme
@ahmadawais/open-github
A simple CLI tool to quickly open GitHub repositories in your browser.
Installation
npm install -g @ahmadawais/open-githubUsage
Open current repository
If you're in a git repository with a GitHub remote:
open-githubOpen specific repository
open-github user/repo
open-github https://github.com/user/repoOpen specific branch
open-github -b feature-branch
open-github user/repo -b mainOpen specific file or directory
open-github -p src/index.js
open-github user/repo -p README.md
open-github -b main -p src/componentsOptions
-b, --branch <branch>- Open specific branch-p, --path <path>- Open specific file or directory path-h, --help- Display help information-V, --version- Display version number
Examples
# Open current repo
open-github
# Open specific repo
open-github facebook/react
# Open specific branch
open-github -b develop
# Open specific file in current repo
open-github -p package.json
# Open file in specific branch
open-github -b main -p src/index.js
# Open directory in another repo
open-github microsoft/vscode -p src/vs/editorRequirements
- Node.js
- Git (for auto-detecting current repository)
- A system with a default browser configured
License
MIT
