An open-source tool for developers to automate deployment tasks, including file uploads and remote command execution.
Project description
deploy-4-developer
deploy-4-developer is a lightweight deployment automation tool designed for developers. It reads a structured deploy.json configuration file to help you upload local build artifacts to a remote host, execute commands on the remote host, and perform local cleanup tasks—simplifying deployments for development and test environments.
This document targets first-time users and covers installation, quick start, configuration format, and common troubleshooting.
Installation
Install the package from PyPI:
# Install from PyPI (recommended)
pip install deploy-4-developer
After installation, the package will install a console script into the current Python interpreter's scripts directory (example name: deploy4dev, defined by project.scripts in pyproject.toml).
Notes:
- If you install inside a virtual environment and activate it, the console script will be available in the activated environment:
# Activate (example) - PowerShell
.\.venv\Scripts\Activate.ps1
deploy4dev -d deploy.json
- If you installed for your user or system but
deploy4devis not in your global PATH, here is how to locate and temporarily add the scripts directory to PATH (PowerShell example):
Temporarily add the scripts directory to the current PowerShell session PATH (lost after restarting the shell):
$scripts = python -c "import sysconfig; print(sysconfig.get_path('scripts'))"
$env:Path += ";$scripts"
# Now run
deploy4dev -d deploy.json
Permanently add the scripts directory to the current user's PATH (writes to user environment variables):
[Environment]::SetEnvironmentVariable('Path', $env:Path + ';' + (python -c "import sysconfig; print(sysconfig.get_path('scripts'))"), 'User')
# You may need to restart the terminal or re-login for changes to take effect
Verify installation:
Get-Command deploy4dev -ErrorAction SilentlyContinue
# or (on systems with which)
which deploy4dev
If these commands return a path, deploy4dev is installed correctly and can be run from any shell.
Quick Start
Sample configuration
{
"host": "hostname or ip",
"user": "user",
"password": "@env:env_name",
"pre-actions": [
"tarz -i deployment service namespace serviceaccount ingress example-component"
],
"actions": [
"mv /remote/path/app /remote/path/app_`date +%Y%m%d%H%M%S` ",
{
"type": "upload",
"from": "C:\\path\\to\\app.tar.gz",
"to": "/remote/path/app.tar.gz"
},
"mkdir -p /remote/path/app",
"tar -zxvf /remote/path/app.tar.gz -C /remote/path/app",
"rm -f /remote/path/app.tar.gz",
"kubectl apply -f /remote/path/app/deployment.yaml",
"kubectl rollout restart deployment.apps/example-deployment"
],
"post-actions": ["del /f C:\\path\\to\\app.tar.gz"]
}
About the password field:
- You may omit the
passwordfield indeploy.json(recommended for interactive or local runs). If the configuration file does not include a password, the CLI will prompt you to enter one at runtime (input is hidden). - If you want to reference a password from the environment, use the environment placeholder form, for example
"password": "@env:env_name". The program will read the value from the operating system environment variableenv_name. Do not store plain-text passwords in the configuration file.
Start a deployment
# This will read deploy.json in the current directory and start the deployment
deploy4dev
# You can specify another config file with -d (default is deploy.json). Example:
deploy4dev -d deploy-staging.json
Logs & Troubleshooting
- Common failures: remote SSH not running, unreachable host, environment variables not injected, incorrect file paths, or permission issues.
- Upload failures: verify the local file path and remote directory permissions.
- Remote commands produce no output or fail: break the steps down in
deploy.jsonand test each command directly on the remote host.
Developer Notes & Contributing
- Source code location:
src/deploy_4_developer/cli. - Local development suggestions:
git clone git@github.com:Byte-Biscuit/deploy-4-developer.git
# Change to project directory
cd deploy-4-developer
# The project uses uv for build management; make sure your uv environment is ready
uv sync
- Contributions via issues and pull requests are welcome.
License
This project is licensed under the MIT License. See the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
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 deploy_4_developer-0.0.2.tar.gz.
File metadata
- Download URL: deploy_4_developer-0.0.2.tar.gz
- Upload date:
- Size: 41.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3c0b47033f84c73e0dbfe53a71af334fac4afa2b3c903eefeab9fffbf75d628b
|
|
| MD5 |
892f61491a78458c83babf6a10c4e274
|
|
| BLAKE2b-256 |
3b7013c0f109ecea6bea03bb3786883b15cef9f7c801575321dcf5a5730cc7a8
|
Provenance
The following attestation bundles were made for deploy_4_developer-0.0.2.tar.gz:
Publisher:
python-publish.yml on Byte-Biscuit/deploy-4-developer
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
deploy_4_developer-0.0.2.tar.gz -
Subject digest:
3c0b47033f84c73e0dbfe53a71af334fac4afa2b3c903eefeab9fffbf75d628b - Sigstore transparency entry: 584819484
- Sigstore integration time:
-
Permalink:
Byte-Biscuit/deploy-4-developer@89eccc495c7edf93de61cc66e7dd667eecd15d86 -
Branch / Tag:
refs/tags/v0.0.2 - Owner: https://github.com/Byte-Biscuit
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@89eccc495c7edf93de61cc66e7dd667eecd15d86 -
Trigger Event:
release
-
Statement type:
File details
Details for the file deploy_4_developer-0.0.2-py3-none-any.whl.
File metadata
- Download URL: deploy_4_developer-0.0.2-py3-none-any.whl
- Upload date:
- Size: 8.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
03669cf1da0adb24de0041c420a80c3b94b4874a2608d5efbba7294689cb070c
|
|
| MD5 |
eceb9b2189ea111a54f8664b880a4ec4
|
|
| BLAKE2b-256 |
80238ac3bec78ab39cd230cd80d39585230acb0e6395ee0a11889a8b8b4e90d7
|
Provenance
The following attestation bundles were made for deploy_4_developer-0.0.2-py3-none-any.whl:
Publisher:
python-publish.yml on Byte-Biscuit/deploy-4-developer
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
deploy_4_developer-0.0.2-py3-none-any.whl -
Subject digest:
03669cf1da0adb24de0041c420a80c3b94b4874a2608d5efbba7294689cb070c - Sigstore transparency entry: 584819485
- Sigstore integration time:
-
Permalink:
Byte-Biscuit/deploy-4-developer@89eccc495c7edf93de61cc66e7dd667eecd15d86 -
Branch / Tag:
refs/tags/v0.0.2 - Owner: https://github.com/Byte-Biscuit
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@89eccc495c7edf93de61cc66e7dd667eecd15d86 -
Trigger Event:
release
-
Statement type: