Command-line tool for creating GitHub repositories and deploying local projects using OAuth device flow authentication.
- OAuth device flow authentication with a browser-based login
- Create a repository and push the current directory in one command
- Works with existing GitHub repositories and local remotes
- HTTPS remotes by default, with optional SSH
- Interactive prompts plus flags for automation
- Node.js 18+
- Git installed and configured
- GitHub account
npm install -g gh-deploy-cligit clone <your-repo-url>
cd github-cli
npm install
npm linkgh-deploy login
cd my-project
gh-deploy pushgh-deploy logingh-deploy whoamigh-deploy create
gh-deploy create my-project --description "My project" --private
gh-deploy create my-project --org my-organization
gh-deploy create my-project --sshgh-deploy push
gh-deploy push --name my-project --description "My app" --private
gh-deploy push --repo owner/name
gh-deploy push --repo https://github.com/owner/name
gh-deploy push --use-existing
gh-deploy push --remote upstream --use-existing
gh-deploy push --ssh| Command | Description |
|---|---|
| login | Authenticate with GitHub using OAuth device flow |
| logout | Remove stored authentication credentials |
| whoami | Display authenticated user information |
| create [name] | Create a new GitHub repository |
| push | Create or use a repository and push the current project |
- -v, --verbose: Enable verbose logging
- --plain: Disable color and decorative output
- --no-color: Disable colored output
- -h, --help: Show help
- -V, --version: Show version
- -n, --name : Repository name
- -d, --description : Repository description
- -p, --private: Make repository private
- -o, --org : Create repository in organization
- --repo <owner/name>: Use an existing GitHub repository (owner/name or URL)
- --remote : Git remote name to use (default: origin)
- --use-existing: Use existing remote if it exists (skip repo creation)
- --ssh: Use SSH for git remote (default: HTTPS)
Config is stored in your home directory:
- Windows: %APPDATA%\gh-deploy-cli\config.json
- macOS: ~/Library/Preferences/gh-deploy-cli/config.json
- Linux: ~/.config/gh-deploy-cli/config.json
- Git not installed: install from https://git-scm.com/
- Git name/email missing: set them with git config --global
- Token missing/expired: run gh-deploy login
- Repository exists: choose a different name or use --repo
npm test
npm run lint
npm run format- OAuth tokens are encrypted before storage
- Tokens are never logged or displayed
- File permissions restrict token access to the owner
- Never commit your token file or share your Client ID publicly
MIT License. See LICENSE.
- Octokit
- Commander.js
- simple-git
- Inquirer.js