Recently, I spent $15 to build Python, TypeScript and PHP SDKs for the WP Engine REST API, using Anthropic‘s Claude AI coupled with the Cline extension running in VS Code. I made a tweet about that too:
Though when I posted, I had yet to publish the SDKs. I had a couple of weeks pass without work on the SDKs and just recently, finalized decent first releases for all three. Total spend was $20; that’s less than the price of a typical pizza these days!
Let me share how this journey began…
I’m relatively new to AI, and just now scratching the surface of possibilities. I started with ChatGPT and not long ago switched to Claude AI. I found Claude to be superior to ChatGPT but was slowed down by the constant “copy & paste” back and forth, from browser to IDE. Fortunately, a co-worker at WP Engine recommended that I check out Cline. Needless to say, I am sure glad that I did.
Cline’s integration of various AI services, e.g. OpenAI, Claude, into VS Code is smoothly done. Not only is it simple to setup but incredible power is unleashed when using Claude 3.5 Sonnet, with the ability to control my computer, including doing the “copy & paste” job for me.
Magic.
With Cline+VS Code+Claude, I provided user requirements for a new web application and got back a functional application within tens of minutes, if that. With this powerful combination, I formed and ran sophisticated queries. And took an idea to fruition, by generating three separate language SDKs, for the WP Engine REST API, simply by providing an OpenAPI specification.
Like any good Product Manager, I started with the requirements. Easy, as I had an OpenAPI spec, and a decade of experience as a PM and developer of APIs.
Pretty simple and straightforward. Although I admit that I would normally need more details when spec’ing out a product, API or not. But Claude was up to the challenge.
First step taken by Claude was good, and cheap. I think.
With a plan in its mind, the AI took off!
All the way to completion, with some more exchanges of requirements and on-the-fly tweaks to capability needs. For just under 2 AI bucks!
Struggling with distribution
Things weren’t perfect though. I avoided the constant the back-and-forth but hit obstacles when getting the code ready for distribution via npm
.
But resolution was relatively straightforwad, and soon I was ready to deploy!
Leveraging progress to build two more SDKs!
Having completed the TypeScript SDK, I turned my – I mean, the AI’s – attention to the other languages I was looking to support: PHP and Python.
Two other languages for $3.23!
I spent more, tweaking, expanding some of the requirements, and fixing bugs generated mostly because of poor communication between myself and Claude. And then spent considerable time remembering, with Claude’s help, how to deploy to registries like npm, PyPi, and Packagist.
You can access the SDKs – only useful if you’re a WP Engine customer! – at:
- TypeScript: https://github.com/jpollock/wp-engine-api-typescript
- PHP: https://github.com/jpollock/wp-engine-api-php
- Python: https://github.com/jpollock/wp-engine-api-python
All in, I spent just a tad over 20 AI bucks on these SDKs.
Pretty cool.
Some existential questions emerge
As I was working through this process, I thought much about whether API SDKs are even useful in an AI world. Given an API specification, e.g. OpenAPI, can’t I just have the AI custom craft the integration as needed into whatever application I am trying to build? Should my focus be on creating the best API spec and documentation and supporting examples as possible? Rather than the language specific SDKs? Or perhaps the SDKs become the exemplar for how to use the API in whatever language is desired? Interesting questions that I continue to ruminate over and whose answers I hope will guide future work.
But for all of the existential questions, I still could achieve so much in such little time and at such small cost. More to learn and think about, as I , and others, navigate the world of AI.
Now to get that pizza!
Leave a Reply