Metadata-Version: 2.4
Name: pyshipit
Version: 0.1.0
Summary: Publish Python packages without the pain — init, build, bump, check, publish.
License: MIT
Project-URL: Homepage, https://github.com/yourusername/pyshipit
Project-URL: Issues, https://github.com/yourusername/pyshipit/issues
Keywords: pypi,publish,packaging,cli,build,twine
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
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: Topic :: Software Development :: Build Tools
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: build
Requires-Dist: twine
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Dynamic: license-file

# 🚀 pyshipit

> Publish Python packages to PyPI without the pain. One CLI for init, build, bump, check, and publish.

[![Python 3.8+](https://img.shields.io/badge/python-3.8+-blue.svg)](https://www.python.org/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)

---

## 🤔 Why pyshipit?

Publishing a Python package today means juggling `pyproject.toml` syntax, `build`, `twine`, version bumps, and remembering to clean `dist/` every time. One typo and you get a cryptic 403 from PyPI.

`pyshipit` wraps the whole workflow into five simple commands.

```bash
pyshipit init      # interactively create pyproject.toml
pyshipit check      # verify your project is ready to publish
pyshipit build      # clean + build wheel and sdist
pyshipit bump patch  # 1.0.0 → 1.0.1
pyshipit publish     # upload to PyPI with helpful error messages
```

---

## 📦 Installation

```bash
pip install pyshipit
```

---

## 🚀 Quick Start

```bash
mkdir my-new-package && cd my-new-package
pyshipit init
# answers a few questions, writes pyproject.toml + README.md

pyshipit check
# ✅ pyproject.toml found
# ✅ Version found: 0.1.0
# ⚠️  No LICENSE file found

pyshipit build
# ✅ Build complete! 2 files in dist/

pyshipit publish
# uploads dist/* to PyPI, with __token__ guidance built in
```

---

## 📖 Commands

### `pyshipit init`
Interactively generates a complete `pyproject.toml` — asks for name, version, description, author, license, dependencies, keywords, and whether it's a CLI tool (adds an entry point automatically).

### `pyshipit check`
Runs a pre-publish checklist:
- pyproject.toml exists and has a valid version
- README.md / LICENSE present
- Package folder has `__init__.py` with real content
- `build` and `twine` are installed

```
🔍 pyshipit check

  ✅ pyproject.toml found
  ✅ Version found: 0.1.0
  ✅ README.md found (842 bytes)
  ⚠️  No LICENSE file found
     → Add a LICENSE file (MIT is common)
  ✅ Package folder(s) found: mypackage
  ✅ mypackage/__init__.py has content
  ⚠️  No dist/ folder found
     → Run 'pyshipit build' to build first
  ✅ 'build' is installed
  ✅ 'twine' is installed

  Results: 6 passed  |  2 warnings  |  0 failed

✨ Ready to publish (with minor warnings). Run 'pyshipit publish'.
```

### `pyshipit build`
Cleans old `dist/`, `build/`, and `*.egg-info` folders, then runs `python -m build`, and lists the resulting files with sizes.

### `pyshipit bump <major|minor|patch>`
Bumps the version in `pyproject.toml` using semantic versioning rules.

```bash
pyshipit bump patch   # 1.2.3 → 1.2.4
pyshipit bump minor   # 1.2.3 → 1.3.0
pyshipit bump major   # 1.2.3 → 2.0.0
```

### `pyshipit publish`
Runs `twine upload dist/*`, but first shows exactly what will be uploaded, reminds you to use `__token__` as the username, and on failure prints the most common fixes (name taken, bad token, version already exists).

---

## 🆚 pyshipit vs the manual way

| Task | Manual | pyshipit |
|---|---|---|
| Create pyproject.toml | Copy a template, edit by hand | `pyshipit init` |
| Clean + build | `rm -rf dist build *.egg-info && python -m build` | `pyshipit build` |
| Bump version | Find and edit the line by hand | `pyshipit bump patch` |
| Pre-flight checks | None — find out via a 403 error | `pyshipit check` |
| Publish | Remember twine syntax + token format | `pyshipit publish` |

---

## 🧪 Running Tests

```bash
pip install pytest
pytest tests/ -v
```

---

## 📄 License

MIT — free to use in personal and commercial projects.

---

## 🤝 Contributing

Pull requests welcome! Open an issue first to discuss any large changes.

1. Fork the repo
2. Create a branch: `git checkout -b feature/my-feature`
3. Make your changes + add tests
4. Open a Pull Request
