# firebase-functions

> Firebase SDK for Cloud Functions

Latest version **7.4.0** (published 2026-09-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install firebase-functions
pnpm add firebase-functions
yarn add firebase-functions
bun add firebase-functions
```

Provides the command `firebase-functions`.

## Health

**Score 70/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; recently updated; high maintenance score; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 7.4.0 |
| Published | 2026-09-15 |
| First published | 2017-03-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=18.0.0 |
| Dependencies | 5 |
| Unpacked size | 1.4 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1069 |
| Author | Firebase Team |
| Maintainers | firebase-ops, feiyang.chen, google-wombot, chholland |
| Keywords | firebase, functions, google, cloud |

## Links

- npm: https://www.npmjs.com/package/firebase-functions
- Repository: https://github.com/firebase/firebase-functions
- Homepage: https://github.com/firebase/firebase-functions#readme
- Issues: https://github.com/firebase/firebase-functions/issues
- npm.io page: https://npm.io/package/firebase-functions

## Dependencies (5)

- [cors](https://npm.io/package/cors.md) ^2.8.5
- [express](https://npm.io/package/express.md) ^5.2.1
- [protobufjs](https://npm.io/package/protobufjs.md) ^7.2.2
- [@types/cors](https://npm.io/package/@types/cors.md) ^2.8.5
- [@types/express](https://npm.io/package/@types/express.md) ^5.0.0

## Recent versions

- 7.4.0 (latest) — 2026-09-15
- 7.3.3-rc.4 (next) — 2026-09-14
- 7.3.3-rc.3 — 2026-09-11
- 7.3.3-rc.2 — 2026-09-10
- 7.3.3-rc.1 — 2026-09-09
- 7.3.3-rc.0 — 2026-09-03
- 7.3.2 — 2026-07-28
- 7.3.2-rc.1 — 2026-07-24
- 7.3.2-rc.0 — 2026-07-21
- 7.3.1-rc.0 — 2026-07-21
- 7.3.0 — 2026-07-16
- 7.3.0-rc.0 — 2026-07-08
- 7.2.6-rc.0 — 2026-04-10
- 7.2.5 — 2026-04-08
- 7.2.4 — 2026-04-08
- … 143 more at https://npm.io/package/firebase-functions/versions

## README

# Firebase SDK for Cloud Functions

The `firebase-functions` package provides an SDK for defining Cloud Functions for Firebase.

Cloud Functions is a hosted, private, and scalable Node.js environment where you can run JavaScript code. The Firebase SDK for Cloud Functions integrates the Firebase platform by letting you write code that responds to events and invokes functionality exposed by other Firebase features.

## Learn more

Learn more about the Firebase SDK for Cloud Functions in the [Firebase documentation](https://firebase.google.com/docs/functions/) or [check out our samples](https://github.com/firebase/functions-samples).

Here are some resources to get help:

- [Start with the quickstart](https://firebase.google.com/docs/functions/write-firebase-functions)
- [Go through the guides](https://firebase.google.com/docs/functions/)
- [Read the full API reference](https://firebase.google.com/docs/reference/functions/2nd-gen/node/firebase-functions)
- [Browse some examples](https://github.com/firebase/functions-samples)

If the official documentation doesn't help, try asking through our [official support channels](https://firebase.google.com/support/)

_Please avoid double posting across multiple channels!_

## Usage

```js
// functions/index.js
const { onValueCreated } = require("firebase-functions/database");
const logger = require("firebase-functions/logger");
const notifyUsers = require("./notify-users");

exports.newPost = onValueCreated({ ref: "/posts/{postId}" }, (event) => {
  logger.info("Received new post with ID:", event.params.postId);
  return notifyUsers(event.data.val());
});
```

## Contributing

To contribute a change, [check out the contributing guide](.github/CONTRIBUTING.md).

## License

© Google, 2017. Licensed under [The MIT License](LICENSE).

---
_Source: https://npm.io/package/firebase-functions · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
