Skip to main content

Security-focused modular developer multi-tool CLI.

Project description

Developer Utility Toolkit

CI Security Coverage

Security-focused, modular, format-aware Python CLI for common developer tasks.

Features

  • Automatic input detection for text, JSON, XML, Base64, URL, and file extension types
  • Direct format conversion using a plugin-based transformer registry
  • JSON and XML formatting, minification, and validation
  • Encoding tools (Base64 and URL encode/decode)
  • Image pixelation utility (optional pillow)
  • Sitemap generator and sitemap fetcher with URL validation and request timeouts
  • Local command history (~/.developer_utility_toolkit/history/history.jsonl)

Architecture

  • src/toolkit/core: abstractions, registry, detector, and safe I/O helpers
  • src/toolkit/transformers: pluggable one-step transformers
  • src/toolkit/formatters: JSON/XML format/minify/validate services
  • src/toolkit/image_tools: image utilities
  • src/toolkit/web_tools: sitemap generation/fetching
  • src/toolkit/history: local history service
  • src/toolkit/cli.py: Typer entrypoint and command wiring

Design choices:

  • No chained transformations by default (one direct transform per request target)
  • Safe XML parsing via defusedxml
  • Controlled output writes via sanitized filename + output directory constraints
  • Clear failure modes with explicit non-zero exit codes

Installation

python -m pip install --upgrade pip
pip install .

Install all optional features:

pip install ".[all]"

Install directly from GitHub:

pip install "git+https://github.com/artenisalija/developer-utility-kit.git"

Install a specific version tag (recommended):

pip install "git+https://github.com/artenisalija/developer-utility-kit.git@v0.1.1"

Install from GitHub with all extras:

pip install "developer-utility-toolkit[all] @ git+https://github.com/artenisalija/developer-utility-kit.git@v0.1.1"

Install developer tooling:

pip install ".[all,dev]"

Usage

toolkit analyze --text '{"name":"dev"}'
toolkit convert --from text --to base64 --text "hello"
toolkit format --kind json --text '{"b":2,"a":1}'
toolkit validate --kind xml --text '<root><a>1</a></root>'
toolkit minify --kind json --text '{"b":2,"a":1}'
toolkit image pixelate --input-file ./input.png --output-name output.png
toolkit sitemap generate --base-url https://example.com --path / --path /docs
toolkit sitemap fetch --url https://example.com/sitemap.xml
toolkit recent show --limit 10

Security Philosophy

  • Secure defaults and explicit input validation
  • Defused XML parser to prevent XXE/entity expansion attacks
  • No eval/exec usage
  • Timeout-controlled network calls
  • Sanitized output file names with constrained output directories
  • Graceful errors with explicit status codes

Development

Run local quality gates:

ruff check .
black --check .
mypy src tests
pytest
bandit -r src -ll
pip-audit --strict
safety check --full-report

Pre-commit:

pre-commit install
pre-commit run --all-files

CI/CD

  • ci.yml: lint + format + mypy + tests + coverage (>=85%) on Python 3.11/3.12
  • security.yml: Bandit + pip-audit + Safety
  • release.yml: runs on version tags (v*.*.*), builds wheel/sdist, runs tests, publishes to PyPI, creates GitHub release notes
  • Dependabot enabled for Python packages and GitHub Actions

Publishing to PyPI

  1. Create a PyPI API token.
  2. Add PYPI_API_TOKEN in GitHub repository secrets.
  3. Bump version in pyproject.toml.
  4. Tag and push:
    git tag v0.1.1
    git push origin v0.1.1
    
  5. GitHub Action release.yml publishes automatically.

Build Standalone Executable

pip install pyinstaller
pyinstaller --onefile --name toolkit src/toolkit/cli.py

The executable will be available under dist/.

Contribution Guidelines

  1. Create a branch for your change.
  2. Add or update tests.
  3. Run all local quality checks and security scans.
  4. Open a pull request with rationale and risk notes.

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

developer_utility_toolkit-0.1.1.tar.gz (16.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

developer_utility_toolkit-0.1.1-py3-none-any.whl (17.9 kB view details)

Uploaded Python 3

File details

Details for the file developer_utility_toolkit-0.1.1.tar.gz.

File metadata

File hashes

Hashes for developer_utility_toolkit-0.1.1.tar.gz
Algorithm Hash digest
SHA256 a9e1296fd1734fee8d49785d2c335035d477e991e819dbdeefa0770367db6fae
MD5 f605d21d16c1306117379b15071448fb
BLAKE2b-256 d04af44568163b9a80d40c8627d1070474df81fba0ee449d274a915aafe83500

See more details on using hashes here.

File details

Details for the file developer_utility_toolkit-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for developer_utility_toolkit-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6e451f83a296e1519a6b802d58c3c489cea973eebbb52b481d19973b9fa02b82
MD5 21552a77da2baab541ce5d6c5ca8d7ca
BLAKE2b-256 26011b2a0357d6307fe932ee37d18c2054ee8ab607d034be612fbd6ff67b4a80

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page