diff --git a/crates/dbx-cli/Cargo.toml b/crates/dbx-cli/Cargo.toml index c816811ec..d272aaa4b 100644 --- a/crates/dbx-cli/Cargo.toml +++ b/crates/dbx-cli/Cargo.toml @@ -4,7 +4,7 @@ version = "0.5.2" edition = "2021" [[bin]] -name = "dbx" +name = "dbx-cli" path = "src/main.rs" [dependencies] diff --git a/crates/dbx-cli/src/runtime_client.rs b/crates/dbx-cli/src/runtime_client.rs index a3db99811..940fd5399 100644 --- a/crates/dbx-cli/src/runtime_client.rs +++ b/crates/dbx-cli/src/runtime_client.rs @@ -9,7 +9,8 @@ pub struct RuntimeDiscovery { } pub fn app_data_dir() -> PathBuf { - let home = std::env::var(if cfg!(windows) { "APPDATA" } else { "HOME" }).unwrap_or_else(|_| ".".to_string()); + let home = std::env::var(if cfg!(windows) { "APPDATA" } else { "HOME" }) + .unwrap_or_else(|_| ".".to_string()); if cfg!(target_os = "macos") { PathBuf::from(home).join("Library/Application Support/com.dbx.app") diff --git a/docs/superpowers/plans/2026-05-10-dbx-cli-runtime.md b/docs/superpowers/plans/2026-05-10-dbx-cli-runtime.md index 961f99829..e3cd3baf7 100644 --- a/docs/superpowers/plans/2026-05-10-dbx-cli-runtime.md +++ b/docs/superpowers/plans/2026-05-10-dbx-cli-runtime.md @@ -76,7 +76,7 @@ version = "0.5.2" edition = "2021" [[bin]] -name = "dbx" +name = "dbx-cli" path = "src/main.rs" [dependencies] @@ -114,7 +114,7 @@ Run: cargo metadata --format-version 1 --no-deps ``` -Expected: output contains `"name":"dbx-cli"` and `"name":"dbx"`. +Expected: output contains `"name":"dbx-cli"` for the package and `"name":"dbx-cli"` for the binary target. --- @@ -874,8 +874,8 @@ async fn conn_show(name: &str, _args: &[String]) -> CliEnvelope CliEnvelope { Run: ```bash -cargo run -p dbx-cli -- safe-query --conn __missing__ --sql "DROP TABLE users" --format json +cargo run -p dbx-cli --bin dbx-cli -- safe-query --conn __missing__ --sql "DROP TABLE users" --format json ``` Expected: returns `CONNECTION_NOT_FOUND`. With a real DBX connection, `DROP TABLE users` returns `DDL_BLOCKED`. @@ -1470,9 +1470,9 @@ pnpm tauri dev In a second terminal, run: ```bash -cargo run -p dbx-cli -- context --format json -cargo run -p dbx-cli -- selection --format json -cargo run -p dbx-cli -- result current --limit 50 --format json +cargo run -p dbx-cli --bin dbx-cli -- context --format json +cargo run -p dbx-cli --bin dbx-cli -- selection --format json +cargo run -p dbx-cli --bin dbx-cli -- result current --limit 50 --format json ``` Expected: all three commands return `source: "gui-runtime"` when desktop is running. @@ -1520,11 +1520,11 @@ Expected: no output. Run: ```bash -cargo run -p dbx-cli -- context --format json -cargo run -p dbx-cli -- conn list --format json -cargo run -p dbx-cli -- conn show __missing__ --redacted --format json -cargo run -p dbx-cli -- selection --format json -cargo run -p dbx-cli -- result current --limit 50 --format json +cargo run -p dbx-cli --bin dbx-cli -- context --format json +cargo run -p dbx-cli --bin dbx-cli -- conn list --format json +cargo run -p dbx-cli --bin dbx-cli -- conn show __missing__ --redacted --format json +cargo run -p dbx-cli --bin dbx-cli -- selection --format json +cargo run -p dbx-cli --bin dbx-cli -- result current --limit 50 --format json ``` Expected: all commands return valid JSON envelopes. GUI-only commands return `GUI_RUNTIME_REQUIRED` if DBX desktop is not running.