Proposal: `shadowenv assimilate`
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 458
- Forks
- 22
- PR merge metrics
- No merged PRs in 30d
Description
Shadowenv could have a feature to convert other environment manipulation tools' configs to a format it can understand. For example:
# .env
A=b
$ shadowenv assimilate
assimilated .env as .shadowenv.d/050-dotenv.lisp
; 050-dotenv.lisp
(env/set "A" "b")
This is obviously the most trivial case, but we could do similar things for:
.envrc.ruby-version- and so on.
Because of Shadowenv's lack of ability to do much of anything dynamic at load-time, this would essentially function as a "compiler" for these environment files.
One trick to try to make these files at least marginally portable would be to replace the user's home directory in any outputs with (concat (env/get "HOME") ...).
If we wanted to keep tabs on a mapping between the original and the assimilated version, we could encode a checksum/hash of the source file in the assimilated file as a comment on the first line. With this, shadowenv or dev could potentially observe these files when entering a directory and inform the user about out-of-date-ness.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the shadowenv assimilate entry point and review the example .env input and .shadowenv.d/050-dotenv.lisp output. Consider the proposed .envrc and .ruby-version cases, including the checksum and HOME portability ideas. Done should include an agreed conversion scope and working assimilation behavior for the selected formats.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli, devtools
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100