Skip to main content

A simple .env file manager with IDE autocompletion support and global variable access

Project description

mydotenv

A simple Python package to manage environment variables in your .env file with command-line interface.

Installation

Using pipx (Recommended)

pipx install mydotenv

Using pip

pip install mydotenv

From Source

git clone https://github.com/banddude/mydotenv.git
cd mydotenv
pip install -e .

Usage

Command Line Interface

  1. Print a variable's value:
mydotenv API_KEY
  1. Add or update a variable:
mydotenv NEW_KEY=value
mydotenv "KEY_WITH_SPACES=value with spaces"
  1. Delete a variable:
mydotenv delete VARIABLE_NAME
  1. View all variables:
mydotenv

Custom Command Name

You can set a custom command name to use instead of mydotenv:

mydotenv --set-command dotman

Now you can use either mydotenv or dotman to run commands:

dotman NEW_KEY=value
dotman delete NEW_KEY

When you set a new command name, it replaces any previous custom command name.

Features

  • Manage environment variables from the command line
  • Set custom command names for easier use
  • Preserves comments and formatting in .env file
  • Handles values with spaces and special characters
  • Works from any directory
  • Creates and manages .env file in your current directory

Dependencies

  • python-dotenv >= 1.0.0

Configuration

  • The package stores its configuration in ~/.config/mydotenv/config.env
  • Custom command names are managed through symlinks in ~/.local/bin

License

MIT License - feel free to use this package in your projects!

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

mydotenv-0.2.1.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

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

mydotenv-0.2.1-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

Details for the file mydotenv-0.2.1.tar.gz.

File metadata

  • Download URL: mydotenv-0.2.1.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for mydotenv-0.2.1.tar.gz
Algorithm Hash digest
SHA256 5a9130b03558857c9d4e6e6efe8710fcdb140a1648c56f13d0012a7fa45a5e44
MD5 cb8bbf581ef017b8e5e68098b3d6d665
BLAKE2b-256 56b8e65ef152275420a00241979a390ee7b1068d8cc716d6ab8dc873e6ed0ad6

See more details on using hashes here.

File details

Details for the file mydotenv-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: mydotenv-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 7.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for mydotenv-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3b9591775a6fbf820c8033f781678e4e94c5eaf74a33cfc8632e3ba143174984
MD5 a38e64388c9ad5376b6b4b1afeacac02
BLAKE2b-256 270da7784d4a37cecb045522f9032d0858a3a3a25698ca2fabe4f13f6f52c8f8

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