Skip to content

runner: allow custom CLI arguments#3590

Merged
aconchillo merged 1 commit intomainfrom
aleix/custom-cli-runner-args
Jan 29, 2026
Merged

runner: allow custom CLI arguments#3590
aconchillo merged 1 commit intomainfrom
aleix/custom-cli-runner-args

Conversation

@aconchillo
Copy link
Copy Markdown
Contributor

@aconchillo aconchillo commented Jan 29, 2026

Summary

  • main() now accepts an optional argparse.ArgumentParser, allowing bots to define custom CLI arguments that are accessible via runner_args.cli_args
  • Added cli_args field to RunnerArguments so all runner argument types carry parsed CLI args
  • Refactored internal route setup functions to pass args: Namespace instead of unpacking individual keyword arguments
  • Updated 18-gstreamer-filesrc.py example to use the new custom parser pattern

Example

async def bot(runner_args: RunnerArguments):
    input_file = runner_args.cli_args.input
    ...

if __name__ == "__main__":
    from pipecat.runner.run import main

    parser = argparse.ArgumentParser()
    parser.add_argument("-i", "--input", required=True)
    main(parser)

@aconchillo aconchillo force-pushed the aleix/custom-cli-runner-args branch from 69c7736 to bbb8b53 Compare January 29, 2026 18:16
@codecov
Copy link
Copy Markdown

codecov Bot commented Jan 29, 2026

Codecov Report

❌ Patch coverage is 0% with 40 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/pipecat/runner/run.py 0.00% 38 Missing ⚠️
src/pipecat/runner/types.py 0.00% 2 Missing ⚠️
Files with missing lines Coverage Δ
src/pipecat/runner/types.py 0.00% <0.00%> (ø)
src/pipecat/runner/run.py 0.00% <0.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Contributor

@markbackman markbackman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@aconchillo aconchillo merged commit 671cc8e into main Jan 29, 2026
6 checks passed
@aconchillo aconchillo deleted the aleix/custom-cli-runner-args branch January 29, 2026 21:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants