def run_from_cli(args: list[str] | None = None):
    """Convert a trajectory file to a demo file."""
    parser = ArgumentParser(description=__doc__)
    parser.add_argument("traj_path", type=Path, help="Path to trajectory file")
    parser.add_argument("--output_dir", type=Path, help="Output directory for action demos", default=Path("./demos"))
    parser.add_argument("--suffix", type=str, help="Suffix for the output file", default="")
    parser.add_argument("--overwrite", help="Overwrite existing files", action="store_true")
    parser.add_argument(
        "--include_user",
        help="Include user responses (computer)",
        action="store_true",
    )
    parsed_args = parser.parse_args(args)
    main(**vars(parsed_args))
Convert a trajectory file to a demo file.
sweagent/run/run_traj_to_demo.py