From 60e306c86e2f33294e0d3fd97628922c3e39068d Mon Sep 17 00:00:00 2001 From: NeoScript Date: Fri, 8 May 2026 06:21:45 -0500 Subject: [PATCH] refactor: rename project to firebase-auth-cli with fire-auth binary The old name "fbadmin" implied broader Firebase Admin SDK coverage. This tool only does Firebase Authentication, so the new names better reflect its scope: - Package: firebase-auth-cli - Binary: fire-auth - Env vars: FIRE_AUTH_* - Config dir/file: fire-auth / .fire-auth.toml --- .github/workflows/release.yml | 2 +- AGENTS.md | 4 +- Cargo.lock | 48 +++++++------- Cargo.toml | 12 ++-- README.md | 114 +++++++++++++++++----------------- RELEASES.md | 10 +++ dist-workspace.toml | 2 +- docs/RELEASING.md | 14 ++--- src/commands/config_cmd.rs | 6 +- src/config.rs | 40 ++++++------ src/main.rs | 12 ++-- 11 files changed, 139 insertions(+), 125 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f91a7fe..e121402 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -293,7 +293,7 @@ jobs: - uses: actions/checkout@v6 with: persist-credentials: true - repository: "NeoScript/homebrew-fbadmin" + repository: "NeoScript/homebrew-fire-auth" token: ${{ secrets.HOMEBREW_TAP_TOKEN }} # So we have access to the formula - name: Fetch homebrew formulae diff --git a/AGENTS.md b/AGENTS.md index 97dcaa1..1a98258 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -2,7 +2,7 @@ ## Project overview -**fbadmin** is a Rust CLI for Firebase Authentication administration. It wraps the `rs-firebase-admin-sdk` crate and provides subcommands for user management, custom claims, auth action links, and emulator utilities. +**fire-auth** is a Rust CLI for Firebase Authentication administration. It wraps the `rs-firebase-admin-sdk` crate and provides subcommands for user management, custom claims, auth action links, and emulator utilities. ## Repository layout @@ -33,7 +33,7 @@ Cargo.toml # Dependencies, package metadata, profiles - **Error handling**: SDK calls return `Result>`. Use the `IntoAnyhow` trait (`.into_anyhow()`) to convert, then chain `.context("human-readable message")` for user-facing errors. - **Interactive prompts**: When a required arg is `None`, command modules call `prompt::resolve_email()` or similar. These use `dialoguer` and are TTY-aware. - **Output**: Always go through `output.rs` helpers (`render_single_record`, `render_table`, `render_success`, etc.) — they handle `--format` switching (table/json/csv) and colored output. -- **Config resolution**: Profile is resolved from CLI flag → `FBADMIN_PROFILE` env → `default_profile` in config. Connection merges profile settings with CLI overrides. See `config::resolve_connection()`. +- **Config resolution**: Profile is resolved from CLI flag → `FIRE_AUTH_PROFILE` env → `default_profile` in config. Connection merges profile settings with CLI overrides. See `config::resolve_connection()`. - **Firebase init**: `firebase::init_firebase()` takes an `AuthBackend` enum (Emulator or Live with optional credentials/project). The `build_auth` helper in command modules wires config → AuthBackend → FirebaseAuth. - **Logging**: `tracing` with `tracing-subscriber`. Controlled by `-v` flag count. Logs go to stderr. Use `tracing::debug!` for internal details, `tracing::info!` for notable operations. diff --git a/Cargo.lock b/Cargo.lock index a442c37..d1c7d31 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -917,8 +917,30 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9f1f227452a390804cdb637b74a86990f2a7d7ba4b7d5693aac9b4dd6defd8d6" [[package]] -name = "fbadmin" -version = "0.1.0" +name = "ff" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0b50bfb653653f9ca9095b427bed08ab8d75a137839d9ad64eb11810d5b6393" +dependencies = [ + "rand_core 0.6.4", + "subtle", +] + +[[package]] +name = "fiat-crypto" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d" + +[[package]] +name = "find-msvc-tools" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5baebc0774151f905a1a2cc41989300b1e6fbb29aff0ceffa1064fdd3088d582" + +[[package]] +name = "firebase-auth-cli" +version = "0.2.0" dependencies = [ "anyhow", "clap", @@ -944,28 +966,6 @@ dependencies = [ "vergen-gitcl", ] -[[package]] -name = "ff" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0b50bfb653653f9ca9095b427bed08ab8d75a137839d9ad64eb11810d5b6393" -dependencies = [ - "rand_core 0.6.4", - "subtle", -] - -[[package]] -name = "fiat-crypto" -version = "0.2.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d" - -[[package]] -name = "find-msvc-tools" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5baebc0774151f905a1a2cc41989300b1e6fbb29aff0ceffa1064fdd3088d582" - [[package]] name = "fnv" version = "1.0.7" diff --git a/Cargo.toml b/Cargo.toml index 082c05d..b42c2e6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,12 +1,16 @@ [package] -name = "fbadmin" -version = "0.1.0" +name = "firebase-auth-cli" +version = "0.2.0" edition = "2024" rust-version = "1.94" description = "Firebase Auth administration CLI" license = "AGPL-3.0-only" -repository = "https://github.com/NeoScript/firebase-admin-cli" -homepage = "https://github.com/NeoScript/firebase-admin-cli" +repository = "https://github.com/NeoScript/firebase-auth-cli" +homepage = "https://github.com/NeoScript/firebase-auth-cli" + +[[bin]] +name = "fire-auth" +path = "src/main.rs" [dependencies] anyhow = "1" diff --git a/README.md b/README.md index 324a2d1..08769ef 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# fbadmin +# fire-auth A command-line tool for managing Firebase Authentication — users, custom claims, auth action links, and emulator utilities. @@ -14,22 +14,22 @@ cargo install --path . ```bash # Interactive setup — creates a named profile -fbadmin config init +fire-auth config init # Or connect directly with flags / env vars -fbadmin --credentials ~/sa-key.json users list -fbadmin -e localhost:9099 emulator clear-users -export FBADMIN_PROJECT=my-project -fbadmin users count +fire-auth --credentials ~/sa-key.json users list +fire-auth -e localhost:9099 emulator clear-users +export FIRE_AUTH_PROJECT=my-project +fire-auth users count ``` ## Authentication -fbadmin resolves credentials in this order: +fire-auth resolves credentials in this order: -1. `--credentials` / `FBADMIN_CREDENTIALS` — path to a service account JSON file -2. `--project` / `FBADMIN_PROJECT` — project ID using Application Default Credentials -3. `--emulator-host` / `FBADMIN_EMULATOR_HOST` — connect to the Firebase Auth emulator +1. `--credentials` / `FIRE_AUTH_CREDENTIALS` — path to a service account JSON file +2. `--project` / `FIRE_AUTH_PROJECT` — project ID using Application Default Credentials +3. `--emulator-host` / `FIRE_AUTH_EMULATOR_HOST` — connect to the Firebase Auth emulator 4. Profile settings from config (see below) ## Configuration @@ -37,32 +37,32 @@ fbadmin resolves credentials in this order: Profiles store connection settings so you don't need to pass flags every time. ```bash -fbadmin config init # Guided wizard -fbadmin config add prod --credentials ~/keys/prod-sa.json -fbadmin config add local --emulator-host localhost:9099 -fbadmin config default prod # Set the default profile -fbadmin config list # Show all profiles -fbadmin config which # Show resolved connection chain -fbadmin config path # Print config file locations +fire-auth config init # Guided wizard +fire-auth config add prod --credentials ~/keys/prod-sa.json +fire-auth config add local --emulator-host localhost:9099 +fire-auth config default prod # Set the default profile +fire-auth config list # Show all profiles +fire-auth config which # Show resolved connection chain +fire-auth config path # Print config file locations ``` -Global config is stored by `confy` in the OS-appropriate location. A local `.fbadmin.toml` in the working directory is merged on top (field-level override). +Global config is stored by `confy` in the OS-appropriate location. A local `.fire-auth.toml` in the working directory is merged on top (field-level override). ## Commands ### Users ```bash -fbadmin users get --email user@example.com -fbadmin users get --uid abc123 -fbadmin users create --email new@example.com -fbadmin users create --email new@example.com --password s3cret --display-name "Jane Doe" -fbadmin users disable --email user@example.com -fbadmin users enable --email user@example.com -fbadmin users remove --csv uids.csv # Bulk delete from CSV -fbadmin users list --limit 50 -fbadmin users list-inactive --days 90 -fbadmin users count +fire-auth users get --email user@example.com +fire-auth users get --uid abc123 +fire-auth users create --email new@example.com +fire-auth users create --email new@example.com --password s3cret --display-name "Jane Doe" +fire-auth users disable --email user@example.com +fire-auth users enable --email user@example.com +fire-auth users remove --csv uids.csv # Bulk delete from CSV +fire-auth users list --limit 50 +fire-auth users list-inactive --days 90 +fire-auth users count ``` Missing required arguments are prompted interactively when running in a terminal. Passwords are auto-generated if omitted. @@ -70,14 +70,14 @@ Missing required arguments are prompted interactively when running in a terminal ### Custom claims ```bash -fbadmin claims get --email user@example.com -fbadmin claims merge role admin --email user@example.com -fbadmin claims merge tier 2 --email user@example.com # Auto-detects int -fbadmin claims merge prefs '{"dark":true}' --email user@example.com # JSON -fbadmin claims remove role --email user@example.com -fbadmin claims clear --email user@example.com -fbadmin claims find admin # Find all users with "admin" claim -fbadmin claims find role admin --exclusive # Only where role is the sole claim +fire-auth claims get --email user@example.com +fire-auth claims merge role admin --email user@example.com +fire-auth claims merge tier 2 --email user@example.com # Auto-detects int +fire-auth claims merge prefs '{"dark":true}' --email user@example.com # JSON +fire-auth claims remove role --email user@example.com +fire-auth claims clear --email user@example.com +fire-auth claims find admin # Find all users with "admin" claim +fire-auth claims find role admin --exclusive # Only where role is the sole claim ``` Use `--dry-run` with `merge`, `remove`, and `clear` to preview changes without writing. @@ -85,9 +85,9 @@ Use `--dry-run` with `merge`, `remove`, and `clear` to preview changes without w ### Auth action links ```bash -fbadmin links password-reset --email user@example.com -fbadmin links email-verify --email user@example.com -fbadmin links sign-in --email user@example.com +fire-auth links password-reset --email user@example.com +fire-auth links email-verify --email user@example.com +fire-auth links sign-in --email user@example.com ``` ### Emulator @@ -95,40 +95,40 @@ fbadmin links sign-in --email user@example.com These commands only work when connected to an emulator. ```bash -fbadmin -e localhost:9099 emulator clear-users -fbadmin -e localhost:9099 emulator config +fire-auth -e localhost:9099 emulator clear-users +fire-auth -e localhost:9099 emulator config ``` ### Connection info ```bash -fbadmin info # Shows resolved profile, project, credentials, and verifies connectivity +fire-auth info # Shows resolved profile, project, credentials, and verifies connectivity ``` ## Global flags -| Flag | Short | Env var | Description | -| ----------------- | ----- | ----------------------- | ------------------------------------- | -| `--profile` | `-p` | `FBADMIN_PROFILE` | Named profile from config | -| `--project` | | `FBADMIN_PROJECT` | Firebase project ID | -| `--credentials` | `-c` | `FBADMIN_CREDENTIALS` | Path to service account JSON | -| `--emulator-host` | `-e` | `FBADMIN_EMULATOR_HOST` | Emulator host:port | -| `--format` | `-f` | | Output format: `table`, `json`, `csv` | -| `--dry-run` | | | Preview destructive operations | -| `--yes` | `-y` | | Skip confirmation prompts | -| `--verbose` | `-v` | | Increase verbosity (`-vv`, `-vvv`) | +| Flag | Short | Env var | Description | +| ----------------- | ----- | ------------------------ | ------------------------------------- | +| `--profile` | `-p` | `FIRE_AUTH_PROFILE` | Named profile from config | +| `--project` | | `FIRE_AUTH_PROJECT` | Firebase project ID | +| `--credentials` | `-c` | `FIRE_AUTH_CREDENTIALS` | Path to service account JSON | +| `--emulator-host` | `-e` | `FIRE_AUTH_EMULATOR_HOST`| Emulator host:port | +| `--format` | `-f` | | Output format: `table`, `json`, `csv` | +| `--dry-run` | | | Preview destructive operations | +| `--yes` | `-y` | | Skip confirmation prompts | +| `--verbose` | `-v` | | Increase verbosity (`-vv`, `-vvv`) | ## Output formats ```bash -fbadmin users list -f table # Human-readable table (default) -fbadmin users list -f json # NDJSON — one JSON object per line -fbadmin users list -f csv # CSV with headers -fbadmin claims get --email user@example.com -f json # Single record as JSON +fire-auth users list -f table # Human-readable table (default) +fire-auth users list -f json # NDJSON — one JSON object per line +fire-auth users list -f csv # CSV with headers +fire-auth claims get --email user@example.com -f json # Single record as JSON ``` ## License -AGPL-3.0-only — see [LICENSE](LICENSE). \ No newline at end of file +AGPL-3.0-only — see [LICENSE](LICENSE). diff --git a/RELEASES.md b/RELEASES.md index 77152d8..a71fca3 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -1,3 +1,13 @@ +# v0.2.0 + +Renamed from `fbadmin` to `fire-auth`. + +- **Binary**: `fbadmin` → `fire-auth` +- **Package**: `fbadmin` → `firebase-auth-cli` +- **Env vars**: `FBADMIN_*` → `FIRE_AUTH_*` +- **Config**: confy app name `fire-auth`, local override `.fire-auth.toml` +- **Homebrew tap**: `NeoScript/homebrew-fbadmin` → `NeoScript/homebrew-fire-auth` + # v0.1.0 Initial release of fbadmin — Firebase Auth administration CLI. diff --git a/dist-workspace.toml b/dist-workspace.toml index c539198..bafa506 100644 --- a/dist-workspace.toml +++ b/dist-workspace.toml @@ -12,5 +12,5 @@ installers = ["shell", "powershell", "homebrew"] # Target platforms to build apps for (Rust target-triple syntax) targets = ["aarch64-apple-darwin", "aarch64-unknown-linux-gnu", "x86_64-apple-darwin", "x86_64-unknown-linux-gnu", "x86_64-pc-windows-msvc"] # Homebrew tap -tap = "NeoScript/homebrew-fbadmin" +tap = "NeoScript/homebrew-fire-auth" publish-jobs = ["homebrew"] diff --git a/docs/RELEASING.md b/docs/RELEASING.md index 9f5e754..68fad2a 100644 --- a/docs/RELEASING.md +++ b/docs/RELEASING.md @@ -1,11 +1,11 @@ -# Releasing fbadmin +# Releasing fire-auth Releases are automated via [cargo-dist](https://opensource.axo.dev/cargo-dist/). Pushing a semver tag triggers GitHub Actions which builds binaries, creates a GitHub Release, and publishes a Homebrew formula. ## Prerequisites -- Push access to `NeoScript/firebase-admin-cli` -- `HOMEBREW_TAP_TOKEN` repo secret set on `firebase-admin-cli` — a fine-grained PAT with **Contents: Read and write** on `NeoScript/homebrew-fbadmin` +- Push access to `NeoScript/firebase-auth-cli` +- `HOMEBREW_TAP_TOKEN` repo secret set on `firebase-auth-cli` — a fine-grained PAT with **Contents: Read and write** on `NeoScript/homebrew-fire-auth` ## Release checklist @@ -45,7 +45,7 @@ Releases are automated via [cargo-dist](https://opensource.axo.dev/cargo-dist/). git push origin main --tags ``` -6. **Monitor** the Release workflow at https://github.com/NeoScript/firebase-admin-cli/actions +6. **Monitor** the Release workflow at https://github.com/NeoScript/firebase-auth-cli/actions ## What the workflow does @@ -60,7 +60,7 @@ The `release.yml` workflow: - `x86_64-pc-windows-msvc` (Windows x64) 3. **build-global-artifacts** — generates shell/powershell installer scripts and checksums 4. **host** — creates the GitHub Release and uploads all artifacts -5. **publish-homebrew-formula** — pushes a `.rb` formula to `NeoScript/homebrew-fbadmin` +5. **publish-homebrew-formula** — pushes a `.rb` formula to `NeoScript/homebrew-fire-auth` 6. **announce** — finalizes the release ## Configuration @@ -73,7 +73,7 @@ cargo-dist-version = "0.31.0" ci = "github" installers = ["shell", "powershell", "homebrew"] targets = [...] -tap = "NeoScript/homebrew-fbadmin" +tap = "NeoScript/homebrew-fire-auth" publish-jobs = ["homebrew"] ``` @@ -96,6 +96,6 @@ To change targets, installers, or upgrade cargo-dist, edit this file and run `di git push origin vX.Y.Z ``` -- **Homebrew publish failed**: verify the `HOMEBREW_TAP_TOKEN` secret is set and the PAT hasn't expired. The token needs **Contents: Read and write** on `NeoScript/homebrew-fbadmin`. +- **Homebrew publish failed**: verify the `HOMEBREW_TAP_TOKEN` secret is set and the PAT hasn't expired. The token needs **Contents: Read and write** on `NeoScript/homebrew-fire-auth`. - **Build failed for a target**: check the build logs in GitHub Actions. Common causes are missing system deps for cross-compilation or Rust version mismatches. diff --git a/src/commands/config_cmd.rs b/src/commands/config_cmd.rs index 8020e56..1385c52 100644 --- a/src/commands/config_cmd.rs +++ b/src/commands/config_cmd.rs @@ -104,7 +104,7 @@ async fn add( { bail!( "At least one of --project, --credentials, or --emulator-host is required.\n\ - Use 'fbadmin config init' for an interactive wizard." + Use 'fire-auth config init' for an interactive wizard." ); } @@ -152,7 +152,7 @@ async fn list(cli: &Cli) -> Result<()> { let config = load_config()?; if config.profiles.is_empty() { - render_message("No profiles configured. Run 'fbadmin config init' to create one."); + render_message("No profiles configured. Run 'fire-auth config init' to create one."); return Ok(()); } @@ -267,7 +267,7 @@ async fn path(_cli: &Cli) -> Result<()> { let global_path = config_dir()?; render_message(&format!("Global: {}", global_path.display())); - let local_path = std::path::PathBuf::from(".fbadmin.toml"); + let local_path = std::path::PathBuf::from(".fire-auth.toml"); if local_path.exists() { render_message(&format!("Local: {}", local_path.display())); } else { diff --git a/src/config.rs b/src/config.rs index 0f21f8b..5cb77e1 100644 --- a/src/config.rs +++ b/src/config.rs @@ -5,7 +5,7 @@ use anyhow::{Context, Result, bail}; use serde::{Deserialize, Serialize}; #[derive(Debug, Serialize, Deserialize, Default, Clone)] -pub struct FbadminConfig { +pub struct FireAuthConfig { pub default_profile: Option, #[serde(default)] pub profiles: HashMap, @@ -27,26 +27,26 @@ pub struct ResolvedConnection { } pub fn config_dir() -> Result { - let path = confy::get_configuration_file_path("fbadmin", "config") + let path = confy::get_configuration_file_path("fire-auth", "config") .context("Failed to determine config path")?; Ok(path) } -pub fn load_config() -> Result { - let global: FbadminConfig = - confy::load("fbadmin", "config").context("Failed to load global config")?; +pub fn load_config() -> Result { + let global: FireAuthConfig = + confy::load("fire-auth", "config").context("Failed to load global config")?; - let local_path = PathBuf::from(".fbadmin.toml"); + let local_path = PathBuf::from(".fire-auth.toml"); if local_path.exists() { - let local: FbadminConfig = - confy::load_path(&local_path).context("Failed to load local config (.fbadmin.toml)")?; + let local: FireAuthConfig = + confy::load_path(&local_path).context("Failed to load local config (.fire-auth.toml)")?; Ok(merge_configs(global, local)) } else { Ok(global) } } -fn merge_configs(global: FbadminConfig, local: FbadminConfig) -> FbadminConfig { +fn merge_configs(global: FireAuthConfig, local: FireAuthConfig) -> FireAuthConfig { let mut merged = global; for (name, local_profile) in local.profiles { @@ -71,7 +71,7 @@ fn merge_configs(global: FbadminConfig, local: FbadminConfig) -> FbadminConfig { pub fn resolve_profile_name( cli_profile: &Option, - config: &FbadminConfig, + config: &FireAuthConfig, ) -> Result> { if let Some(name) = cli_profile { if !config.profiles.contains_key(name) { @@ -90,11 +90,11 @@ pub fn resolve_profile_name( return Ok(Some(name.clone())); } - if let Ok(env_profile) = std::env::var("FBADMIN_PROFILE") { + if let Ok(env_profile) = std::env::var("FIRE_AUTH_PROFILE") { if !config.profiles.contains_key(&env_profile) { let available: Vec<&str> = config.profiles.keys().map(|s| s.as_str()).collect(); bail!( - "Profile '{}' (from FBADMIN_PROFILE) not found. Available: {}", + "Profile '{}' (from FIRE_AUTH_PROFILE) not found. Available: {}", env_profile, if available.is_empty() { "(none)".to_string() @@ -103,7 +103,7 @@ pub fn resolve_profile_name( } ); } - tracing::debug!("Using profile '{env_profile}' from FBADMIN_PROFILE env"); + tracing::debug!("Using profile '{env_profile}' from FIRE_AUTH_PROFILE env"); return Ok(Some(env_profile)); } @@ -131,8 +131,8 @@ pub fn resolve_connection( let p = config.profiles.get(name).cloned().unwrap_or_default(); let source = if cli_profile.is_some() { "cli flag".to_string() - } else if std::env::var("FBADMIN_PROFILE").is_ok() { - "env:FBADMIN_PROFILE".to_string() + } else if std::env::var("FIRE_AUTH_PROFILE").is_ok() { + "env:FIRE_AUTH_PROFILE".to_string() } else { "default_profile".to_string() }; @@ -167,16 +167,16 @@ pub fn resolve_connection( }) } -pub fn save_config(config: &FbadminConfig) -> Result<()> { - confy::store("fbadmin", "config", config).context("Failed to save config")?; +pub fn save_config(config: &FireAuthConfig) -> Result<()> { + confy::store("fire-auth", "config", config).context("Failed to save config")?; Ok(()) } -pub fn add_profile(config: &mut FbadminConfig, name: String, profile: Profile) { +pub fn add_profile(config: &mut FireAuthConfig, name: String, profile: Profile) { config.profiles.insert(name, profile); } -pub fn remove_profile(config: &mut FbadminConfig, name: &str) -> Result<()> { +pub fn remove_profile(config: &mut FireAuthConfig, name: &str) -> Result<()> { if config.profiles.remove(name).is_none() { bail!("Profile '{}' not found", name); } @@ -186,7 +186,7 @@ pub fn remove_profile(config: &mut FbadminConfig, name: &str) -> Result<()> { Ok(()) } -pub fn set_default(config: &mut FbadminConfig, name: &str) -> Result<()> { +pub fn set_default(config: &mut FireAuthConfig, name: &str) -> Result<()> { if !config.profiles.contains_key(name) { bail!("Profile '{}' not found", name); } diff --git a/src/main.rs b/src/main.rs index 527d896..7d65273 100644 --- a/src/main.rs +++ b/src/main.rs @@ -11,7 +11,7 @@ use clap::{ArgAction, Parser, Subcommand, ValueEnum}; #[derive(Parser)] #[command( - name = "fbadmin", + name = "fire-auth", version, long_version = const_format::formatcp!( "{}\n{} ({})", @@ -25,18 +25,18 @@ pub struct Cli { #[arg( long, short = 'p', - env = "FBADMIN_PROFILE", + env = "FIRE_AUTH_PROFILE", help = "Use a named profile from config" )] pub profile: Option, - #[arg(long, env = "FBADMIN_PROJECT", help = "Firebase project ID (uses ADC)")] + #[arg(long, env = "FIRE_AUTH_PROJECT", help = "Firebase project ID (uses ADC)")] pub project: Option, #[arg( long, short = 'c', - env = "FBADMIN_CREDENTIALS", + env = "FIRE_AUTH_CREDENTIALS", help = "Path to service account JSON" )] pub credentials: Option, @@ -44,7 +44,7 @@ pub struct Cli { #[arg( long, short = 'e', - env = "FBADMIN_EMULATOR_HOST", + env = "FIRE_AUTH_EMULATOR_HOST", help = "Connect to emulator (host:port)" )] pub emulator_host: Option, @@ -263,7 +263,7 @@ fn init_logging(verbose: u8) { 2 => "debug", _ => "trace", }; - let filter = tracing_subscriber::EnvFilter::new(format!("fbadmin={level}")); + let filter = tracing_subscriber::EnvFilter::new(format!("fire_auth={level}")); tracing_subscriber::fmt() .with_env_filter(filter) .with_writer(std::io::stderr)