MCPcopy Create free account
hub / github.com/HKUDS/OpenOPC / exec_command

Function exec_command

opc/cli/app.py:589–638  ·  view source on GitHub ↗

Run one non-interactive OPC task for scripts and CI.

(
    prompt: Optional[str] = typer.Argument(None, help="Prompt to run non-interactively. Reads stdin when omitted."),
    project: Optional[str] = typer.Option(None, "--project", "-p", help="Project ID to work in"),
    mode: str = typer.Option("task", "--mode", help="Execution mode: task, company, or org"),
    company_profile: str = typer.Option("corporate", "--company-profile", help="Company profile for company mode"),
    agent: Optional[str] = typer.Option(None, "--agent", help="Preferred agent: native, claude_code, codex, cursor, opencode"),
    org_id: Optional[str] = typer.Option(None, "--org", "--org-id", help="Saved org id for org/custom mode"),
    session_id: Optional[str] = typer.Option(None, "--session-id", help="Existing task-backed session id to reuse"),
    resume: bool = typer.Option(False, "--resume", help="Resume the latest task-backed session in the project"),
    json_output: bool = typer.Option(False, "--json", help="Print final JSON payload"),
    stream_json: bool = typer.Option(False, "--stream-json", help="Print newline-delimited JSON runtime events"),
    no_markdown: bool = typer.Option(False, "--no-markdown", help="Plain text output"),
)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers

nothing calls this directly

Calls 5

_get_configFunction · 0.85
_exec_messageFunction · 0.85
_print_exec_eventFunction · 0.85
readMethod · 0.45
runMethod · 0.45

Tested by

no test coverage detected