{"record":{"id":"735bb6af0fb2bd38","repo":"spacedriveapp/spacedrive","slug":"remote-device-is-required","errorCode":null,"errorMessage":"--remote-device is required","messagePattern":"--remote-device is required","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"apps/cli/src/domains/library/args.rs","lineNumber":141,"sourceCode":"\tpub local_device: Option<Uuid>,\n\n\t/// Use interactive mode (default if no arguments provided)\n\t#[arg(short, long)]\n\tpub interactive: bool,\n}\n\nimpl SetupArgs {\n\tpub fn is_interactive(&self) -> bool {\n\t\tself.interactive || (self.local_library.is_none() && self.remote_device.is_none())\n\t}\n\n\tpub fn to_input(&self, ctx: &crate::context::Context) -> anyhow::Result<LibrarySyncSetupInput> {\n\t\tlet local_library = self\n\t\t\t.local_library\n\t\t\t.ok_or_else(|| anyhow::anyhow!(\"--local-library is required\"))?;\n\t\tlet remote_device = self\n\t\t\t.remote_device\n\t\t\t.ok_or_else(|| anyhow::anyhow!(\"--remote-device is required\"))?;\n\n\t\t// Get local device ID from config or argument\n\t\tlet local_device_id = if let Some(id) = self.local_device {\n\t\t\tid\n\t\t} else {\n\t\t\t// Read device config to get current device ID\n\t\t\tlet config_path = ctx.data_dir.join(\"device.json\");\n\t\t\tif !config_path.exists() {\n\t\t\t\tanyhow::bail!(\"Device config not found. Please specify --local-device\");\n\t\t\t}\n\t\t\tlet config_data = std::fs::read_to_string(&config_path)?;\n\t\t\tlet device_config: sd_core::device::DeviceConfig = serde_json::from_str(&config_data)?;\n\t\t\tdevice_config.id\n\t\t};\n\n\t\t// Determine leader device ID\n\t\tlet leader = self.leader.as_deref().unwrap_or(\"local\");\n\t\tlet leader_device_id = match leader {","sourceCodeStart":123,"sourceCodeEnd":159,"githubUrl":"https://github.com/spacedriveapp/spacedrive/blob/6dfeccf2113039e35f2ce735f945e70dc3e4ea45/apps/cli/src/domains/library/args.rs#L123-L159","documentation":"Error \"--remote-device is required\" thrown in spacedriveapp/spacedrive.","triggerScenarios":"Thrown at apps/cli/src/domains/library/args.rs:141 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"6dfeccf2113039e35f2ce735f945e70dc3e4ea45","analyzedAt":"2026-08-16T11:26:17.074Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}