A CLI tool to initialize Python projects with robust helper scripts
Project description
pybootstrap (pybs)
Just want to start coding? Skip the setup.
pybootstrap gets you from "I want to write Python" to "running code" in seconds. No tedious setup, no remembering venv commands - just code.
The "Why"
You know how to use venv. But every single time you start a new project:
- Create a project directory
python -m venv .venvsource .venv/bin/activate- Install dependencies
- Create requirements.txt
- Create .gitignore
- Initialize Git
- Next time: remember to activate the environment
That's 7 steps before you write a single line of code.
pybootstrap automates all of it - one command, and you're ready to code.
Who is this for?
- Everyone: Whether you barely know Python or you've been coding for years, setup is repetitive and time-consuming.
- Professionals: You know venv - you just don't want to repeat the same commands every time.
- Non-technical users: Don't want to touch the terminal? Just run the scripts.
Core Features
- One-Command Setup: Run
pybs init, done. - Intelligent Environment (
py_bootstrap.sh):- Auto-detects pyenv, conda, or system Python
- Creates and activates virtual environment
- Installs dependencies from requirements.txt
- Optional Git initialization with .gitignore
- Zero-Config Running (
Run.sh):- Just run
./Run.sh- always works - Auto-activates your venv
- Finds your script (main.py, app.py, etc.)
- Remembers your choice for next time
- Just run
Quick Demo
$ pybs init --dir my_project
Working inside new directory: /home/user/my_project
Creating helper scripts...
- Created and made executable: py_bootstrap.sh
- Created and made executable: Run.sh
Initialization complete!
Next steps:
1. cd my_project
2. Create your requirements.txt with your dependencies
3. Run: ./py_bootstrap.sh
4. Run: ./Run.sh
$ cd my_project
$ ./py_bootstrap.sh
ℹ️ Starting project setup...
ℹ️ Creating virtual environment...
ℹ️ Installing dependencies...
✅ Project ready! Just run ./Run.sh
$ echo 'print("Hello!")' > main.py
$ ./Run.sh
[INFO] Found '.venv' directory.
[INFO] Activating virtual environment...
[INFO] Running main.py...
Hello!
Installation
Easiest Way (No Terminal Needed)
- Download
py_bootstrap.shandRun.shfrom this repository - Double-click
py_bootstrap.sh- it opens a terminal and sets up your project - Double-click
Run.shto run your code
That's it. No installation, no commands to remember.
From Terminal
git clone https://github.com/PlayWitIt/Python-Bootstrap.git
cd Python-Bootstrap
pip install .
Now use pybs anywhere.
From PyPI (Coming Soon)
pip install pybootstrap
Usage
Initialize a new project
# In a new directory
pybs init --dir my_project
# Or in current directory
pybs init
Set up the environment
# Just run this once per project
./py_bootstrap.sh
# It will:
# - Create a virtual environment
# - Install dependencies from requirements.txt
# - Ask about Git (optional)
Run your code
./Run.sh
# That's it. No need to:
# - Remember to activate venv
# - Know which python to use
# - Remember file names
How It Works
py_bootstrap.sh (One-time setup)
Creates your project environment:
- Detects best Python version (pyenv → conda → system)
- Creates
.venvdirectory - Installs your dependencies
- Optionally initializes Git
Run.sh (Every time you run)
Executes your code:
- Finds your virtual environment
- Activates it automatically
- Locates your main script
- Runs it
No activation commands. No path hunting. Just code.
Options
pybs init
pybs init # Current directory
pybs init --dir my_project # New directory
pybs init --no-run # Skip Run.sh generation
pybs --version # Show version
Requirements
- Python 3.8+
- Linux or macOS
- Windows: Use WSL (see below)
Windows Users: Use WSL
If you're on Windows, PyBootstrap works best with WSL (Windows Subsystem for Linux):
-
Install WSL (one-time):
# Open PowerShell as Administrator and run: wsl --install
Restart your computer when prompted.
-
Open WSL and install Python:
sudo apt update sudo apt install python3 python3-venv git
-
Use PyBootstrap normally:
pip install PythonBootstraper pybs init --dir myproject cd myproject ./py_bootstrap.sh
Why WSL? The bootstrap scripts are bash-based, which run natively on Linux/macOS. WSL gives you a full Linux environment on Windows with minimal setup. Most Python developers prefer this anyway for local development.
Alternative: You can also run these scripts in Git Bash, but some features (like auto-opening a terminal) may not work fully.
License
MIT License - see LICENSE file.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pythonbootstraper-1.0.2.tar.gz.
File metadata
- Download URL: pythonbootstraper-1.0.2.tar.gz
- Upload date:
- Size: 22.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4d02546f1d4f4280dd74fa7bb3fd4d7678a2194e649cc3cbe1d0cce7c6ecdf98
|
|
| MD5 |
37b997cda826bdeda5501779117562fa
|
|
| BLAKE2b-256 |
5ddd66065756be4ed497eff433d206804a8f8b86b71721c5faedba1b78412866
|
File details
Details for the file pythonbootstraper-1.0.2-py3-none-any.whl.
File metadata
- Download URL: pythonbootstraper-1.0.2-py3-none-any.whl
- Upload date:
- Size: 20.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2e7236b35c2e72331f720ac22a32eabd88e164e29e92934b038d7723bbb89332
|
|
| MD5 |
2a49f42eeb01a233e6259d1601f354e3
|
|
| BLAKE2b-256 |
e3ac4039dd8b4c9ecfdfbba206d0be8b82b6b7a8c422fb46074dbd02c333f0e4
|