t3-oss / t3-env

https://env.t3.gg
MIT License
2.76k stars 86 forks source link

Feature Request: `t3-env` CLI #97

Open FredBuild opened 1 year ago

FredBuild commented 1 year ago

t3-env is great for managing environment variables. However, there's a gap when it comes to command-line operations like drizzle-kit db:push.

Currently, we use dotenv-cli to load environment variables:

$ dotenv -- drizzle-kit push:mysql

This method lacks a safety check for the loaded variables.

If we created a CLI for t3-env, it could safely load, transform, and verify these variables:

$ t3-env -- drizzle-kit push:mysql
# Loads and transforms environment variables
# Throw errors if there's an issue
# If no issues, execute the command
chungweileong94 commented 1 year ago

That can be really useful! As of now, you can actually use both dotenv & t3-env in drizzle.config.ts as a workaround.

mvares commented 1 year ago

Can i implement it in rust? @chungweileong94

chungweileong94 commented 1 year ago

Can i implement it in rust?

I don't have much experience with Rust, might be a bit overkill for simple feature like this, but I guess so? @juliusmarminge

mvares commented 1 year ago

Well, we could create this with typescript too.

chungweileong94 commented 1 year ago

Yeah, TS would be better, CI is a lot easy to setup.

mvares commented 1 year ago

Can you setup the environment to me? I wanna work it :D (CI, pnpm...)

juliusmarminge commented 1 year ago

Go for it!

mvares commented 1 year ago

@juliusmarminge, how can I send the project to you?

juliusmarminge commented 1 year ago

@juliusmarminge, how can I send the project to you?

You make a PR

nullrodri commented 1 year ago

@moliveiraz are you working on this? If not, I could take it :)