https://github.com/cloudquery/javascript-plugin-template
A starter template for a source plugin using CloudQuery JavaScript SDK
https://github.com/cloudquery/javascript-plugin-template
Last synced: 13 days ago
JSON representation
A starter template for a source plugin using CloudQuery JavaScript SDK
- Host: GitHub
- URL: https://github.com/cloudquery/javascript-plugin-template
- Owner: cloudquery
- License: mpl-2.0
- Created: 2023-09-28T13:27:15.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2026-03-25T11:13:07.000Z (about 1 month ago)
- Last Synced: 2026-03-26T13:57:07.010Z (about 1 month ago)
- Language: TypeScript
- Size: 1.74 MB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# CloudQuery JS Source Plugin Template
This is a template for a CloudQuery Source plugin using [CloudQuery JavaScript SDK](https://github.com/cloudquery/plugin-sdk-javascript).
It creates a simple table called `Names` with two rows of data.
Read about how to build a new CloudQuery plugin from this template in [Creating a New JS Plugin](https://www.cloudquery.io/blog/creating-a-new-js-plugin).
## Getting started
Install dependencies
```shell
pnpm install
```
Run the plugin locally
```shell
pnpm dev
```
Run cloudquery
```shell
cloudquery sync sync.yml
```
This will create db.sql file (a Sqlite database) with a table `Names` and two records.
## Building and publishing the plugin
1. Update the plugin metadata in [src/plugins.ts](src/plugin.ts#L99) to match your team and plugin name.
2. Run `pnpm build` to build the plugin.
3. Run `node dist/main.js package -m "Initial release" v0.0.1 .`. `-m` specifies changelog and `v0.0.1` is the version.
4. Run `cloudquery plugin publish -f` to publish the plugin to the CloudQuery registry.
> More about publishing plugins [here](https://docs.cloudquery.io/docs/developers/publishing-an-addon-to-the-hub)