Metadata-Version: 2.4
Name: pip-package-creator
Version: 0.1.0
Summary: Interactive TUI wizard that scaffolds a complete, production-ready PyPI package for you.
Author-email: Hikaro <1cz1@users.noreply.github.com>
Maintainer-email: Hikaro <1cz1@users.noreply.github.com>
License-Expression: MIT
Project-URL: Homepage, https://github.com/1cz1/pip-package-creator
Project-URL: Repository, https://github.com/1cz1/pip-package-creator
Project-URL: Documentation, https://github.com/1cz1/pip-package-creator
Project-URL: Bug Tracker, https://github.com/1cz1/pip-package-creator/issues
Keywords: pypi,scaffold,scaffolder,cli,package,template,wizard,developer-tools,devtools,python-packaging,hikaro,cybersecurity
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Code Generators
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: InquirerPy>=0.3.4
Requires-Dist: Jinja2>=3.1
Requires-Dist: packaging>=23.0
Requires-Dist: rich>=13.0
Requires-Dist: typer>=0.9
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Requires-Dist: pytest-cov>=4.0; extra == "dev"
Requires-Dist: ruff>=0.4; extra == "dev"
Requires-Dist: mypy>=1.8; extra == "dev"
Requires-Dist: pre-commit>=3.5; extra == "dev"
Dynamic: license-file

# pip-package-creator

> The **1-line** way to create a complete, production-ready **PyPI package** —
> no templates to copy, no config to wrestle with.

`pypkg` asks you a few simple questions (package name, author, license, which
tools you want), validates everything as you type, and builds the whole project
for you: source layout, `pyproject.toml`, tests, linting, CI, docs — and even
offers to `git init` and publish the first release.

Works on **Windows**, **Linux** and **macOS**. 🐍

---

## 🚀 Install (the 1 line)

```bash
pipx install pip-package-creator
```

> Don't have `pipx`? Install it once with `python -m pip install --user pipx`,
> or use the plain-pip alternative below.

### Alternatives

```bash
# classic pip (installs into your current Python)
python -m pip install --user pip-package-creator

# before the PyPI release, install straight from GitHub
python -m pip install git+https://github.com/1cz1/pip-package-creator
```

After installing you get the **`pypkg`** command:

```bash
pypkg --version
```

---

## ✨ Quick start

```bash
pypkg
```

That's it. The wizard walks you through everything:

1. **Package name** — checked live against PyPI so you don't pick a taken name.
2. **Author info** — automatically filled from your `git config` (press Enter).
3. **License, Python version, build backend** — sensible defaults everywhere.
4. **Tooling** — tick ruff, mypy, pytest, pre-commit with the spacebar.
5. **Finish options** — `git init`, GitHub repo, editable install, build check.

Before anything is written to disk you see a **review screen** where you can
edit any answer. Then `pypkg` scaffolds the project into a new folder named
after your package.

> **Tip:** just press `Enter` to accept every default — you'll have a working
> package in under a minute.

---

## 📦 What you get

```
your-package/
├── .github/workflows/
│   ├── ci.yml                 # lint + test on every push / PR
│   └── publish.yml            # build + publish to PyPI on version tags
├── docs/                      # mkdocs scaffold (optional)
├── src/your_package/          # src-layout (recommended)
│   ├── __init__.py            # friendly docstring, public API
│   ├── _version.py            # single source of truth for the version
│   ├── py.typed               # PEP 561 marker for type checkers
│   ├── core.py                # sample module with a documented function
│   └── cli.py                 # optional console-script entry point
├── tests/
│   └── test_core.py           # pytest tests wired into CI
├── .gitignore
├── .pre-commit-config.yaml    # optional
├── CHANGELOG.md
├── LICENSE
├── README.md
└── pyproject.toml             # full metadata, extras, tool configs
```

| Feature | What it does |
| --- | --- |
| Live name check | Confirms your package name isn't already taken on PyPI |
| Smart validation | PEP 508 names, PEP 440 versions, emails, Python requires |
| Two build backends | setuptools or hatchling, both src-layout aware |
| 8 embedded licenses | MIT, Apache-2.0, BSD-3-Clause, GPL-3.0, LGPL-3.0, ISC, MPL-2.0, CC0 |
| Batteries included | ruff, mypy, pytest, coverage, pre-commit, GitHub Actions |
| Auto-publish | `publish.yml` builds and uploads to PyPI when you tag a release |
| Git & GitHub | `git init` + first commit, optional `gh repo create` + push |
| Review & edit | final review screen lets you change any answer first |
| Scriptable | full non-interactive mode via `--answers` |
| Cross-platform | pure Python, works on Windows / Linux / macOS |

---

## 🤖 Non-interactive mode (scripting / CI)

```bash
pypkg --answers answers.json
```

The JSON file may contain **any subset** of the wizard answers — missing keys
fall back to sensible defaults.

```json
{
  "package_name": "my-awesome-tool",
  "version": "0.1.0",
  "description": "Does wonderful things.",
  "author_name": "Ada Lovelace",
  "author_email": "ada@example.com",
  "license_key": "MIT",
  "python_requires": ">=3.10",
  "build_backend": "hatchling",
  "dependencies": ["requests>=2.31", "click>=8.0"],
  "include_ruff": true,
  "include_mypy": true,
  "include_pytest": true,
  "include_pre_commit": true,
  "include_ci": true,
  "include_publish": true,
  "include_docs": false,
  "include_cli_entry_point": true,
  "use_src_layout": true,
  "git_init": true,
  "create_github_repo": false,
  "editable_install": false,
  "verify_build": false
}
```

---

## 📖 Command reference

```
pypkg [OPTIONS]

Options:
  --answers FILE        JSON file with answers (skips the interactive wizard).
  --name TEXT           Package name (non-interactive convenience flag).
  --output-dir PATH     Directory to create the project in. Default: current dir.
  --skip-pypi-check     Skip the live PyPI availability check.
  --list-licenses       List all supported licenses and exit.
  --version             Show the tool version and exit.
  --help                Show this message and exit.
```

---

## 🎓 Need more help with packaging?

pip-package-creator handles the boilerplate, but understanding the ecosystem
makes you dangerous:

- **[Python Packaging User Guide](https://packaging.python.org/)** — the
  official tutorial, from `pyproject.toml` to publishing.
- **[PyPI Documentation](https://docs.pypi.org/)** — accounts, project
  publishing, and best practices.
- **[PyPI Trusted Publishing](https://docs.pypi.org/trusted-publishers/)** —
  the secure, token-free way to let CI publish for you (used by `publish.yml`).
- **[PEP 621](https://peps.python.org/pep-0621/)** — the standard for
  `pyproject.toml` metadata that every modern tool reads.

---

## 🛠 Development of this tool

```bash
git clone https://github.com/1cz1/pip-package-creator.git
cd pip-package-creator
python -m venv .venv
.venv\Scripts\activate        # Windows
source .venv/bin/activate     # Linux / macOS
python -m pip install -e ".[dev]"
```

Run the same checks CI runs:

```bash
ruff check .
ruff format --check .
mypy src/pip_package_creator
pytest
```

---

## License

[MIT](LICENSE)

---

## Author

Built by **Hikaro** — cybersecurity enthusiast and developer.

- 🐙 GitHub: [@1cz1](https://github.com/1cz1)
- 📸 Instagram: [@Hikaro.yy](https://instagram.com/Hikaro.yy)
