A collection of Windows batch utilities that provide powerful aliases and functions for Git, NPM, and Python development, converted from zsh to Windows command prompt format.
- Git Utilities: Complete git workflow aliases and functions
- NPM Utilities: Package management and testing shortcuts
- Python Utilities: Environment management and testing tools
- Cross-directory Support: All utilities work from any directory
- Windows Native: Optimized for Windows command prompt
cmd/
βββ _bashrc.cmd # Main configuration file
βββ git-utils/ # Git utilities
β βββ git-update.bat
β βββ git-status.bat
β βββ git-restore-all.bat
β βββ git-checkout.bat
β βββ git-branch-update-all.bat
β βββ git-diff-n.bat
β βββ git-worktree-add.bat
β βββ git-worktree-checkout.bat
β βββ git-pull-request.bat
β βββ test-git-aliases.bat
β βββ README.md
βββ npm-utils/ # NPM utilities
β βββ npm-test-integration.bat
β βββ npm-test-system-custom.bat
β βββ npm-test-integration-inband.bat
β βββ npm-test-system-inband.bat
β βββ npm-install-build.bat
β βββ npm-clean-build.bat
β βββ npm-remove-dist.bat
β βββ test-npm-aliases.bat
β βββ README.md
βββ python-utils/ # Python utilities
β βββ python-env.bat
β βββ python-install-requirements.bat
β βββ python-install-zowe.bat
β βββ python-test-unit.bat
β βββ python-test-integration.bat
β βββ test-python-aliases.bat
β βββ README.md
βββ _bashrc.cmd # Main configuration file
βββ _zsh_aliases.sh # Original zsh aliases (reference)
βββ code.cmd # VS Code launcher
βββ wget.exe # Wget for Windows
βββ README.md # This file
-
Clone the repository:
git clone https://github.com/zFernand0/cmd.git cd cmd
-
Load the configuration:
_bashrc.cmd
-
Verify installation:
test-git-aliases test-npm-aliases test-python-aliases
- Open Registry Editor: Press
Win+R
, typeregedit
, and press Enter - Navigate to:
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Command Processor
- Add/Modify: Create or modify the
AutoRun
string value - Set Value:
C:\path\to\cmd\_bashrc.cmd
(replace with your actual path) - Restart: Close and reopen any command prompt windows
- Open Registry Editor: Press
Win+R
, typeregedit
, and press Enter - Navigate to:
Computer\HKEY_CURRENT_USER\SOFTWARE\Microsoft\Command Processor
- Add/Modify: Create or modify the
AutoRun
string value - Set Value:
C:\path\to\cmd\_bashrc.cmd
(replace with your actual path) - Restart: Close and reopen any command prompt windows
- Create/Edit Profile:
notepad $PROFILE
- Add Line:
& "C:\path\to\cmd\_bashrc.cmd"
- Restart: Close and reopen PowerShell
-
Add to your PATH (optional):
- Add the
cmd
directory to your system PATH - Or run
_bashrc.cmd
in each new command prompt session
- Add the
-
Batch File Shortcut (optional):
- Create a shortcut to
cmd.exe
- Modify the target to:
cmd.exe /k "C:\path\to\cmd\_bashrc.cmd"
- Create a shortcut to
This repository provides hundreds of aliases and functions for Git, NPM, and Python development. Here are some key examples:
Basic Operations:
g
βgit
(basic git command)gs
βgit status
(with fetch and worktree list)gu
βgit update
(fetch and pull)ga
βgit add
,gc
βgit commit
Branch Management:
gb
βgit branch
,gbv
βgit branch -vv
gch
βgit checkout
(with fetch)gbU
β Update all branches
Push/Pull:
gpl
βgit pull
,gph
βgit push
gpho
βgit push -u origin
Advanced:
gwA
β Add worktree with naminggpr
β Fetch PR branchesgst
βgit stash
,gsta
βgit stash apply
π Complete Git Reference: See git-utils/README.md for all 50+ git commands
Basic Operations:
n
βnpm
,ni
βnpm install
nr
βnpm run
,nrb
βnpm run build
nrs
βnpm run start
Testing:
ntu
βnpm run test:unit
nti
βnpm run test:integration
nts
βnpm run test:system
Utilities:
nib
β Install and buildnrcb
β Clean and buildrmd
β Remove dist + git restore
π Complete NPM Reference: See npm-utils/README.md for all 30+ npm commands
Basic Operations:
p3
βpython3
,pyp
βpython3 -m pip
pir
β Install requirements.txtpenv
β Environment management
Testing:
pyt
βpytest -s
tpu
β Run unit teststpi
β Run integration tests
π Complete Python Reference: See python-utils/README.md for all 15+ python commands
The _bashrc.cmd
file automatically sets up:
- PATH: Adds utility directories to PATH
- FNM: Node.js version management (if available)
You can customize the utilities by:
- Modifying batch files in the utility directories
- Adding new aliases to
_bashrc.cmd
- Creating new utility directories for additional tools
Run the test scripts to verify all utilities are working:
# Test all utilities
test-git-aliases
test-npm-aliases
test-python-aliases
# Or test individual utilities
git-utils\test-git-aliases.bat
npm-utils\test-npm-aliases.bat
python-utils\test-python-aliases.bat
gs # Check status
ga . # Stage all changes
gc -m "feat: add new feature" # Commit
gu # Update repository
gbU # Update all branches
ni # Install dependencies
nrb # Build project
nrs # Start development server
ntu # Run unit tests
nti --watch # Run integration tests in watch mode
penv # Create/activate virtual environment
pir # Install requirements
pyt # Run all tests
tpu # Run unit tests
tpi # Run integration tests
This project converts zsh aliases to Windows batch format:
- Original:
_zsh_aliases.sh
(zsh format) - Converted:
_bashrc.cmd
+ utility directories (Windows format)
Key differences:
- Uses
doskey
for aliases instead ofalias
- Standalone
.bat
files instead of shell functions - Windows path syntax (
\
instead of/
) - Windows-compatible commands (
rmdir
instead ofrm
)
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
This project is open source and available under the Apache License 2.0.
- Original zsh aliases that inspired this project
- Windows command prompt community
- Contributors and users of this utility collection
Made with β€οΈ for Windows developers