You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Env is an [Ash](https://github.com/ash-shell/ash) module that loads a .env file in your current directory.
4
+
5
+
# Getting Started
6
+
7
+
Env is part of the Ash core, so you can just start using it in your Ash modules. Env also automatically runs whenever Ash starts up to load your specified environment file.
8
+
9
+
# Features + Usage
10
+
11
+
## CLI
12
+
13
+
### Get Current Environment
14
+
15
+
To figure out what env file will be loaded when Ash starts up, run the following command:
16
+
17
+
```sh
18
+
ash env:get
19
+
```
20
+
21
+
### Set Environment
22
+
23
+
To set the env file that will be loaded when Ash starts up, run the following command:
24
+
25
+
```sh
26
+
ash env:set $env_file_name
27
+
```
28
+
29
+
Where `$env_file_name` is the name of the file you would like loaded.
30
+
31
+
## Public Interface
32
+
33
+
There's no need to import this module to use its public interface, as it is imported in Ash core.
34
+
35
+
### Get Current Environment
36
+
37
+
You can run the function `Env__get_filename` to get the env filename that will be loaded when Ash starts up.
38
+
39
+
```sh
40
+
filename=$(Env__get_filename)
41
+
```
42
+
43
+
### Set Current Environment
44
+
45
+
To set the env file that will be loaded when Ash starts up, run the following command:
46
+
47
+
```sh
48
+
Env__set_filename
49
+
```
50
+
51
+
### Load Current Environment
52
+
53
+
To load the environment file in the current directory, you can run the following command:
0 commit comments