KosmoKrator

other

Firebase CLI for AI Agents

Use the Firebase CLI from KosmoKrator to call Firebase tools headlessly, return JSON, inspect schemas, and automate workflows from coding agents, scripts, and CI.

7 functions 7 read 0 write Manual OAuth token auth

Firebase CLI Setup

Firebase can be configured headlessly with `kosmokrator integrations:configure firebase`.

# Install KosmoKrator first if it is not available on PATH.
curl -fsSL https://raw.githubusercontent.com/OpenCompanyApp/kosmokrator/main/install.sh | bash

# Configure and verify this integration.
kosmokrator integrations:configure firebase --set access_token="$FIREBASE_ACCESS_TOKEN" --set project_id="$FIREBASE_PROJECT_ID" --enable --read allow --write ask --json
kosmokrator integrations:doctor firebase --json
kosmokrator integrations:status --json

Credentials

Authentication type: Manual OAuth token oauth2_manual_token. Configure credentials once, then use the same stored profile from scripts, coding CLIs, Lua code mode, and the MCP gateway.

KeyEnv varTypeRequiredLabel
access_token FIREBASE_ACCESS_TOKEN Secret secret yes Access Token
project_id FIREBASE_PROJECT_ID Text text yes Project ID
url FIREBASE_URL URL url no Management API URL

Call Firebase Headlessly

Use the generic call form when another coding CLI or script needs a stable universal interface.

kosmo integrations:call firebase.firebase_list_projects '{
  "page_size": 1,
  "page_token": "example_page_token"
}' --json

Use the provider shortcut form for shorter human-facing commands.

kosmo integrations:firebase firebase_list_projects '{
  "page_size": 1,
  "page_token": "example_page_token"
}' --json

Agent Discovery Commands

These commands return structured output for coding agents that need to inspect capabilities before choosing a function.

kosmo integrations:docs firebase --json
kosmo integrations:docs firebase.firebase_list_projects --json
kosmo integrations:schema firebase.firebase_list_projects --json
kosmo integrations:search "Firebase" --json
kosmo integrations:list --json

All CLI Functions

Every function below can be called headlessly. The generic form is stable across all integrations; the provider shortcut is shorter but specific to Firebase.

firebase.firebase_list_projects

Read read

List all Firebase projects the caller has access to. Returns project display names and IDs.

Parameters
page_size, page_token

Generic CLI call

kosmo integrations:call firebase.firebase_list_projects '{"page_size":1,"page_token":"example_page_token"}' --json

Provider shortcut

kosmo integrations:firebase firebase_list_projects '{"page_size":1,"page_token":"example_page_token"}' --json

firebase.firebase_get_project

Read read

Get details of a specific Firebase project by its resource name.

Parameters
name

Generic CLI call

kosmo integrations:call firebase.firebase_get_project '{"name":"example_name"}' --json

Provider shortcut

kosmo integrations:firebase firebase_get_project '{"name":"example_name"}' --json

firebase.firebase_list_databases

Read read

List Cloud Firestore databases in a Firebase project.

Parameters
parent

Generic CLI call

kosmo integrations:call firebase.firebase_list_databases '{"parent":"example_parent"}' --json

Provider shortcut

kosmo integrations:firebase firebase_list_databases '{"parent":"example_parent"}' --json

firebase.firebase_list_documents

Read read

List documents in a Firestore collection.

Parameters
parent, collection_id, page_size, page_token, order_by

Generic CLI call

kosmo integrations:call firebase.firebase_list_documents '{"parent":"example_parent","collection_id":"example_collection_id","page_size":1,"page_token":"example_page_token","order_by":"example_order_by"}' --json

Provider shortcut

kosmo integrations:firebase firebase_list_documents '{"parent":"example_parent","collection_id":"example_collection_id","page_size":1,"page_token":"example_page_token","order_by":"example_order_by"}' --json

firebase.firebase_list_collections

Read read

List collection IDs under a Firestore document or database root.

Parameters
parent, page_size, page_token

Generic CLI call

kosmo integrations:call firebase.firebase_list_collections '{"parent":"example_parent","page_size":1,"page_token":"example_page_token"}' --json

Provider shortcut

kosmo integrations:firebase firebase_list_collections '{"parent":"example_parent","page_size":1,"page_token":"example_page_token"}' --json

firebase.firebase_list_users

Read read

List users in a Firebase project via the Identity Toolkit API.

Parameters
max_results, page_token

Generic CLI call

kosmo integrations:call firebase.firebase_list_users '{"max_results":1,"page_token":"example_page_token"}' --json

Provider shortcut

kosmo integrations:firebase firebase_list_users '{"max_results":1,"page_token":"example_page_token"}' --json

firebase.firebase_get_current_user

Read read

Get the currently authenticated OAuth2 user profile information.

Parameters
none

Generic CLI call

kosmo integrations:call firebase.firebase_get_current_user '{}' --json

Provider shortcut

kosmo integrations:firebase firebase_get_current_user '{}' --json

Function Schemas

Use these parameter tables when building CLI payloads without calling integrations:schema first.

firebase.firebase_list_projects

List all Firebase projects the caller has access to. Returns project display names and IDs.

Operation
Read read
Schema command
kosmo integrations:schema firebase.firebase_list_projects --json
ParameterTypeRequiredDescription
page_size integer no Maximum number of projects to return (default: 100, max: 256).
page_token string no Token for pagination from a previous list call.

firebase.firebase_get_project

Get details of a specific Firebase project by its resource name.

Operation
Read read
Schema command
kosmo integrations:schema firebase.firebase_get_project --json
ParameterTypeRequiredDescription
name string yes The project resource name (e.g. "projects/my-project-id").

firebase.firebase_list_databases

List Cloud Firestore databases in a Firebase project.

Operation
Read read
Schema command
kosmo integrations:schema firebase.firebase_list_databases --json
ParameterTypeRequiredDescription
parent string no The parent project name (e.g. "projects/my-project-id"). If omitted, uses the configured project ID.

firebase.firebase_list_documents

List documents in a Firestore collection.

Operation
Read read
Schema command
kosmo integrations:schema firebase.firebase_list_documents --json
ParameterTypeRequiredDescription
parent string yes The parent resource (e.g. "projects/my-project/databases/(default)/documents").
collection_id string yes The collection ID to list documents from.
page_size integer no Maximum number of documents to return.
page_token string no Token for pagination from a previous list call.
order_by string no Field to order results by.

firebase.firebase_list_collections

List collection IDs under a Firestore document or database root.

Operation
Read read
Schema command
kosmo integrations:schema firebase.firebase_list_collections --json
ParameterTypeRequiredDescription
parent string yes The parent resource (e.g. "projects/my-project/databases/(default)/documents").
page_size integer no Maximum number of collection IDs to return.
page_token string no Token for pagination from a previous list call.

firebase.firebase_list_users

List users in a Firebase project via the Identity Toolkit API.

Operation
Read read
Schema command
kosmo integrations:schema firebase.firebase_list_users --json
ParameterTypeRequiredDescription
max_results integer no Maximum number of users to return (default: 1000, max: 1000).
page_token string no Token for pagination from a previous list call.

firebase.firebase_get_current_user

Get the currently authenticated OAuth2 user profile information.

Operation
Read read
Schema command
kosmo integrations:schema firebase.firebase_get_current_user --json
ParameterTypeRequiredDescription
No parameters.

Permissions

Headless calls still follow the integration read/write permission policy. Configure read/write defaults with integrations:configure. Add --force only for trusted automation that should bypass that policy.