MCPcopy Index your code
hub / github.com/ChrisFeldmeier/OpenCodeRust / main

Function main

crates/opencode-cli/src/main.rs:571–790  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

569}
570#[tokio::main]
571async fn main() -> anyhow::Result<()> {
572 tracing_subscriber::fmt::init();
573
574 let cli = Cli::parse();
575
576 match cli.command {
577 Some(Commands::Tui {
578 project,
579 model,
580 continue_last,
581 session,
582 fork,
583 prompt,
584 agent,
585 port,
586 hostname,
587 mdns,
588 mdns_domain,
589 cors,
590 }) => {
591 run_tui(
592 project,
593 model,
594 continue_last,
595 session,
596 fork,
597 agent,
598 prompt,
599 port,
600 hostname,
601 mdns,
602 mdns_domain,
603 cors,
604 None,
605 None,
606 )
607 .await?;
608 }
609 Some(Commands::Attach {
610 url,
611 dir,
612 session,
613 password,
614 }) => {
615 run_tui(
616 dir,
617 None,
618 false,
619 session,
620 false,
621 "build".to_string(),
622 None,
623 0,
624 "127.0.0.1".to_string(),
625 false,
626 "opencode.local".to_string(),
627 vec![],
628 Some(url),

Callers

nothing calls this directly

Calls 15

initFunction · 0.85
run_non_interactiveFunction · 0.85
run_server_commandFunction · 0.85
run_web_commandFunction · 0.85
run_acp_commandFunction · 0.85
list_modelsFunction · 0.85
handle_session_commandFunction · 0.85
handle_stats_commandFunction · 0.85
handle_db_commandFunction · 0.85
show_configFunction · 0.85
handle_auth_commandFunction · 0.85
handle_agent_commandFunction · 0.85

Tested by

no test coverage detected