foley.cli#
The foley command-line interface (argparse, the verbs generated by cw).
Two kinds of command share one parser:
the verbs (#62): every verb of
foley.agent.verbs.VERBS, the table MCP serves too, generated bycwfrom its signature and docstring, so a verb added there is a command here with no CLI code. Its result is printed as JSON; a dict argument (a timeline) is given as JSON; a result with"ok": falseexits 1:foley find "The door creaked open in the storm." --territory US foley score "Rain on the roof." --no-commercial-ok foley generate "a glass shatters" --backend elevenlabs foley set-master '{"items": []}' --target-lufs -16
the commands written here, for what is not a verb (bulk corpora, folders, the agent kit, the evaluation harness):
foley demo # offline ingest->search over the bundled fixture foley bootstrap [--rings 0,1] [--corpora fsd50k,foleyset] [--data-dir DIR] [--accept-ai-restricted] [--no-commercial-filter] foley ingest PATH [--license ID] [--min-status warn|pass|fail] [--no-qc] foley ingest-library PATH [--root DIR] [--accept-ai-restricted] [--no-qc] foley search QUERY [-k N] [--commercial-ok]
Wired as the foley console entry point ([project.scripts]). Every command is a
thin call into the library facade; the CLI only parses args and prints.
Module Attributes
the parser's own namespace keys ( |
Functions
|
Add the CLI-enabled verbs of |
Build the |
|
|
Entry point for the |
- foley.cli.RESERVED_VERB_PARAMS = frozenset({'_cw', 'command', 'func'})#
the parser’s own namespace keys (
commandits subcommand,funca written command’s handler,_cwcw’s).- Type:
Parameter names a verb may not take on the CLI
- foley.cli.add_verbs(parser, verbs=None)[source]#
Add the CLI-enabled verbs of
verbs(default:foley.agent.verbs.VERBS) toparser’s subcommands, one command each (#62).- Raises:
ValueError – If a verb’s command clashes with a written one, or it takes a parameter named in
RESERVED_VERB_PARAMS.- Return type: