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

Uploaded Python 3

File details

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

File metadata

  • Download URL: dxlabs-0.1.7.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.7.tar.gz
Algorithm Hash digest
SHA256 468084f1c69be9583543b407aafddf009cbed75251bdace7d8bbc1f6cee24dcb
MD5 077dab4f72be18c7b552bc5f93700deb
BLAKE2b-256 a86397712bd5db2cff329af0e7cfde4a54e8f4573927a02cceccbdd281c46f1a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dxlabs-0.1.7-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.7-py3-none-any.whl
Algorithm Hash digest
SHA256 60e7ac8a0bbb11888adf98439dad0517c671842d4f1cf66819f5c9ddf81461f6
MD5 ebbf638953521069af5836d9a3f90e0b
BLAKE2b-256 90c42c23bf890704ef56e2f277ba7712a5470961c3d4c0b71c53240a27f6fe8d

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