git-bolt
v3.2.0
Published
Git utilities for faster development
Maintainers
Readme
Git Bolt
A Git client for webcontainers and environments without native Git support.
Features
- 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
Quick Start
You can use this tool without installation via npx:
# Initialize a repo
npx git-bolt init https://github.com/yourusername/your-repo.git --token YOUR_GITHUB_TOKEN
# Add files
npx git-bolt add .
# Commit changes
npx git-bolt commit -m "Initial commit"
# Push to GitHub
npx git-bolt pushInstallation
If you prefer to install the package globally:
# Install globally
npm install -g git-bolt
# Use the command
git-bolt --helpAuthentication
You need a GitHub personal access token to authenticate. You can provide it in several ways:
- Using the
--tokenoption with theinitcommand - Setting the
GITHUB_TOKENenvironment variable - Creating a
.envfile withGITHUB_TOKEN=your_token
Commands
init <repo-url>- Initialize and connect to a GitHub repositoryadd <filepath>- Add file(s) to the staging areacommit -m "message"- Commit staged changespush [-b branch]- Push commits to remote repositorypull [-b branch]- Pull latest changes from remote repositorybranch [name] [-c]- List, create, or checkout branchesfetch [-b branch]- Fetch latest changes from remote repositorystatus- Show the working tree status
Contributing
If you're contributing to this project and need to publish, follow these steps:
Create an npm account if you don't have one at npmjs.com
Login to npm:
npm loginPublish the package:
npm publish
License
MIT
