Skip to main content

A utility for managing .env files using Google Cloud Secret Manager

Project description

grasp-env-handler

A utility for managing .env files using Google Cloud Secret Manager for Grasp teams.

Overview

This tool helps Grasp teams securely manage their .env files by storing them in Google Cloud Secret Manager. It uses your GitHub repository name to organize secrets logically and provides simple commands to push and pull environment variables across your team.

Features

  • Pull .env files from Secret Manager with grasp env pull
  • Push .env files to Secret Manager with grasp env push
  • Support for recursive operations with the -r flag
  • Ignore specific .env files with .envignore

Installation

With pip:

pip install git+https://github.com/username/grasp-env-handler.git

With uv:

uv pip install git+https://github.com/username/grasp-env-handler.git

Development Installation

For development:

# Clone the repository
git clone https://github.com/username/grasp-env-handler.git
cd grasp-env-handler

# With pip
pip install -e .

# With uv
uv pip install -e .

Requirements

  • Python 3.8+
  • Google Cloud SDK installed and configured
  • Git repository connected to GitHub

GCP Setup

Before using this tool, make sure:

  1. You have the Google Cloud SDK installed
  2. You are authenticated with GCP: gcloud auth login
  3. You have set a default project: gcloud config set project YOUR-PROJECT-ID
  4. The Secret Manager API is enabled in your project: gcloud services enable secretmanager.googleapis.com
  5. You have the necessary permissions to create and access secrets

Usage

# Pull all .env files in current directory
grasp env pull

# Pull .env files recursively from all subdirectories
grasp env pull -r

# Push all .env files in current directory
grasp env push

# Push .env files recursively from all subdirectories
grasp env push -r

.envignore

Create a .envignore file in your repository to exclude specific .env files:

# Example .envignore
path/to/secret.env
*.test.env

See .envignore.example for more examples.

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

grasp_env_handler-0.1.0.tar.gz (5.5 kB view details)

Uploaded Source

Built Distribution

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

grasp_env_handler-0.1.0-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

Details for the file grasp_env_handler-0.1.0.tar.gz.

File metadata

  • Download URL: grasp_env_handler-0.1.0.tar.gz
  • Upload date:
  • Size: 5.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.1

File hashes

Hashes for grasp_env_handler-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6e48cebdb1abd801f0cbe25781e07b055654ba3f05d5852ee58a1ff8f61d5d3e
MD5 a09807e999f1160bf487236518ebbd91
BLAKE2b-256 d9309cc59ceca45fe402106ba37781e2d7371ff37f9e6f6b58b605ae99dee931

See more details on using hashes here.

File details

Details for the file grasp_env_handler-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for grasp_env_handler-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c02bd598b32a29c4db879082da47b7293d82e253bd5d68fa4ba13a8857a23f62
MD5 4843ef0f718f22114188328aa774d89e
BLAKE2b-256 683a531ad9a8035ba6defbe1cb25ac23c4556189ca642c5bcbfc817e3ff8cbf5

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