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.5.tar.gz (16.4 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.5-py3-none-any.whl (17.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dxlabs-0.1.5.tar.gz
  • Upload date:
  • Size: 16.4 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.5.tar.gz
Algorithm Hash digest
SHA256 3d56977bd315a6b090cddcb13151e040000e9706ed33f4784f94ba33845279df
MD5 d120d601c5d85459571aa32f7f914444
BLAKE2b-256 56cf1a7ae0b4306af9d2282a56ccf6b70fe3119312b4c6ba35a3ad37913fe6f5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dxlabs-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 17.0 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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 06e8b196f5f54f0818011f3ec00bb23f4322427b069733014210c250e820df78
MD5 227e195d76d14cc57a93e714c7d9f346
BLAKE2b-256 4bfef7071f51f84034ff7cc9705fe2053410940769554d2cc11e472d7915a0d4

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