Refletions on AI-assisted coding for HubSpot projects with Gemini CLI (and Claude CLI)
I’ve been writing these reflections on and off between projects for the last three months. I first gave a go at AI-assisted programming for simpler HubSpot private app functions and custom cards on object records back around spring of 2026, and started outlining ny reflections on using Gemini CLI for this purpose around August. My main gripes with the tool was long wait times to execute any and all actions, something I did not get past even on a paid plan, and made the switch to Claude Code by the end of August (once made available through a paid team plan at my company). My reflections on using Gemini CLI are likely outdated by the time I publish this, but I still find it valuable to reflect on high/lows of using it and the comparison with the tool that came after.
Configuring Gemini CLI and the Developer MCP
The Gemini CLI is run directly in your terminal. If you’re on a Mac or running Linux, this is simple to open. If you’re on a computer using windows, you’ll most easily access it by downloading an VS Code or similar software and running a terminal from there. Bonus points is that you can more easily open and edit the files that Gemini creates for you.
You’re also going to need a Google account. I’m running my setup through my work, and per the starting message Gemini CLI claims I am using a Plan: Gemini Code Assist for individuals but could be some extra features baked in dure to my email being linked to a business account that I’m unaware of.
Anyways, for this, we’ll need to:
- Run the installation process to make sure we have the HubSpot CLI installed.
- Helpful for revieweing the code files, install a code editor (I’m running Visual Studio Code)
- Install Gemini CLI by opening a terminal (official documentation here) and run the installation using
npm install -g @google/gemini-cli. Important If you, like me, encounter an issue with this installation you could be on a company restricted laptop. Remove the-g, which installst Gemini globally, and instead go to the directory where you want it to do a local installation there. - Type
geminiin the terminal. Use a prefix and typenpx geminiif you weren’t able to do the global installation. You’ll be prompted to authenticate. Pick Login with Google. - Open a new terminal window and follow the steps as above on configuring the developer MCP through the HubSpot CLI command
hs mcp setup, making sure to pick Gemini CLI when the option is presented. - Restart the terminal that is running Gemini and the HubSpot Dev MCP server should now be connected. You can
MCP connection error: 32000: connection closed.
This is a known issue that HubSpot is looking at. If you are starting up Gemini and the HubSpot Developer MCP is throwing an error, it’s because of how the script (that is run when you set it up) configures the connector. You’ll need to edit the code inside .gemini/settings.json. As you can tell by the period before the word gemini, the settings.jsonfile is hosted inside a hidden folder. To spot it, go to the directory where Gemini was installed and show all hidden files.
The open and replace the code below:
"mcpServers": {
"HubSpotDev": {
"command": "npx",
"args": [
"-y",
"@hubspot/cli@latest",
"mcp",
"start",
"--ai-agent",
"gemini"
]
}
}
with:
"mcpServers": {
"HubSpotDev": {
"command": "npx",
"args": [
"hs",
"mcp",
"start",
"--ai-agent",
"gemini"
]
}
}
The first code block basically tells Gemini to run the MCP by doing a npx call to fetch the script dynamically and make the connection work. This works for global installations. If you’re on a restricted environment it will throw the error. The error is due to the script sending back unexpected replies (warnings about the install) which mixes with the expected reply, and crashed the connection.
hs project upload failed
This had me running in cirlces trying to get Gemini to brute-force an upload.
Gemini CLI will assume you are running a global install, so if you have asked it to upload your HubSpot project on your behalf and it just spits back hs project upload if failing it could be due to the same local-instal problem as the previous issue.
Go ahead and open a fresh terminal, navigte to the project directory and use npx hs project upload.
Using Gemini CLI for development
TLDR In my hands, it’s doable to have the Gemini CLI execute prompts and deliver satisfactory results, but it’s not a painless experience to get it to play ball and do what you want. I find myself needing to use Gemini Pro in the browser to support the process.
At the time of writing I’ve worked with it on two projects, on version 1.31.
The first was to give it a strict prompt (created by interacting with Gemini Pro inside a browser) and feeding it instructions to create three separate files with Node.js to use as custom coded actions inside HubSpot workflows. I later copied-pasted the information to their new homes inside the HubSpot portal in question.
It did ok with this task, but I did have to re-evaluate the code two or three times in the browser (smaller edits) to come to a satisfactory output. I didn’t even attempt to ask it to debug and provide input with the issues I encountered in trying to get the workflow up and running as I’m used to being able to add screenshots of error outputs or settings to verify that they’re configured correctly.
The second was an attempt at a more complex project; a (React) card to embedd inside company view tabs to showcase different data from the system. Again, I had to start with a prompt and interject several times to get it to continue, but asked about the “wrong” things. The prompt was solid enough to explain what type of functions and configurations were needed, but did not include details about specific deal pipeline stages that were a key part of the build, and the final code made several assumptions that were incorrect without stopping to check.
For example, the CLI will automatically build on the latest version of HubSpot’s developer plattform (at the time of writing 2025.2) but I discovered partway through the project that the app I was building needed to be on the earlier version (2025.1 with support for serverless functions). Gemini CLI kept on ignoring all instructions on using a different version, meaning I had to default to getting instructions from Gemini Pro in the browser to add files and replace code where necessary. It did not pre-emptively troubleshoot using the Developer MCP either except to lookup HubSpot CLI prompts to upload the project.
A frustrating aspect is that it’s quite slow and unreliable in terms of the interactions. In the UI you can supposedly pick models, but it will take several minutes to come back with a reply no matter how small the request.
Parts of this is that I’m just not that used to working inside a CLI and switching between natural language prompts and the usual “terminal speak” (typing cd .. to switch to another folder is quicker than telling it where to go in my opinion). It took it 1 minute and 28 second to let me know that my command of go up a directory level wasn’t possible, and earlier typing cd .. took almost 2 minutes to get a similar reply.
Side note: I can’t go up because I’m running a local installation in that folder, but Gemini should not have to wait this long to be able to tell me that!
Giving it a complete prompt to execute will deliver a build, and I’m sure the developer MCP connection is helpful in some aspect to make sure the structure of what it creates works with HubSpot. I’m not convinced in the current format that this is a good fit for me.
The main point of the Developer MCP is to be able to not switch between different windows as you’re working, so you can create your prompt and have the LLM execute on it in the same contextual window. Right now I’m not really making good use of the Developer MCP as I have to run the initial prompt creation in a browser window anyway to get Gemini Pro.
Some examples of where it struggled:
- Using HS CLI, check which is the primary account connected to upload project to. It tried to ask the HubSpot CLI to
hs accounts list --no-pagerwhere--no-pageris an unknown argument, meaning it didn’t know what to do next and had to do a Google-search to proceed - I fed it a prompt of a private app build, and it stopped to confirm several key steps in the process of setting up a HubSpot project (empty project or private app, what features to add) which I would assume it can take lead on in an instance like this.
- If something comes up (like it asking for input via HubSpot CLI) I can’t ask Gemini questions about what’s happening in the CLI of what I’m expected to do. It froze requests as it was handling the “main thread” of operations; I had to revert to asking Gemini in browser to know what to do next rather than interrupt the ongoing build.
- Made up code in the code output (running Gemini 3 model), which was “caught” by Gemini Pro running on the browser just sharing screenshots and copy-paste of the React code.
- It crashed on me once, and had about four instances of issues with memory (meaning it stopped exeuction in the middle of a run) and I had to shake it awake and repeat instructions.
- I’m giving the CLI output for debugging, explicitly asking it to review and analyse and summarise findings and suggested changes and not to go through with any edits, and it will immediately launch into implementing changes.
What I can’t grasp in all of this is if the Gemini CLI is being throttled at all (giving worse performance) to non-paying accounts and is actually responsive and awesome to interact with on a paid plan, or if it’s the same experience. I did have more luck in quicker response times working on the project on a Sunday afteroon (2pm) and evening (8-10 pm) than on a Monday morning.
Some areas where it did work well:
- Once I had a version of the files “corrected” by the browser Gemini and could provide prompt input, the CLI was quick to read through files and do edits, upload and “read” the output to redo the files again and try again. It sped up the process a lot instead of copy-pasting between windows.
- Quicker to understand, handle and pull together context from several files of where you need to make edits. While Gemnini browser version would repeatedly ask me to confirm I copy-pasted the same code into the files; Gemini CLI could simply verify itself and amend smaller issues.
All in all, at my current level of understanding this is a bit like trying to push a clump of play-doh through a very specific star shape hole. With each attemp, the CLI will shave off parts to make it fit better (sometimes taking away too much so you need to add back in) until you get a successful result. Key learning here I’ve taken across to any other AI-based interaction is to make sure files with visual elements have a note on the internal version, and to add detailed console log outputs into the code so you have enough info for the AI to run debugging.
Other gripe: figuring out paid plans
Figuring out paid plans for Gemini and Code Assista are a true pain. I’ve had to get LLM help to navigate it and frequently made errors along the way. For those, that like me, have had issues understand whats what, it boils down to:
- Gemini CLI and Gemini code assist are two separate products (even though, confusingly enough Code Assist will be mentioned on the Gemini CLI interface…)
- Gemini CLI works via a terminal (open direct or via VS Code) and somewhat communicates with you, but mostly just about you project files. It can create and edits files and run terminal commands on your behalf.
- Gemini Code Assist is integrated with VS Code like a chat window you open and type to as a LLM interaction, and can chat with you about your files. It can suggest things it “sees” in your VS Code files as you use it, but won’t create complete code files and run them for you.
- For Gemini CLI, you can log in with your gmail and get started; you’ll be set up with a free plan and can later make a switch to a paid plan. This paid plan is a different one from Code Assist paid plans.
- Code Assist will not be useful until you set up a Google Cloud Project, set up billing, and specificall pay (or activae a free trial) of this specific product.
- Having Code Assist in VS Code with Gemini CLI running in the terminal somewhat lessens the amount of running you need to do to a browser-based LLM, but is not worth shelling out extra for. It’s better to prioritise Gemini CLI and use Gemini Pro in browser as it can handle screenshots.
What did I build?
Some of the final projects where I’ve had Gemini CLI do the programming and writing code are:
- Building cross-sell enablement in HubSpot using Breeze agents and serverless functions
- Building Revenue Snapshots and custom company card in a multi-brand HubSpot portal for client growth and visibility
Claude Code
As mentioned at the start of this text, I eventually made the switch to Claude Code. My experiences thus far have been night and day in comparison. Quicker to execute any and all instructions, a real notiecable difference between models and generally having a better sense for when to independently search use the HubSpot MCP to access developer documentation to structure projects and write code the proper way.
A bonus is that it for me is also way more interactive when it comes to chatting, so you can easily switch between giving prompts for creating parts of the project.
What did I build?
Claude Code is currently my tool of choice, and some of the projects I’ve completed and used it for are: