Skip to content

Commit 60e306c

Browse files
committed
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
1 parent 088070b commit 60e306c

11 files changed

Lines changed: 139 additions & 125 deletions

File tree

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ jobs:
293293
- uses: actions/checkout@v6
294294
with:
295295
persist-credentials: true
296-
repository: "NeoScript/homebrew-fbadmin"
296+
repository: "NeoScript/homebrew-fire-auth"
297297
token: ${{ secrets.HOMEBREW_TAP_TOKEN }}
298298
# So we have access to the formula
299299
- name: Fetch homebrew formulae

AGENTS.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Project overview
44

5-
**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.
5+
**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.
66

77
## Repository layout
88

@@ -33,7 +33,7 @@ Cargo.toml # Dependencies, package metadata, profiles
3333
- **Error handling**: SDK calls return `Result<T, error_stack::Report<ApiClientError>>`. Use the `IntoAnyhow` trait (`.into_anyhow()`) to convert, then chain `.context("human-readable message")` for user-facing errors.
3434
- **Interactive prompts**: When a required arg is `None`, command modules call `prompt::resolve_email()` or similar. These use `dialoguer` and are TTY-aware.
3535
- **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.
36-
- **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()`.
36+
- **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()`.
3737
- **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.
3838
- **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.
3939

Cargo.lock

Lines changed: 24 additions & 24 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
[package]
2-
name = "fbadmin"
3-
version = "0.1.0"
2+
name = "firebase-auth-cli"
3+
version = "0.2.0"
44
edition = "2024"
55
rust-version = "1.94"
66
description = "Firebase Auth administration CLI"
77
license = "AGPL-3.0-only"
8-
repository = "https://github.com/NeoScript/firebase-admin-cli"
9-
homepage = "https://github.com/NeoScript/firebase-admin-cli"
8+
repository = "https://github.com/NeoScript/firebase-auth-cli"
9+
homepage = "https://github.com/NeoScript/firebase-auth-cli"
10+
11+
[[bin]]
12+
name = "fire-auth"
13+
path = "src/main.rs"
1014

1115
[dependencies]
1216
anyhow = "1"

README.md

Lines changed: 57 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# fbadmin
1+
# fire-auth
22

33
A command-line tool for managing Firebase Authentication — users, custom claims, auth action links, and emulator utilities.
44

@@ -14,121 +14,121 @@ cargo install --path .
1414

1515
```bash
1616
# Interactive setup — creates a named profile
17-
fbadmin config init
17+
fire-auth config init
1818

1919
# Or connect directly with flags / env vars
20-
fbadmin --credentials ~/sa-key.json users list
21-
fbadmin -e localhost:9099 emulator clear-users
22-
export FBADMIN_PROJECT=my-project
23-
fbadmin users count
20+
fire-auth --credentials ~/sa-key.json users list
21+
fire-auth -e localhost:9099 emulator clear-users
22+
export FIRE_AUTH_PROJECT=my-project
23+
fire-auth users count
2424
```
2525

2626
## Authentication
2727

28-
fbadmin resolves credentials in this order:
28+
fire-auth resolves credentials in this order:
2929

30-
1. `--credentials` / `FBADMIN_CREDENTIALS` — path to a service account JSON file
31-
2. `--project` / `FBADMIN_PROJECT` — project ID using Application Default Credentials
32-
3. `--emulator-host` / `FBADMIN_EMULATOR_HOST` — connect to the Firebase Auth emulator
30+
1. `--credentials` / `FIRE_AUTH_CREDENTIALS` — path to a service account JSON file
31+
2. `--project` / `FIRE_AUTH_PROJECT` — project ID using Application Default Credentials
32+
3. `--emulator-host` / `FIRE_AUTH_EMULATOR_HOST` — connect to the Firebase Auth emulator
3333
4. Profile settings from config (see below)
3434

3535
## Configuration
3636

3737
Profiles store connection settings so you don't need to pass flags every time.
3838

3939
```bash
40-
fbadmin config init # Guided wizard
41-
fbadmin config add prod --credentials ~/keys/prod-sa.json
42-
fbadmin config add local --emulator-host localhost:9099
43-
fbadmin config default prod # Set the default profile
44-
fbadmin config list # Show all profiles
45-
fbadmin config which # Show resolved connection chain
46-
fbadmin config path # Print config file locations
40+
fire-auth config init # Guided wizard
41+
fire-auth config add prod --credentials ~/keys/prod-sa.json
42+
fire-auth config add local --emulator-host localhost:9099
43+
fire-auth config default prod # Set the default profile
44+
fire-auth config list # Show all profiles
45+
fire-auth config which # Show resolved connection chain
46+
fire-auth config path # Print config file locations
4747
```
4848

49-
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).
49+
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).
5050

5151
## Commands
5252

5353
### Users
5454

5555
```bash
56-
fbadmin users get --email user@example.com
57-
fbadmin users get --uid abc123
58-
fbadmin users create --email new@example.com
59-
fbadmin users create --email new@example.com --password s3cret --display-name "Jane Doe"
60-
fbadmin users disable --email user@example.com
61-
fbadmin users enable --email user@example.com
62-
fbadmin users remove --csv uids.csv # Bulk delete from CSV
63-
fbadmin users list --limit 50
64-
fbadmin users list-inactive --days 90
65-
fbadmin users count
56+
fire-auth users get --email user@example.com
57+
fire-auth users get --uid abc123
58+
fire-auth users create --email new@example.com
59+
fire-auth users create --email new@example.com --password s3cret --display-name "Jane Doe"
60+
fire-auth users disable --email user@example.com
61+
fire-auth users enable --email user@example.com
62+
fire-auth users remove --csv uids.csv # Bulk delete from CSV
63+
fire-auth users list --limit 50
64+
fire-auth users list-inactive --days 90
65+
fire-auth users count
6666
```
6767

6868
Missing required arguments are prompted interactively when running in a terminal. Passwords are auto-generated if omitted.
6969

7070
### Custom claims
7171

7272
```bash
73-
fbadmin claims get --email user@example.com
74-
fbadmin claims merge role admin --email user@example.com
75-
fbadmin claims merge tier 2 --email user@example.com # Auto-detects int
76-
fbadmin claims merge prefs '{"dark":true}' --email user@example.com # JSON
77-
fbadmin claims remove role --email user@example.com
78-
fbadmin claims clear --email user@example.com
79-
fbadmin claims find admin # Find all users with "admin" claim
80-
fbadmin claims find role admin --exclusive # Only where role is the sole claim
73+
fire-auth claims get --email user@example.com
74+
fire-auth claims merge role admin --email user@example.com
75+
fire-auth claims merge tier 2 --email user@example.com # Auto-detects int
76+
fire-auth claims merge prefs '{"dark":true}' --email user@example.com # JSON
77+
fire-auth claims remove role --email user@example.com
78+
fire-auth claims clear --email user@example.com
79+
fire-auth claims find admin # Find all users with "admin" claim
80+
fire-auth claims find role admin --exclusive # Only where role is the sole claim
8181
```
8282

8383
Use `--dry-run` with `merge`, `remove`, and `clear` to preview changes without writing.
8484

8585
### Auth action links
8686

8787
```bash
88-
fbadmin links password-reset --email user@example.com
89-
fbadmin links email-verify --email user@example.com
90-
fbadmin links sign-in --email user@example.com
88+
fire-auth links password-reset --email user@example.com
89+
fire-auth links email-verify --email user@example.com
90+
fire-auth links sign-in --email user@example.com
9191
```
9292

9393
### Emulator
9494

9595
These commands only work when connected to an emulator.
9696

9797
```bash
98-
fbadmin -e localhost:9099 emulator clear-users
99-
fbadmin -e localhost:9099 emulator config
98+
fire-auth -e localhost:9099 emulator clear-users
99+
fire-auth -e localhost:9099 emulator config
100100
```
101101

102102
### Connection info
103103

104104
```bash
105-
fbadmin info # Shows resolved profile, project, credentials, and verifies connectivity
105+
fire-auth info # Shows resolved profile, project, credentials, and verifies connectivity
106106
```
107107

108108
## Global flags
109109

110110

111-
| Flag | Short | Env var | Description |
112-
| ----------------- | ----- | ----------------------- | ------------------------------------- |
113-
| `--profile` | `-p` | `FBADMIN_PROFILE` | Named profile from config |
114-
| `--project` | | `FBADMIN_PROJECT` | Firebase project ID |
115-
| `--credentials` | `-c` | `FBADMIN_CREDENTIALS` | Path to service account JSON |
116-
| `--emulator-host` | `-e` | `FBADMIN_EMULATOR_HOST` | Emulator host:port |
117-
| `--format` | `-f` | | Output format: `table`, `json`, `csv` |
118-
| `--dry-run` | | | Preview destructive operations |
119-
| `--yes` | `-y` | | Skip confirmation prompts |
120-
| `--verbose` | `-v` | | Increase verbosity (`-vv`, `-vvv`) |
111+
| Flag | Short | Env var | Description |
112+
| ----------------- | ----- | ------------------------ | ------------------------------------- |
113+
| `--profile` | `-p` | `FIRE_AUTH_PROFILE` | Named profile from config |
114+
| `--project` | | `FIRE_AUTH_PROJECT` | Firebase project ID |
115+
| `--credentials` | `-c` | `FIRE_AUTH_CREDENTIALS` | Path to service account JSON |
116+
| `--emulator-host` | `-e` | `FIRE_AUTH_EMULATOR_HOST`| Emulator host:port |
117+
| `--format` | `-f` | | Output format: `table`, `json`, `csv` |
118+
| `--dry-run` | | | Preview destructive operations |
119+
| `--yes` | `-y` | | Skip confirmation prompts |
120+
| `--verbose` | `-v` | | Increase verbosity (`-vv`, `-vvv`) |
121121

122122

123123
## Output formats
124124

125125
```bash
126-
fbadmin users list -f table # Human-readable table (default)
127-
fbadmin users list -f json # NDJSON — one JSON object per line
128-
fbadmin users list -f csv # CSV with headers
129-
fbadmin claims get --email user@example.com -f json # Single record as JSON
126+
fire-auth users list -f table # Human-readable table (default)
127+
fire-auth users list -f json # NDJSON — one JSON object per line
128+
fire-auth users list -f csv # CSV with headers
129+
fire-auth claims get --email user@example.com -f json # Single record as JSON
130130
```
131131

132132
## License
133133

134-
AGPL-3.0-only — see [LICENSE](LICENSE).
134+
AGPL-3.0-only — see [LICENSE](LICENSE).

RELEASES.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
# v0.2.0
2+
3+
Renamed from `fbadmin` to `fire-auth`.
4+
5+
- **Binary**: `fbadmin``fire-auth`
6+
- **Package**: `fbadmin``firebase-auth-cli`
7+
- **Env vars**: `FBADMIN_*``FIRE_AUTH_*`
8+
- **Config**: confy app name `fire-auth`, local override `.fire-auth.toml`
9+
- **Homebrew tap**: `NeoScript/homebrew-fbadmin``NeoScript/homebrew-fire-auth`
10+
111
# v0.1.0
212

313
Initial release of fbadmin — Firebase Auth administration CLI.

dist-workspace.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@ installers = ["shell", "powershell", "homebrew"]
1212
# Target platforms to build apps for (Rust target-triple syntax)
1313
targets = ["aarch64-apple-darwin", "aarch64-unknown-linux-gnu", "x86_64-apple-darwin", "x86_64-unknown-linux-gnu", "x86_64-pc-windows-msvc"]
1414
# Homebrew tap
15-
tap = "NeoScript/homebrew-fbadmin"
15+
tap = "NeoScript/homebrew-fire-auth"
1616
publish-jobs = ["homebrew"]

docs/RELEASING.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
# Releasing fbadmin
1+
# Releasing fire-auth
22

33
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.
44

55
## Prerequisites
66

7-
- Push access to `NeoScript/firebase-admin-cli`
8-
- `HOMEBREW_TAP_TOKEN` repo secret set on `firebase-admin-cli` — a fine-grained PAT with **Contents: Read and write** on `NeoScript/homebrew-fbadmin`
7+
- Push access to `NeoScript/firebase-auth-cli`
8+
- `HOMEBREW_TAP_TOKEN` repo secret set on `firebase-auth-cli` — a fine-grained PAT with **Contents: Read and write** on `NeoScript/homebrew-fire-auth`
99

1010
## Release checklist
1111

@@ -45,7 +45,7 @@ Releases are automated via [cargo-dist](https://opensource.axo.dev/cargo-dist/).
4545
git push origin main --tags
4646
```
4747

48-
6. **Monitor** the Release workflow at https://github.com/NeoScript/firebase-admin-cli/actions
48+
6. **Monitor** the Release workflow at https://github.com/NeoScript/firebase-auth-cli/actions
4949

5050
## What the workflow does
5151

@@ -60,7 +60,7 @@ The `release.yml` workflow:
6060
- `x86_64-pc-windows-msvc` (Windows x64)
6161
3. **build-global-artifacts** — generates shell/powershell installer scripts and checksums
6262
4. **host** — creates the GitHub Release and uploads all artifacts
63-
5. **publish-homebrew-formula** — pushes a `.rb` formula to `NeoScript/homebrew-fbadmin`
63+
5. **publish-homebrew-formula** — pushes a `.rb` formula to `NeoScript/homebrew-fire-auth`
6464
6. **announce** — finalizes the release
6565

6666
## Configuration
@@ -73,7 +73,7 @@ cargo-dist-version = "0.31.0"
7373
ci = "github"
7474
installers = ["shell", "powershell", "homebrew"]
7575
targets = [...]
76-
tap = "NeoScript/homebrew-fbadmin"
76+
tap = "NeoScript/homebrew-fire-auth"
7777
publish-jobs = ["homebrew"]
7878
```
7979

@@ -96,6 +96,6 @@ To change targets, installers, or upgrade cargo-dist, edit this file and run `di
9696
git push origin vX.Y.Z
9797
```
9898

99-
- **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`.
99+
- **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`.
100100

101101
- **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.

src/commands/config_cmd.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ async fn add(
104104
{
105105
bail!(
106106
"At least one of --project, --credentials, or --emulator-host is required.\n\
107-
Use 'fbadmin config init' for an interactive wizard."
107+
Use 'fire-auth config init' for an interactive wizard."
108108
);
109109
}
110110

@@ -152,7 +152,7 @@ async fn list(cli: &Cli) -> Result<()> {
152152
let config = load_config()?;
153153

154154
if config.profiles.is_empty() {
155-
render_message("No profiles configured. Run 'fbadmin config init' to create one.");
155+
render_message("No profiles configured. Run 'fire-auth config init' to create one.");
156156
return Ok(());
157157
}
158158

@@ -267,7 +267,7 @@ async fn path(_cli: &Cli) -> Result<()> {
267267
let global_path = config_dir()?;
268268
render_message(&format!("Global: {}", global_path.display()));
269269

270-
let local_path = std::path::PathBuf::from(".fbadmin.toml");
270+
let local_path = std::path::PathBuf::from(".fire-auth.toml");
271271
if local_path.exists() {
272272
render_message(&format!("Local: {}", local_path.display()));
273273
} else {

0 commit comments

Comments
 (0)