Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tyhopp/lenv
Manage symlinks from a root file to multiple destinations
https://github.com/tyhopp/lenv
cli env environment-variables go golang monorepo wasi wasm zero-dependency
Last synced: about 5 hours ago
JSON representation
Manage symlinks from a root file to multiple destinations
- Host: GitHub
- URL: https://github.com/tyhopp/lenv
- Owner: tyhopp
- License: mit
- Created: 2024-08-24T06:16:37.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2024-09-21T15:39:48.000Z (about 2 months ago)
- Last Synced: 2024-09-22T05:46:25.122Z (about 2 months ago)
- Topics: cli, env, environment-variables, go, golang, monorepo, wasi, wasm, zero-dependency
- Language: Go
- Homepage:
- Size: 37.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: changelog.sh
- License: LICENSE
Awesome Lists containing this project
README
# lenv
Manage symlinks from a root file to multiple destinations.
Useful for monorepos that use a single `.env` file as a source of truth for many child projects.
## Installation
Download precompiled binaries from [Releases](https://github.com/tyhopp/lenv/releases).
Ports for various programming languages are available in [lenv-ports](https://github.com/tyhopp/lenv-ports):
- [JavaScript](https://github.com/tyhopp/lenv-ports/tree/main/js/README.md), published to [npm](https://www.npmjs.com/package/lenv-js)
- [Python](https://github.com/tyhopp/lenv-ports/tree/main/py/README.md), published to [PyPI](https://pypi.org/project/lenv-py)
- [Rust](https://github.com/tyhopp/lenv-ports/tree/main/rs/README.md), published to [crates.io](https://crates.io/crates/lenv-rs)## Usage
In the root of your project:
1. Create a `.env` (or other named) file you want to symlink
2. Create a `.lenv` file with the destination locations to symlink to, such as:```
project/a/.env
project/b/.env
```3. Execute `lenv link` to create symlinks
Use the `-help` flag to see all usage instructions.
### WASI binary execution
The [WebAssembly System Interface (WASI)](https://wasi.dev/) binary can be executed with the [Wasmtime](https://wasmtime.dev/) runtime CLI with this command structure:
```
wasmtime --wasi cli --dir /absolute/path/to/project lenv-wasip1.wasm
```