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.8.tar.gz (22.3 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.8-py3-none-any.whl (22.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dxlabs-0.1.8.tar.gz
  • Upload date:
  • Size: 22.3 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.8.tar.gz
Algorithm Hash digest
SHA256 55f891d1dfbfaf0909826b6e90cc4b18f6a482cdc53ca59f783cf397a0206977
MD5 054d5ff7a9ba74c5fbced7a26431f3b4
BLAKE2b-256 f452afb7eae855ea0b1b869a2825121ea323173d76520ae2634e99355c5855a3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dxlabs-0.1.8-py3-none-any.whl
  • Upload date:
  • Size: 22.9 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.8-py3-none-any.whl
Algorithm Hash digest
SHA256 9210597e72abf7747813d309b789cae53c57ed2a22f1c3524722e69a797a13d5
MD5 1ddcc7088e53da453ea224ea34620bf0
BLAKE2b-256 a1b2d3de6248449389226ecb21077b1cddfdcfe34a563a5f100c94387a6bae52

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