Project environment/config file store for a personal use-case. But if you find it useful too, then that's cool.
  • Rust 84.7%
  • Nix 15.3%
Find a file
2026-02-08 17:20:25 -08:00
.idea envs add now works : ) 2026-02-08 16:13:30 -08:00
src envs add now works : ) 2026-02-08 16:13:30 -08:00
.envrc initial commit 2026-02-07 18:20:47 -08:00
.gitignore envs add now works : ) 2026-02-08 16:13:30 -08:00
Cargo.lock working much better now. "production ready" envs load 2026-02-08 15:15:30 -08:00
Cargo.toml envs add now works : ) 2026-02-08 16:13:30 -08:00
flake.lock initial rust project 2026-02-07 18:33:39 -08:00
flake.nix initial commit 2026-02-07 18:20:47 -08:00
LICENSE.md license and readme 2026-02-07 18:33:28 -08:00
README.md Made README.md a tad bit more useful 2026-02-08 17:20:25 -08:00

envs

This project is still under very early development. The code is fucking ass, but it gets the job done for now.

The Problem
Long story short, I don't keep the files for git repositories on my computer when I'm not working on the project very often. Which means config and env files (which are, for obvious reasons, not saved in git), also get removed. or I have to manually copy them somewhere.

The Solution
This project is to save files such as .env or config.toml from various projects. This just makes it easier on me so I don't have to re-create these files, which are often a pain to re-create especially if they contain API tokens.

This is a very niche personal issue (I think).

Installation

Currently, the only installation method is my Nix user repository. Good luck.

I may provide prebuild binaries in the future. Not sure tho. (you are always welcome to open a PR to set this up for me)

You can also build and run. See the Development/build instructions below.

Usage

Note

You must run these commands from the project's root directory.

Warning

The project files must be on the same drive as the user home directory (ex. /home/user/ on linux). This is because this relies on file hard-linking. symlinking or copying files is planned for the future.

Warning

I have no idea if this code works on Windows. I have done my best to code it in a compatible way. If you encounter issues, please open an issue.

Envs files are stored in the $HOME/.envs. On linux that expands to /home/user/.envs/.

Add a file or directory to the envs.

If the file doesnt exist, it will be created. Iff the path is a directory that doesnt exist, it will probably become a file. I havent implemented directory creation. Deal with it.

envs add <file or directory>

Load envs for the current project

envs load

Development

Requires:

  • Rust

Note

If you are on nix, you can run nix develop (i think?) to use the nix flake. You're welcome.

You can also use direnv to auto load the flake.

See Usage for commands

cargo run -- <command>

Build

cargo build -r