Skip to content

Commit 1e27de2

Browse files
committed
chore: polishing
1 parent ecb5d27 commit 1e27de2

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,22 @@ Then you can use new `.venv/bin/python` as the python interpreter, and it will l
203203

204204
**Tips**: you can use `luaw`, `phpw`, `perlw` etc. to manage other language SDKs.
205205

206+
### What is dotenvx symbolic link?
207+
208+
Dotenvx symbolic link is a way to run the command with injected environment variables by dotenvx.
209+
210+
For example, you want to run a lua script with environment variables from `.env` file,
211+
you can create a symbolic link `dotenvx link bin/lua`, and then run `./bin/lua demo.lua` to run the lua script with
212+
environment variables from `.env` file.
213+
214+
Another example is to `mysql`, `psql` command. For example, you have database config in `.env` file already,
215+
and you want to log in mysql, and you should use `mysql -h host -u user -p db` and input password interactively.
216+
Why not read db config and help me log in mysql directly? I can't remember the long password for DB.
217+
218+
You can create a symbolic link `dotenvx link bin/mysql`, and then run `./bin/mysql` to log in mysql automatically.
219+
220+
**Attention**: symbolic link name should be the same as the command name. Now only `mysql` and `psql` are supported.
221+
206222
### How to add encrypted key-value from CLI?
207223

208224
You can use `dotenvx set <key> <value>` to write an encrypted key-value pair to the `.env` file.

0 commit comments

Comments
 (0)