Skip to content

Commit 5ee18bc

Browse files
authored
[FEATURE] Validate endpoints in the cli (#415)
* add validate to cli * tests * docs * linting * Add summary for running validate
1 parent 3cedddd commit 5ee18bc

File tree

4 files changed

+808
-30
lines changed

4 files changed

+808
-30
lines changed

docs/environment-builder.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,35 @@ openenv validate --verbose
288288

289289
`openenv validate` checks for required files, ensures the Dockerfile/server entrypoints function, and lists supported deployment modes. The command exits non-zero if issues are found so you can wire it into CI.
290290

291+
You can also validate a running environment endpoint and get criteria-level JSON:
292+
293+
```bash
294+
openenv validate --url http://localhost:8000
295+
# or
296+
openenv validate https://username-my-env.hf.space
297+
```
298+
299+
Example runtime output:
300+
301+
```json
302+
{
303+
"target": "http://localhost:8000",
304+
"validation_type": "running_environment",
305+
"standard_version": "1.0.0",
306+
"passed": true,
307+
"summary": {
308+
"passed_count": 6,
309+
"total_count": 6,
310+
"failed_criteria": []
311+
},
312+
"criteria": [
313+
{"id": "health_endpoint", "passed": true},
314+
{"id": "metadata_endpoint", "passed": true},
315+
{"id": "schema_endpoint", "passed": true}
316+
]
317+
}
318+
```
319+
291320
### 8. Push & Share with `openenv push`
292321

293322
Once validation passes, the CLI can deploy directly to Hugging Face Spaces or any registry:

0 commit comments

Comments
 (0)