data
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.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 reuse the same stored profile from scripts, coding CLIs, Lua, and MCP.
| Key | Env var | Type | Required | Label |
|---|---|---|---|---|
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 |
Command Patterns
The generic command is stable across every integration. The provider shortcut is shorter for humans.
kosmo integrations:call firebase.firebase_list_projects '{"page_size":1,"page_token":"example_page_token"}' --json kosmo integrations:firebase firebase_list_projects '{"page_size":1,"page_token":"example_page_token"}' --json Discovery
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 Automation Contexts
The same configured command surface works in these environments. The command does not change unless the host wrapper, credentials, or permissions change.
CLI Functions
Every function below can be called headlessly. Commands are highlighted, copyable, and scroll horizontally when payloads are long.
firebase.firebase_list_projects
List all Firebase projects the caller has access to. Returns project display names and IDs.
read - Parameters
- page_size, page_token
kosmo integrations:call firebase.firebase_list_projects '{"page_size":1,"page_token":"example_page_token"}' --json kosmo integrations:firebase firebase_list_projects '{"page_size":1,"page_token":"example_page_token"}' --json firebase.firebase_get_project
Get details of a specific Firebase project by its resource name.
read - Parameters
- name
kosmo integrations:call firebase.firebase_get_project '{"name":"example_name"}' --json kosmo integrations:firebase firebase_get_project '{"name":"example_name"}' --json firebase.firebase_list_databases
List Cloud Firestore databases in a Firebase project.
read - Parameters
- parent
kosmo integrations:call firebase.firebase_list_databases '{"parent":"example_parent"}' --json kosmo integrations:firebase firebase_list_databases '{"parent":"example_parent"}' --json firebase.firebase_list_documents
List documents in a Firestore collection.
read - Parameters
- parent, collection_id, page_size, page_token, order_by
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 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
List collection IDs under a Firestore document or database root.
read - Parameters
- parent, page_size, page_token
kosmo integrations:call firebase.firebase_list_collections '{"parent":"example_parent","page_size":1,"page_token":"example_page_token"}' --json kosmo integrations:firebase firebase_list_collections '{"parent":"example_parent","page_size":1,"page_token":"example_page_token"}' --json firebase.firebase_list_users
List users in a Firebase project via the Identity Toolkit API.
read - Parameters
- max_results, page_token
kosmo integrations:call firebase.firebase_list_users '{"max_results":1,"page_token":"example_page_token"}' --json kosmo integrations:firebase firebase_list_users '{"max_results":1,"page_token":"example_page_token"}' --json firebase.firebase_get_current_user
Get the currently authenticated OAuth2 user profile information.
read - Parameters
- none
kosmo integrations:call firebase.firebase_get_current_user '{}' --json 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 2 parameters
kosmo integrations:schema firebase.firebase_list_projects --json | Parameter | Type | Required | Description |
|---|---|---|---|
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 1 parameters
kosmo integrations:schema firebase.firebase_get_project --json | Parameter | Type | Required | Description |
|---|---|---|---|
name | string | yes | The project resource name (e.g. "projects/my-project-id"). |
firebase.firebase_list_databases 1 parameters
kosmo integrations:schema firebase.firebase_list_databases --json | Parameter | Type | Required | Description |
|---|---|---|---|
parent | string | no | The parent project name (e.g. "projects/my-project-id"). If omitted, uses the configured project ID. |
firebase.firebase_list_documents 5 parameters
kosmo integrations:schema firebase.firebase_list_documents --json | Parameter | Type | Required | Description |
|---|---|---|---|
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 3 parameters
kosmo integrations:schema firebase.firebase_list_collections --json | Parameter | Type | Required | Description |
|---|---|---|---|
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 2 parameters
kosmo integrations:schema firebase.firebase_list_users --json | Parameter | Type | Required | Description |
|---|---|---|---|
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 0 parameters
kosmo integrations:schema firebase.firebase_get_current_user --json | Parameter | Type | Required | Description |
|---|---|---|---|
| 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.