KosmoKrator

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, configure, and verify
# 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.

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

Command Patterns

The generic command is stable across every integration. The provider shortcut is shorter for humans.

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

Discovery

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

Discovery commands
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 read
Parameters
page_size, page_token
Generic call
kosmo integrations:call firebase.firebase_list_projects '{"page_size":1,"page_token":"example_page_token"}' --json
Shortcut
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 read
Parameters
name
Generic call
kosmo integrations:call firebase.firebase_get_project '{"name":"example_name"}' --json
Shortcut
kosmo integrations:firebase firebase_get_project '{"name":"example_name"}' --json

firebase.firebase_list_databases

List Cloud Firestore databases in a Firebase project.

Read read
Parameters
parent
Generic call
kosmo integrations:call firebase.firebase_list_databases '{"parent":"example_parent"}' --json
Shortcut
kosmo integrations:firebase firebase_list_databases '{"parent":"example_parent"}' --json

firebase.firebase_list_documents

List documents in a Firestore collection.

Read read
Parameters
parent, collection_id, page_size, page_token, order_by
Generic 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
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

List collection IDs under a Firestore document or database root.

Read read
Parameters
parent, page_size, page_token
Generic call
kosmo integrations:call firebase.firebase_list_collections '{"parent":"example_parent","page_size":1,"page_token":"example_page_token"}' --json
Shortcut
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 read
Parameters
max_results, page_token
Generic call
kosmo integrations:call firebase.firebase_list_users '{"max_results":1,"page_token":"example_page_token"}' --json
Shortcut
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 read
Parameters
none
Generic call
kosmo integrations:call firebase.firebase_get_current_user '{}' --json
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 2 parameters
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 1 parameters
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 1 parameters
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 5 parameters
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 3 parameters
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 2 parameters
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 0 parameters
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.