Back to Projects

tph-deploy – Agency Operations as One Command

A deployment and domain-management platform for a one-person web shop: sixteen commands over a dozen live sites, a backup taken before every deploy by default, and an MCP server exposing the same core so an AI assistant can drive it without a second implementation.

LOCAL MACHINE SHARED cPANEL HOST EXTERNAL APIS tph-deploy CLI Node.js · 16 commands deploy · backup · rollback MCP server stdio · same core, second interface sites.json the registry of record /public_html 12 site webroots PHP dashboard WordPress agent CertSage (Let's Encrypt) Cloudflare — DNS, SSL NameSilo — registrar cPanel API GitHub — source + tags FTPS verify registrar · DNS · SSL · host APIs deploy build → backup → upload → .htaccess → verify → git push provision registrar → Cloudflare DNS → cPanel → sites.json
One core, two interfaces, one registry. The backup step is bold because it is the one the pipeline refuses to skip unless you ask it to by name.

Project Details

Tags

Node.js CLI MCP DevOps API Integration PHP

Challenge

Small-business web work lands you on shared cPanel hosting. Not because it is good, but because it is what a client on a $40-a-month plan is paying for, and telling them to move to a platform with real deploy tooling is telling them to pay four times as much for something they will never see.

So the routine was FTP. Drag a folder, hope, click around the live site to see whether it worked. Add a domain and the job spans four control panels — registrar, DNS, cPanel, then a note somewhere about what you just did. Do that across a dozen sites and the failure mode is not dramatic; it is a slow accumulation of sites nobody can quite remember the setup of, and the growing reluctance to touch any of them.

The honest version of the problem: I was the deployment process, and I do not have uptime.

Solution

A Node CLI that owns the whole lifecycle, backed by a JSON registry of every site and a small PHP agent on the host for the things FTP cannot reach.

Decisions Worth Defending

The design insight that transferred: a good CLI is already a good tool surface for a language model. Discrete verbs, explicit arguments, one job each, honest failures. The same properties that make a command memorable to a person make it callable by a model — which is the same lesson the finance-mcp-server build arrived at from the opposite direction.

Outcome

It runs the agency. Every site TPH maintains is deployed, monitored, and recovered through it.

16Commands covering deploy, DNS, SSL, WordPress, and provisioning
12Live sites in the registry, static and WordPress
1Command to roll a bad deploy back

What surprised me was how much of the value came from status and ssl check rather than from deploying. Deployment was the problem I set out to solve; knowing the current state of twelve sites without visiting twelve URLs turned out to be the thing I use every week. Tooling that tells you what is true is worth more than tooling that does things faster.