Interactive project setup wizard for Python repos
Project description
setup-wizard
setup-wizard is a small, configurable CLI that bootstraps a Python project’s local dev environment:
- picks a suitable Python interpreter (e.g. 3.14),
- creates/reuses a virtualenv,
- installs dependencies,
- ensures a
.envfile exists, - optionally installs dev tools (Black, Ruff, …),
- wires up VS Code launch configuration,
- runs a basic health check,
- and gives you a clear summary of what happened.
You define what it should do for each repo in a simple setup_wizard.json file, and then run:
setup-wizard
from the project root.
Installation
You can install setup-wizard either as a global CLI (via pipx) or into a Python environment (via pip).
Option 1: Global CLI with pipx (recommended)
pipx install setup-wizard
After that, the setup-wizard command is available globally:
setup-wizard --help
Option 2: With pip
Inside any Python environment:
pip install setup-wizard
setup-wizard --help
How it works (high level)
When you run setup-wizard inside a project directory, it:
- Loads configuration from
./setup_wizard.json(or uses defaults if missing). - Finds a Python interpreter that satisfies
min_python(preferspreferred_pythonif available). - Creates or reuses a virtualenv in
venv_dir(e.g..venv), usingvirtualenvif available, falling back to stdlibvenv. - Installs dependencies from
requirementsinto that venv. - Ensures a
.envfile exists, copying fromenv_exampleif present. - Optionally installs dev tools (e.g. Black, Ruff) into the venv.
- Optionally updates
.vscode/launch.jsonby appending a debug configuration (without removing your existing ones) and can set Black as VS Code formatter. - Runs a health check by importing your configured application module (e.g.
am.app), adding./srctoPYTHONPATHif it exists. - Optionally opens your project README at the end.
- Prints a setup summary with ✅ / ⚠️ / ❌ for each step.
All steps are interactive by default: the wizard explains what it’s about to do and asks for confirmation.
Basic usage in a project
1. Add a setup_wizard.json to your repo
In your project root, create setup_wizard.json, for example:
{
"project_name": "my-service",
"runtime": {
"min_python": "3.11",
"preferred_python": "3.14"
},
"paths": {
"venv_dir": ".venv",
"env_file": ".env",
"env_example": ".env.example",
"requirements": "requirements.txt",
"app_import": "my_service.app",
"readme": "README.md"
},
"dev_tools": [
"black",
"ruff"
],
"vscode": {
"enable_launch": true,
"entry_module": "my_service.app",
"debug_name": "my-service",
"use_black_formatter": true,
"extra_env": {
"PYTHONPATH": "${workspaceFolder}/src"
},
"cwd": "${workspaceFolder}"
}
}
Then document this in your project’s README.md:
Local setup
This project uses the shared setup-wizard to set up a local dev environment.
setup-wizard
The wizard will create a virtualenv, install dependencies, ensure .env exists,
set up VS Code debug configuration, and run a small health check.
2. Run the wizard
From your project root:
setup-wizard
If you keep the config in a different location (e.g. bootstrap/setup_wizard.json):
setup-wizard --config bootstrap/setup_wizard.json
Configuration reference (setup_wizard.json)
setup_wizard.json is a simple JSON file in the project directory. All fields are optional; sensible defaults are used when omitted.
Top-level
{
"project_name": "my-service",
"runtime": { },
"paths": { },
"dev_tools": [ ],
"vscode": { }
}
project_name (string)
Human-readable name used in logs and as a default for VS Code debug config names (if vscode.debug_name is not set).
runtime section
"runtime": {
"min_python": "3.11",
"preferred_python": "3.14"
}
min_python– minimum Python version required (major.minor); the wizard will refuse interpreters older than this.preferred_python– preferred version; if multiple interpreters satisfymin_python, the wizard tries to pick the highest, favoring this version when available.
paths section
"paths": {
"venv_dir": ".venv",
"env_file": ".env",
"env_example": ".env.example",
"requirements": "requirements.txt",
"app_import": "my_service.app",
"readme": "README.md"
}
venv_dir– where to create/reuse the virtualenv.env_file– path to the.envfile for local configuration.env_example– example env file to copy from if.envdoesn’t exist.requirements– pip requirements file to install from.app_import– Python module path to import in the health check (importlib.import_module(app_import)).readme– path to your README file (used when optionally opening it at the end).
dev_tools section
"dev_tools": [
"black",
"ruff"
]
List of extra development tools to install into the venv. Common examples:
- formatters:
black - linters:
ruff,flake8 - test tools:
pytest,pytest-cov
The wizard will ask before installing them.
vscode section
"vscode": {
"enable_launch": true,
"entry_module": "my_service.app",
"debug_name": "my-service",
"use_black_formatter": true,
"extra_env": {
"PYTHONPATH": "${workspaceFolder}/src"
},
"cwd": "${workspaceFolder}"
}
enable_launch(bool) – enable VS Code integration.entry_module(string) – module to run in debug mode (e.g.my_service.app).debug_name(string, optional) – name of the debug configuration inlaunch.json.
If omitted, defaults toproject_name, or"Python: Run app"as a fallback.use_black_formatter(bool) – if true, configure VS Code to use Black as formatter and enableeditor.formatOnSave.extra_env(object, optional) – extra environment variables to set in the debug config (e.g.PYTHONPATH).cwd(string, optional) – working directory for the debug config (e.g.${workspaceFolder}).
The wizard merges into existing
.vscode/launch.json:
- it preserves existing configurations,
- and appends its own config if one with the same
namedoesn’t already exist.
It will only offer to overwrite the file if it’s not valid JSON.
CLI reference
setup-wizard [OPTIONS]
Options:
-
--config PATH
Use a specific config file instead of./setup_wizard.json. -
--python PATH_OR_CMD
Force the target Python interpreter for the virtualenv, e.g.
--python /usr/bin/python3.14or--python C:\Python314\python.exe. -
--check-only
Run only the health checks, assuming the environment is already set up.
No venv creation, no dependency installation. -
-y,--yes
Non-interactive / “auto-yes” mode for non-destructive steps. The wizard will still log what it does, but won’t prompt for each confirmation.
Notes & limitations
-
The wizard cannot “activate” the virtualenv in your current shell (that’s a shell concern). It will create and use the venv for its own steps and then tell you how to activate it, e.g.:
# PowerShell .\.venv\Scripts\Activate.ps1 # cmd .\.venv\Scripts\activate.bat # bash/zsh source .venv/bin/activate
-
For
src/-style layouts (e.g.src/my_service/app.py), using:"app_import": "my_service.app", "vscode": { "extra_env": { "PYTHONPATH": "${workspaceFolder}/src" } }
lets both the health check and VS Code debug work out of the box.
If you run into something you’d like the wizard to automate (e.g. migrations, pre-commit install, docs preview), you can add new steps in your own fork or open an issue/PR to extend the core tool.
Project details
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 setup_wizard-0.1.5.tar.gz.
File metadata
- Download URL: setup_wizard-0.1.5.tar.gz
- Upload date:
- Size: 11.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d0f763747e7ae4f025f95c5b1caedf0b690c6c489cc878cbe22cf376cdef7550
|
|
| MD5 |
fdeabafb1e9c1eb32cc09169859279e8
|
|
| BLAKE2b-256 |
27c7c4edfc0be7851cd96df9930f24f090ad874fe1e5a5c47cec8a3e9d1470e1
|
File details
Details for the file setup_wizard-0.1.5-py3-none-any.whl.
File metadata
- Download URL: setup_wizard-0.1.5-py3-none-any.whl
- Upload date:
- Size: 17.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
abeb4e23c98af18ab708f9a3c0a0553576f73d5849259bc8ab33f89dff0b7adc
|
|
| MD5 |
592caf829d99bf49d597f06a359af12f
|
|
| BLAKE2b-256 |
578ac6fee2121982182295aebb0e96e95762091036962d0b81689a4f4802a845
|