-
Notifications
You must be signed in to change notification settings - Fork 5
Deploy PyPI
This guide documents how to publish the skilz package to PyPI.
Browse skills: skillzwave.ai — The largest agent and agent skills marketplace Built by: Spillwave — Leaders in agentic software development
| Field | Value |
|---|---|
| Package Name | skilz |
| CLI Command | skilz |
| Install Command | pip install skilz |
| PyPI URL | https://pypi.org/project/skilz/ |
| TestPyPI URL | https://test.pypi.org/project/skilz/ |
The following tools are required (install globally or in your environment):
pip install build twineBefore deploying, run the comprehensive E2E test suite to ensure all functionality works:
# Run full E2E test suite (tests all major features)
./scripts/end_to_end.sh
# Run API integration tests (tests marketplace endpoints)
./scripts/test_api_integration.sh
# Run REST marketplace tests (tests live API with real data)
./scripts/test_rest_marketplace_e2e.sh
# Run bug fix regression tests (tests recent fixes)
./scripts/test_bug_fixes_e2e.shE2E Test Coverage:
- ✅ Marketplace ID installation (
skilz install owner_repo/skill) - ✅ Git URL installation (
skilz install https://github.com/...) - ✅ Local file installation (
skilz install -f path/to/skill) - ✅ All supported agents (Claude, OpenCode, Gemini, Codex, Copilot, Universal)
- ✅ Project-level installations (
--projectflag) - ✅ Custom config file targeting (
--config FILE) - ✅ List, remove, search, and visit commands
- ✅ API endpoint validation and error handling
- ✅ Regression testing for recent bug fixes
- Create account: https://pypi.org/account/register/
- Enable 2FA: Account Settings → Two-Factor Authentication
-
Create API token: https://pypi.org/manage/account/token/
- Name:
skilz-cli-publish - Scope: "Entire account" (first publish) or project-scoped (subsequent)
- Name:
Create ~/.pypirc:
[distutils]
index-servers =
pypi
testpypi
[pypi]
username = __token__
password = pypi-YOUR_TOKEN_HERE
[testpypi]
username = __token__
password = pypi-YOUR_TESTPYPI_TOKEN_HEREImportant: Set file permissions to protect your tokens:
chmod 600 ~/.pypircSkilz uses a comprehensive multi-layer testing approach:
- Unit Tests: 633+ tests covering individual functions and modules
- Integration Tests: API client and config sync testing
- E2E Tests: Real-world scenario testing with isolated environments
- Regression Tests: Bug fix validation with before/after testing
-
task checkpasses (lint + typecheck + test) -
./scripts/end_to_end.shpasses (full feature test) -
./scripts/test_rest_marketplace_e2e.shpasses (live API test) -
./scripts/test_bug_fixes_e2e.shpasses (regression test) - Version updated in
pyproject.toml(single source of truth) - CHANGELOG.md updated with release notes
- GitHub release created and tagged
# Full pipeline: clean → check → test → build → publish
task publishtask release:checkThis runs:
-
clean- Remove build artifacts -
lint- Ruff linting -
typecheck- mypy type checking -
format:check- Code formatting verification -
coverage:check- Tests with 80% coverage requirement
task release:buildCreates in dist/:
-
skilz-X.Y.Z.tar.gz- Source distribution -
skilz-X.Y.Z-py3-none-any.whl- Wheel (binary)
task publish:testVerify the test release:
pip install -i https://test.pypi.org/simple/ skilz
skilz --versiontask publishpip install --upgrade skilz
skilz --versionSingle Source of Truth: pyproject.toml (line 7)
The version is defined ONLY in pyproject.toml:
[project]
version = "1.9.0"The Python package reads this dynamically at runtime via importlib.metadata:
# src/skilz/__init__.py
from importlib.metadata import version
__version__ = version("skilz") # Reads from pyproject.tomlBefore releasing, only update pyproject.toml. No other files need version changes.
Note: Previous versions required updating both pyproject.toml AND __init__.py. This was fixed in 1.7 to use dynamic version detection, eliminating version sync issues.
| Command | Description |
|---|---|
task release:check |
Run all quality checks |
task release:build |
Build source and wheel distributions |
task publish:test |
Upload to TestPyPI |
task publish |
Upload to production PyPI |
task clean |
Remove build artifacts |
task ci |
Full CI pipeline |
PyPI doesn't allow re-uploading the same version. Bump the version number.
Check your ~/.pypirc file:
- Token must start with
pypi- - Username must be
__token__(literal string)
TestPyPI may not have all dependencies. Install from regular PyPI first:
pip install pyyaml
pip install -i https://test.pypi.org/simple/ skilzEnsure you have the build tools:
pip install --upgrade build hatchling-
Never commit
~/.pypircor tokens to git - Use project-scoped tokens after first publish
- Enable 2FA on your PyPI account
- Consider using Trusted Publishers (GitHub Actions OIDC) for CI/CD
For automated releases via GitHub Actions, see:
- PyPI Trusted Publishers: https://docs.pypi.org/trusted-publishers/
- GitHub Actions workflow example in
.github/workflows/