Git utilities for faster development
npm install git-boltA Git client for webcontainers and environments without native Git support.
- Works in browser-based development environments like StackBlitz and CodeSandbox
- No native Git client required
- Supports all basic Git operations:
- Initialization and repository connection
- Adding and committing changes
- Pushing and pulling from remote
- Branch management
- Status viewing
You can use this tool without installation via npx:
``bashInitialize a repo
npx git-bolt init https://github.com/yourusername/your-repo.git --token YOUR_GITHUB_TOKEN
Installation
If you prefer to install the package globally:
`bash
Install globally
npm install -g git-boltUse the command
git-bolt --help
`Authentication
You need a GitHub personal access token to authenticate. You can provide it in several ways:
1. Using the
--token option with the init command
2. Setting the GITHUB_TOKEN environment variable
3. Creating a .env file with GITHUB_TOKEN=your_tokenCommands
-
init - Initialize and connect to a GitHub repository
- add - Add file(s) to the staging area
- commit -m "message" - Commit staged changes
- push [-b branch] - Push commits to remote repository
- pull [-b branch] - Pull latest changes from remote repository
- branch [name] [-c] - List, create, or checkout branches
- fetch [-b branch] - Fetch latest changes from remote repository
- status - Show the working tree statusContributing
If you're contributing to this project and need to publish, follow these steps:
1. Create an npm account if you don't have one at npmjs.com
2. Login to npm:
`bash
npm login
`3. Publish the package:
`bash
npm publish
``MIT