Skip to main content

A CLI tool by DX Labs to manage project assets, starting with .env on S3

Project description

dxlabs

A Python CLI tool by DX Labs to manage project assets. Currently supporting .env file management and incremental, encrypted workspace synchronization on AWS S3.

Installation

pip install dxlabs

Usage

Initialize configuration

dxlabs init --bucket my-env-bucket --project my-project-name --profile my-aws-profile

Push local .env to S3

dxlabs env push --env development
# or scan and push all discovered .env files
dxlabs env push

Pull from S3 to local .env

dxlabs env pull --env staging
# or pull all files stored for the project
dxlabs env pull

List environment files on S3

dxlabs env list

Delete .env from S3

# Delete a specific environment
dxlabs env delete --env staging
# Delete a specific file path
dxlabs env delete --file .env.prod
# Delete ALL environment files for the project
dxlabs env delete --all

Synchronize a whole project directory between machines

dxlabs workspace lets you carry a project directory between machines that don't share a network (e.g. a work PC and a home PC) via S3, uploading only what changed since the last push, encrypted with AES-256. Both commands always operate on the current directory — run them from the root of the project you're synchronizing.

# On the source machine: package + upload everything added/modified/deleted
# since the last push. You'll be prompted for an encryption password.
cd "D:\Projects\MyApp"
dxlabs workspace push

# On the destination machine: download and apply every pending package,
# in order, bringing the current directory in sync.
cd "D:\Projects\MyApp"
dxlabs workspace pull

# Preview what a push/pull would do, without uploading, downloading, or
# changing anything (still prompts for the password, since pull preview
# needs to decrypt each pending package's manifest to know what's inside).
dxlabs workspace push --preview
dxlabs workspace pull --preview

The password is never stored — it's requested via a hidden prompt on every run. To automate push/pull non-interactively (e.g. in a script), set the DXLABS_WORKSPACE_PASSWORD environment variable instead of the prompt. The first push always packages the entire directory; subsequent pushes only package the diff. State is tracked on S3 (so push can run from any machine) plus a small local .dxlabs.workspace-state.json marker in the current directory (so pull knows which packages it already applied) — add it to .gitignore.

Unlike env, files are keyed by a random opaque workspace_id rather than the project's name — WORKSPACE/{workspace_id}/... instead of WORKSPACE/{project}/... — so guessing/knowing the project name alone isn't enough to find it. This ID is generated once on dxlabs init and stored in .dxlabs.json. Every push also leaves a single empty marker object under a purely cosmetic sibling folder, WORKSPACE/{workspace_id}-{project}/ — this lets you tell which project a workspace_id folder belongs to when browsing the S3 console, but no real data is ever stored there.

If .dxlabs.json doesn't have a workspace_id yet (e.g. it predates this feature, or was never copied from the machine that ran init), workspace push/pull refuse to run and print a suggested ID instead of silently generating one — copy the existing workspace_id from the other machine if this project was already pushed, otherwise add the suggested one.

Features

  • Multi-Environment Support: Specify environments like dev, staging, prod.
  • S3 Backend: Secure storage in your own AWS S3 bucket with full S3 URI visibility.
  • Batch Operations: Push or pull all environment files in one command.
  • CI/CD Integration: Supports AWS environment variables for credentials.
  • Encrypted Workspace Sync: Carry a whole project directory between machines via S3, uploading only incremental, AES-256 encrypted diffs.

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

dxlabs-0.1.6.tar.gz (21.8 kB view details)

Uploaded Source

Built Distribution

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

dxlabs-0.1.6-py3-none-any.whl (22.4 kB view details)

Uploaded Python 3

File details

Details for the file dxlabs-0.1.6.tar.gz.

File metadata

  • Download URL: dxlabs-0.1.6.tar.gz
  • Upload date:
  • Size: 21.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for dxlabs-0.1.6.tar.gz
Algorithm Hash digest
SHA256 5f4c8a1105546bd7f0cfcbf13a7c9322ce1b57ff4368a6f03a977e632b795835
MD5 11b4f2b1e667d50e10bc3698cae1521e
BLAKE2b-256 a75acdd28cbd8cced4c71dd1b66a5bc3bb76e074a2925f3ade7d3e90a26a791b

See more details on using hashes here.

File details

Details for the file dxlabs-0.1.6-py3-none-any.whl.

File metadata

  • Download URL: dxlabs-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 22.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for dxlabs-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 a92f1c30a0364a4ae629ed9c05c9367fb3322aea0306c68014a74fe3cf1f84ed
MD5 cdfb341c8cca7a817ce74232c032b0f6
BLAKE2b-256 5d3983a2121eaac089108f2671dc699a1c763d3074de98fb2b6db340f6dd5d31

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