LWG — Light Weight Git
LWG (Light Weight Git) is a lightweight command-line tool that simplifies common Git workflows into short, easy-to-remember commands.
Instead of repeatedly typing multiple Git commands, LWG provides a simple interface for initializing repositories, committing changes, and pushing them to a remote repository.
Features
- Simple Git workflow
- Quick repository initialization
- One-command commit and push
- GitHub HTTPS authentication setup
- Clear error handling
- Lightweight Python CLI
- Uses your existing Git installation
Requirements
Before installing LWG, make sure you have:
- Python 3.10 or newer
- Git
- A GitHub account and repository if you want to push to GitHub
Check your installed versions:
python --version
git --version
Installation
Install LWG directly from PyPI:
python -m pip install lwg-git
Verify the installation:
lwg --version
You can also view the available commands:
lwg --help
Quick Start
1. Configure GitHub Authentication
If you use GitHub over HTTPS, configure your credentials:
lwg setup
LWG will ask for:
- GitHub username
- GitHub Personal Access Token (PAT)
Note: GitHub does not accept your normal account password for Git HTTPS authentication. Use a Personal Access Token instead.
If your Git authentication is already configured, you can skip this step.
2. Initialize a Repository
Navigate to your project directory:
cd my-project
Then run:
lwg i https://github.com/USERNAME/REPOSITORY.git
LWG performs the equivalent of:
git init
git add .
git commit -m "Initial commit"
git branch -M main
git remote add origin https://github.com/USERNAME/REPOSITORY.git
git push -u origin main
Your project is now initialized and pushed to the remote repository.
3. Push Changes
After making changes to your project, run:
lwg p "your commit message" main
For example:
lwg p "added authentication system" main
This performs:
git add .
git commit -m "added authentication system"
git push origin main
Commands
| Command | Description |
|---|---|
lwg --help |
Display available commands |
lwg --version |
Display the installed version |
lwg setup |
Configure GitHub HTTPS credentials |
lwg i <url> |
Initialize a repository and connect it to a remote |
lwg p <message> <branch> |
Commit and push changes |
Command Reference
lwg setup
Configure GitHub HTTPS credentials.
lwg setup
LWG will prompt you for your GitHub username and Personal Access Token.
Example:
LWG GitHub Setup
----------------
GitHub username: your-username
GitHub personal access token: ********
✓ GitHub credentials configured.
✓ Username: your-username
✓ Token saved.
lwg i <url>
Initialize the current directory as a Git repository and connect it to a remote repository.
Syntax
lwg i <repository-url>
Example
lwg i https://github.com/username/my-project.git
This command:
- Initializes a Git repository.
- Stages the project files.
- Creates the initial commit.
- Renames the branch to
main. - Adds the remote repository as
origin. - Pushes the
mainbranch.
lwg p <message> <branch>
Stage, commit, and push changes to a remote branch.
Syntax
lwg p "<commit message>" <branch>
Example
lwg p "fix login bug" main
This is equivalent to:
git add .
git commit -m "fix login bug"
git push origin main
lwg --help
Display the command-line help:
lwg --help
lwg --version
Display the installed LWG version:
lwg --version
Typical Workflow
A typical first-time workflow looks like this:
cd my-project
lwg setup
lwg i https://github.com/username/my-project.git
After making changes:
lwg p "added new feature" main
And for another update:
lwg p "fixed authentication bug" main
Why LWG?
A typical Git repository setup requires multiple commands:
git init
git add .
git commit -m "Initial commit"
git branch -M main
git remote add origin URL
git push -u origin main
LWG simplifies this into:
lwg i URL
Likewise, a normal update requires:
git add .
git commit -m "message"
git push origin main
With LWG:
lwg p "message" main
LWG is designed to provide a simple interface for common Git workflows while keeping Git as the underlying version control system.
Development
Clone the repository:
git clone https://github.com/darkrho07/lwg.git
cd lwg
Install LWG in editable mode:
python -m pip install -e .
Run the development version:
lwg --help
Project Structure
lwg/
├── .github/
│ └── workflows/
│ └── release.yml
├── src/
│ └── lwg/
│ ├── __init__.py
│ ├── __main__.py
│ ├── auth.py
│ ├── cli.py
│ └── git.py
├── tests/
│ └── __init__.py
├── .gitignore
├── LICENSE
├── README.md
└── pyproject.toml
Contributing
Contributions, bug reports, and feature requests are welcome.
To contribute:
- Fork the repository.
- Create a new branch.
- Make your changes.
- Test your changes.
- Open a pull request.
For bugs and feature requests, open an issue on GitHub.
License
LWG is released under the MIT License.
See the LICENSE file for details.
Links
Author
Created and maintained by darkrho07.
If you find LWG useful, consider giving the repository a ⭐ on GitHub.
Metadata
Release files for lwg-git 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| lwg_git-0.1.1.tar.gz | 5.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| lwg_git-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 11.0 kB
Release files / lwg_git-0.1.1.tar.gz
| Download URL | lwg_git-0.1.1.tar.gz |
|---|---|
| Size | 5.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c8a9c0f63a0294367b49d598d1389c652fb454bfeda54cfc6fa619291da52dd8
|
|
BLAKE2b-256 checksum How to use checksums |
056803bb992f6db93e3d0e2f5eb6046d135aeba561db9797e89ef1912fe16c12
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 4, 2026.
Transparency logRelease files / lwg_git-0.1.1-py3-none-any.whl
| Download URL | lwg_git-0.1.1-py3-none-any.whl |
|---|---|
| Size | 6.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d59dad46b6536456820ff4c78b660189b48414ea2b59288c27f6aef2537965a8
|
|
BLAKE2b-256 checksum How to use checksums |
4681d22f03694901f0fb73f5b87300c69593fe31e62b45a39e0827d87b4bf37b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 4, 2026.
Transparency log