zed-industries/zed · error

usage: collab <version | migrate | seed | serve…

Error message

usage: collab <version | migrate | seed | serve <api|collab|llm|all>>

What it means

The extended CLI usage error for builds that include database tooling: the accepted subcommands are version, migrate, seed, and serve with api/collab/llm/all modes. Any other first argument reaches this fallback branch.

Solutions

  1. Use one of: version, migrate, seed, or serve <api|collab|llm|all>
  2. Consult the deployment docs for the correct invocation
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at crates/collab/src/main.rs:178 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of zed-industries/zed@9d272b0363 (2026-08-20). Data as JSON: /api/errors/ec658f4bf8ea8f56. Report an issue: GitHub.

Appendix: source

Thrown at crates/collab/src/main.rs:178

                futures::future::select(ctrl_break, ctrl_c).await;
            };

            axum::Server::from_tcp(listener)
                .map_err(|e| anyhow!(e))?
                .serve(app.into_make_service_with_connect_info::<SocketAddr>())
                .with_graceful_shutdown(async move {
                    signal.await;
                    tracing::info!("Received interrupt signal");

                    if let Some(on_shutdown) = on_shutdown {
                        on_shutdown();
                    }
                })
                .await
                .map_err(|e| anyhow!(e))?;
        }
        _ => {
            Err(anyhow!(
                "usage: collab <version | migrate | seed | serve <api|collab|llm|all>>"
            ))?;
        }
    }
    Ok(())
}

#[expect(clippy::result_large_err)]
async fn setup_app_database(config: &Config) -> Result<()> {
    let db_options = db::ConnectOptions::new(config.database_url.clone());
    let mut db = Database::new(db_options).await?;

    db.initialize_notification_kinds().await?;

    Ok(())
}

async fn handle_root(Extension(mode): Extension<ServiceMode>) -> String {

View on GitHub (pinned to 9d272b0363)