Policy CLI
The yosoi policy command group is the policy workbench.
Init
Create a starter YAML policy with an editor schema directive:
uvx yosoi policy init --localuvx yosoi policy init --globaluvx yosoi policy init --local --forceThe generated file starts with:
# yaml-language-server: $schema=https://cascadinglabs.com/yosoi/schemas/policy.schema.jsonSchema
Print the JSON Schema for editor/tooling integration:
uvx yosoi policy schemaThe same schema is hosted at:
https://cascadinglabs.com/yosoi/schemas/policy.schema.jsonValidate
uvx yosoi policy validate .yosoi/policy.yamluvx yosoi policy validate .yosoi/policy/test.yaml --jsonValidation parses JSON/YAML and validates the result against ys.Policy.
Inspect
Normalize a policy file or inline snippet:
uvx yosoi policy inspect .yosoi/policy.yamluvx yosoi policy inspect .yosoi/policy.yaml --format yamluvx yosoi policy inspect 'atom_reads: true' --format jsonDefaults
Print empty policy defaults, or crawl defaults:
uvx yosoi policy defaultsuvx yosoi policy defaults --crawl --format yamlEffective
Print the resolved env + global + project policy stack:
uvx yosoi policy effective --format yamlAdd explicit layers:
uvx yosoi policy effective \ --policy .yosoi/policy/20-page.yaml \ --policy 'output: {flat_files: true}' \ --format yamlSkip global/project discovery:
uvx yosoi policy effective --no-discover --policy .yosoi/policy/test.yamlScrape, search, discover, and crawl
Most run commands accept --policy:
uvx yosoi scrape https://example.com --policy .yosoi/policy.yamluvx yosoi search "cascading labs yosoi" --policy 'search: {backend: "google,bing,brave", max_results: 5}'uvx yosoi discover https://example.com --policy 'scrape: {fetcher_type: headless}'uvx yosoi crawl https://example.com --policy .yosoi/policy/crawl/10-budget.yaml--policy can be repeated. Later --policy arguments override earlier ones. Direct CLI flags still win over --policy.