HubSpot configuration as code: open-source CLI looking for early users and maintainers
Hi all,
We’ve open-sourced Kalup, a CLI that keeps a HubSpot portal’s properties and property groups as TypeScript files in your repo. We’re looking for people to try it on a sandbox or test account, and for a few people to help maintain it.
Why we built it
Every HubSpot project we’ve worked on starts with a script that creates the custom properties. Then someone renames a label in the UI, a second portal needs the same setup, and a few months later nobody can say what’s live in which portal. Our team has run versions of this as internal scripts for a few years. Kalup is the standardised version.
What it does
kalup pullreads a portal and writes its properties and groups into TypeScript files.kalup planshows every change before anything is written.kalup applywrites the change to the portal you name (a sandbox, a client’s portal, production) after a person confirms it.- Edits people make in the HubSpot UI show up as drift. Kalup reports them and doesn’t overwrite them unless you tell it to.
- Your app imports the same files for its types, so your code and your portal agree on property names and enum values.
A config file looks like this:
import { defineObject, p } from '@kalup/core'
export const Company = defineObject('companies', {
groups: {
billing: { label: 'Billing' },
},
properties: {
billingStatus: p.enum('billing_status', {
label: 'Billing status',
group: 'billing',
fieldType: 'select',
options: [
{ value: 'active', label: 'Active' },
{ value: 'cancelled', label: 'Cancelled' },
],
}),
},
})
Safety
- Removing a line from a file never deletes anything in HubSpot. Deletes only happen in takeover mode, which you switch on per portal, and a person confirms each one at a terminal.
- Config files are parsed as data and never executed, so a plan shows exactly what’s in the repo.
Try it
You need Node 22.13.1 or later and a service key. kalup init prints the exact scopes the key needs.
npm install @kalup/core
npm install -D kalup
npx kalup init --portal <portal-id> --target sandbox
npx kalup pull
npx kalup plan
What we’d like from you
- Run
pullagainst a sandbox and tell us what it gets wrong and what we get right. GitHub issues are best, replies here are fine too. - If you’d like to help maintain it, reply here or message me. People who know the pipelines or association APIs well, or who run many client portals, would help most right now.
GitHub: GitHub - scopiousdigital/kalup: Kalup: configuration as code for HubSpot · GitHub
Docs: https://kalup.dev/docs
It’s early (0.2), free, Apache-2.0, and independent. It is not affiliated with or endorsed by HubSpot.