{"record":{"id":"289a3c3f68dcbf09","repo":"clockworklabs/SpacetimeDB","slug":"invalid-describe-arguments-nusage-spacetime-desc","errorCode":null,"errorMessage":"Invalid describe arguments.\\nUsage: spacetime describe [database] [entity_type entity_name] --json [--no-config]","messagePattern":"Invalid describe arguments\\.\\\\nUsage: spacetime describe \\[database\\] \\[entity_type entity_name\\] --json \\[--no-config\\]","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/cli/src/subcommands/describe.rs","lineNumber":83,"sourceCode":"        \"spacetime describe [database] [entity_type entity_name] --json [--no-config]\",\n    )?;\n    let entity = match resolved.remaining_args.as_slice() {\n        [] => None,\n        [entity_type, entity_name] => {\n            let entity_type = match entity_type.as_str() {\n                \"reducer\" => EntityType::Reducer,\n                \"table\" => EntityType::Table,\n                _ => {\n                    anyhow::bail!(\n                        \"Invalid entity_type '{}'. Expected one of: reducer, table.\",\n                        entity_type\n                    )\n                }\n            };\n            Some((entity_type, entity_name.as_str()))\n        }\n        _ => {\n            anyhow::bail!(\n                \"Invalid describe arguments.\\nUsage: spacetime describe [database] [entity_type entity_name] --json [--no-config]\"\n            );\n        }\n    };\n\n    let mut config = config;\n    let server_from_cli = args.get_one::<String>(\"server\").map(|s| s.as_ref());\n    let server = server_from_cli.or(resolved.server.as_deref());\n    let force = args.get_flag(\"force\");\n    let anon_identity = args.get_flag(\"anon_identity\");\n    let conn = crate::api::Connection {\n        host: config.get_host_url(server)?,\n        auth_header: get_auth_header(&mut config, anon_identity, server, !force).await?,\n        database_identity: database_identity(&config, &resolved.database, server).await?,\n        database: resolved.database,\n    };\n    let api = ClientApi::new(conn);\n","sourceCodeStart":65,"sourceCodeEnd":101,"githubUrl":"https://github.com/clockworklabs/SpacetimeDB/blob/6dee26c6efc2856793e12b148a59742964f5d783/crates/cli/src/subcommands/describe.rs#L65-L101","documentation":"The positional arguments after the database name in `spacetime describe` must be either empty or exactly an (entity_type, entity_name) pair. One argument (entity type without a name) or three or more arguments falls into the wildcard arm and bails with the usage line.","triggerScenarios":"`spacetime describe my-db table` (entity type given but no name), or any extra positional argument after the pair.","commonSituations":"Forgetting the entity name; shell quoting that splits one name into two args; flags appended after positionals without a separator.","solutions":["Pass either no entity args or exactly `entity_type entity_name`","Quote multi-word entity names","Put flags before the positional arguments or after `--`"],"exampleFix":"# before\nspacetime describe my-db table\n\n# after\nspacetime describe my-db table person","handlingStrategy":"type-guard","validationCode":"// arity check before invoking describe\nassert!(\n    remaining_args.is_empty() || remaining_args.len() == 2,\n    \"expected no args or exactly [entity_type entity_name]\"\n);","typeGuard":"fn valid_describe_args(args: &[String]) -> bool {\n    matches!(args.len(), 0 | 2)\n}","tryCatchPattern":null,"preventionTips":["Always pass the entity name together with the entity type","Quote multi-word entity names so they stay one argument"],"tags":["cli","usage","arguments","describe"],"backgroundTag":"invalid-cli-argument","analyzedSha":"6dee26c6efc2856793e12b148a59742964f5d783","analyzedAt":"2026-08-20T06:08:37.179Z","contentChangedAt":"2026-08-20T06:08:37.179Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}