@@ -28,28 +28,11 @@ cargo install envcheck
2828
2929### Usage
3030
31- 1 . Create a ` .envcheck.yaml ` file in your project root :
31+ 1 . Initialize a new configuration or use an existing one :
3232
33- ``` yaml
34- version : " 1"
35-
36- tools :
37- - name : node
38- version : " >=18.0.0"
39- required : true
40- - name : docker
41- required : true
42-
43- env_vars :
44- - name : DATABASE_URL
45- required : true
46-
47- ports :
48- - 3000
49-
50- files :
51- - path : .env
52- required : true
33+ ``` bash
34+ # Generate a default configuration
35+ $ envcheck init
5336```
5437
55382 . Run ` envcheck ` :
@@ -69,34 +52,40 @@ Running environment checks...
6952--- 1 issue(s) found. Fix them to continue.
7053```
7154
55+ 3 . Export results to JSON for CI/CD:
56+
57+ ``` bash
58+ $ envcheck --json
59+ ```
60+
7261## Configuration
7362
7463### Tools
7564
76- Check if tools are installed and optionally verify versions :
65+ Check if tools are installed and verify versions using proper semver comparison :
7766
7867``` yaml
7968tools :
8069 - name : node
81- version: ">=18.0.0" # Supports >=, <=, >, <, =
70+ version : " >=18.0.0" # Supports semver ranges
8271 required : true
8372 - name : docker
8473 required : false # Optional tools won't fail the check
8574` ` `
8675
87- Supported tools out of the box :
88- - ` node` , `npm`, `go`, `rust`, `cargo`, `python`, `docker`, `git`, `java`, `ruby`
76+ Supported tools include ` node`, `npm`, `go`, `rust`, `cargo`, `python`, `docker`, `git`, `java`, `ruby`, and more.
8977
9078# ## Environment Variables
9179
92- Validate that required environment variables are set :
80+ Validate that required environment variables are set and optionally match a regex :
9381
9482` ` ` yaml
9583env_vars:
9684 - name: DATABASE_URL
9785 required: true
98- - name: DEBUG
99- required: false
86+ - name: NODE_ENV
87+ pattern: "^(development|test|production)$"
88+ required: true
10089` ` `
10190
10291# ## Ports
@@ -107,32 +96,25 @@ Check if ports are available:
10796ports:
10897 - 3000
10998 - 5432
110- - 8080
11199` ` `
112100
113- # ## Files
101+ # ## Files & Directories
114102
115- Verify that required files exist :
103+ Verify that required files or directories exist and have correct permissions :
116104
117105` ` ` yaml
118106files:
119107 - path: .env
120108 required: true
121- - path: config/database.yml
122- required: false
109+ permissions: 0o600 # Verify octal permissions (Unix)
110+ - path: storage/logs
111+ is_directory: true
112+ required: true
123113` ` `
124114
125115# # Contributing
126116
127- We love contributions! This project is designed to be community-driven. Here are some ways you can help :
128-
129- - **Report bugs** - Open an issue if you find a bug
130- - **Suggest features** - Have an idea? We'd love to hear it
131- - **Improve docs** - Help make our documentation better
132- - **Add validators** - Add support for new tools, languages, or checks
133- - **Write tests** - Help us improve test coverage
134-
135- Check out our [CONTRIBUTING.md](CONTRIBUTING.md) for detailed guidelines.
117+ We love contributions! This project is designed to be community-driven. See our [CONTRIBUTING.md](CONTRIBUTING.md) for detailed guidelines.
136118
137119# ## Good First Issues
138120
@@ -143,6 +125,8 @@ Looking to contribute? Check out issues labeled [`good first issue`](https://git
143125See the [`examples/`](examples/) directory for sample configurations :
144126
145127- [Node.js project](examples/.envcheck.yaml)
128+ - [Django project](examples/django-project.yaml)
129+ - [Rails project](examples/rails-project.yaml)
146130- [Go project](examples/go-project.yaml)
147131- [Rust project](examples/rust-project.yaml)
148132
0 commit comments