polyenv

command module
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 12, 2025 License: MIT Imports: 2 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

polyenv

polyenv is a CLI tool that allows you to to grab secrets directly from your enterprise vaults and either save them to local .env file or output them to terminal. for now only Azure Keyvault is supported, but more will be available in the future.

Features

  • Initialize a .polyenv file for syncing. this can be used with your git repo
  • Push secrets from .env file to your remote vault
  • Pull secrets from remote vault to .env file

Installation

check release page here to download the application

Usage

Commands
  1. Initialize a .env file for syncing:
polyenv init [--path <path-to-env-file>]
  1. Push secrets to vault:
polyenv push [--path <path-to-env-file>]
  1. Pull secrets from vault:
polyenv pull [--path <path-to-env-file>]
Options
  • --path, -p: Specify the path to the .env file (default: "local.env")
  • --debug: Enable debug mode

Developer Information

Project Structure
  • cmd/: Contains the Cobra command implementations
  • internal/: Internal packages
    • tools/: Utility functions
    • vaults/: Vault implementations (currently Azure Key Vault)
  • main.go: Entry point of the application
Adding New Vaults

To add support for a new vault type:

  1. Create a new package under internal/vaults/
  2. Implement the Vault interface defined in internal/vaults/repository.go
  3. Update the NewInitVault function in repository.go to include the new vault type
Key Files
  • cmd/init.go: Handles the initialization wizard
  • cmd/push.go: Implements the push command
  • cmd/pull.go: Implements the pull command
  • internal/vaults/keyvault/wizard.go: Contains the Azure Key Vault-specific wizard implementation
  • internal/vaults/keyvault.go: Implements the Vault interface for Azure Key Vault
Environment Variables

The tool uses Azure SDK's DefaultAzureCredential for authentication. Make sure the appropriate environment variables or configuration files are set up for Azure authentication.

Contributing

(Add contribution guidelines here)

License

(Add license information here)

This README provides an overview of the project, its commands, and essential information for developers. You may want to expand on certain sections, such as installation instructions, contribution guidelines, and licensing information, based on your specific project requirements.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal
tui
vaults/keyvault
notify:@withholm
notify:@withholm

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL