INNER CODE UNIT · Python
plan
F-R-L/forge-film · forge/cli.py:237
def plan(
story_file: Path = typer.Argument(..., help="Path to story text file"),
scenes: int = typer.Option(6, help="Number of scenes"),
config: Path = typer.Option(Path("forge.yaml"), help="Path to forge.yaml config"),
):
"""Compile story to ProductionPlan and print enhanced DAG — no video generation."""
asyncio.run(_plan(story_file, scenes, config))
async def _plan(story_file: Path, num_scenes: int, config_path: Path = Path("forge.yaml")):
from forge.compiler.vision_compiler import VisionCompiler
from forge.config import ForgeConfig
story = Path(story_file).read_text(encoding="utf-8")
cfg = ForgeConfig(config_path)
llm_provider = cfg.build_llm_provider()
if not cfg.llm_api_key:
console.print("[yellow]No API key — using mock plan[/yellow]")
plan = _mock_plan(story, num_scenes)