id = "firebase" name = "Firebase CLI" homepage = "https://firebase.google.com/docs/cli" description = "The Firebase Command Line Tools." icon = "SimpleIcons:firebase" executables = ["firebase"] [dotfiles] # src/configstore.ts is `new Configstore(pkg.name)` with pkg.name # "firebase-tools". configstore's index.js builds the path as # /configstore/.json, and xdg-basedir resolves its config export # to $XDG_CONFIG_HOME or os.homedir()/.config on every platform — including # Windows, which is why there is no %APPDATA% spelling here. paths = ["~/.config/configstore/firebase-tools.json"] exclude = [] # Not a whole-file secret: the same document carries the `previews` feature # flags and the `usage` analytics choice, which are settings worth syncing. secret = [] # src/types/auth/index.d.ts: Tokens is { id_token?, access_token, refresh_token?, # scopes? }. The default account's tokens are stored under `tokens` and every # extra `firebase login:add` account under additionalAccounts[].tokens. # `firebase login:ci` prints tokens.refresh_token as the CI credential. [[dotfiles.secret_paths]] file = "~/.config/configstore/firebase-tools.json" match = { key_path = [ "tokens.id_token", "tokens.access_token", "tokens.refresh_token", "additionalAccounts.*.tokens.id_token", "additionalAccounts.*.tokens.access_token", "additionalAccounts.*.tokens.refresh_token", ] } # src/auth.ts keys both maps by the absolute path of a project directory on this # machine: activeProjects maps it to a Firebase project alias and activeAccounts # to the account used there. The whole map is machine-local, keys and all — but # the pairings are what `firebase use` recorded on the user's behalf, and they # would have to be redone checkout by checkout after a rebuild, so the map is # kept: backup. [[dotfiles.machine_lines]] file = "~/.config/configstore/firebase-tools.json" match = { key_path = ["activeProjects", "activeAccounts"] } scope = "backup" [commands] format = 1 label = "Firebase CLI" description = "Deploy to Firebase and run the local emulators. Other commands (auth, hosting channels, functions config) are left out." quality = "ai-draft" base = "fig:firebase" parser = { end_of_options = "--", interleave = "permute", long_equals = true, short_attached = true, short_bundles = false } [[commands.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/firebase.ts" license = "MIT" [[commands.subcommand]] path = ["deploy"] label = "Deploy to Firebase" [[commands.subcommand.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/firebase.ts" license = "MIT" [[commands.subcommand.field]] id = "only" label = "Only these targets" description = "Comma-separated, e.g. hosting,storage." type = "string" option = ["--only"] suggestions = [{ value = "hosting", label = "hosting" }, { value = "functions", label = "functions" }, { value = "firestore", label = "firestore" }, { value = "storage", label = "storage" }, { value = "database", label = "database" }] sources = ["fig"] [[commands.subcommand.field]] id = "except" label = "Except these targets" type = "string" option = ["--except"] sources = ["fig"] [[commands.subcommand.field]] id = "message" label = "Deploy message" type = "string" option = ["--message", "-m"] sources = ["fig"] [[commands.subcommand.field]] id = "public" label = "Hosting public directory" type = "path" option = ["--public", "-p"] path = { kind = "directory", role = "input" } sources = ["fig"] [[commands.subcommand.field]] id = "force" label = "Delete functions missing locally" description = "Deletes Cloud Functions not in the working directory without confirmation." type = "boolean" option = ["--force", "-f"] effect = "delete" sources = ["fig"] [[commands.subcommand.task]] id = "hosting" label = "Deploy hosting only" set = { only = ["hosting"] } lock = ["only"] fields = ["only", "message"] required = [] [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["only", "except"] [[commands.subcommand.group]] id = "advanced" label = "Advanced" fields = ["message", "public", "force"] [[commands.subcommand]] path = ["emulators:start"] label = "Start emulators" [[commands.subcommand.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/firebase.ts" license = "MIT" [[commands.subcommand.field]] id = "only" label = "Only these emulators" description = "Comma-separated list of emulator names." type = "string" option = ["--only"] sources = ["fig"] [[commands.subcommand.field]] id = "export_on_exit" label = "Export data on exit" type = "boolean" option = ["--export-on-exit"] sources = ["fig"] [[commands.subcommand.field]] id = "import" label = "Import data from" type = "path" option = ["--import"] path = { kind = "directory", role = "input" } sources = ["fig"] [[commands.subcommand.task]] id = "start" label = "Start emulators" fields = ["only", "import", "export_on_exit"] required = [] [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["only", "export_on_exit", "import"] [[commands.subcommand]] path = ["init"] label = "Set up a Firebase project" [[commands.subcommand.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/firebase.ts" license = "MIT"