Skip to content
Cascading Labs QScrape VoidCrawl Yosoi

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 --local
uvx yosoi policy init --global
uvx yosoi policy init --local --force

The generated file starts with:

# yaml-language-server: $schema=https://cascadinglabs.com/yosoi/schemas/policy.schema.json

Schema

Print the JSON Schema for editor/tooling integration:

uvx yosoi policy schema

The same schema is hosted at:

https://cascadinglabs.com/yosoi/schemas/policy.schema.json

Validate

uvx yosoi policy validate .yosoi/policy.yaml
uvx yosoi policy validate .yosoi/policy/test.yaml --json

Validation parses JSON/YAML and validates the result against ys.Policy.

Inspect

Normalize a policy file or inline snippet:

uvx yosoi policy inspect .yosoi/policy.yaml
uvx yosoi policy inspect .yosoi/policy.yaml --format yaml
uvx yosoi policy inspect 'atom_reads: true' --format json

Defaults

Print empty policy defaults, or crawl defaults:

uvx yosoi policy defaults
uvx yosoi policy defaults --crawl --format yaml

Effective

Print the resolved env + global + project policy stack:

uvx yosoi policy effective --format yaml

Add explicit layers:

uvx yosoi policy effective \
--policy .yosoi/policy/20-page.yaml \
--policy 'output: {flat_files: true}' \
--format yaml

Skip global/project discovery:

uvx yosoi policy effective --no-discover --policy .yosoi/policy/test.yaml

Scrape, search, discover, and crawl

Most run commands accept --policy:

uvx yosoi scrape https://example.com --policy .yosoi/policy.yaml
uvx 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.