‹ BackHN Continuity

Thread

Cf: The Agentic CLI for the Cloudflare API

171 points · 88 comments · macleos

  1. slowin · · focus · HN ↗
    I don't understand why this is written in Typescript. This is a great example of how agents can write code (I'm sure they wrote `cf`), yet having fundamental computer science knowledge is still critical. Do not force your users to manage the dependencies of your cli. Do write your cli in a compiled language. Understand the reason for those decisions and tell your agents to use the correct architecture.
    1. locknitpicker · · focus · HN ↗
      > I don't understand why this is written in Typescript

      I suppose you're not very familiar with typescript then.

      Listen, all this CLI app does is serve as an interface to send requests to the Cloudflare API. This means it only does things like sending HTTP requests, and outputting JSON. The cli app also needs to run on multiple platforms. Performance is not an issue or a concern.

      I'd frame this the opposite way: what better tool do you think there is for this purpose other than TypeScript?

      On top of that, there's the fact that Cloudflare's core services run on V8. If there is anything this company has, it's people familiar with JavaScript and TypeScript.

      1. lelanthran · · focus · HN ↗
        > I'd frame this the opposite way: what better tool do you think there is for this purpose other than TypeScript?

        Well, anything less susceptible to supply-chain attacks, obviously.

        1. locknitpicker · · focus · HN ↗
          > Well, anything less susceptible to supply-chain attacks, obviously

          Supply chain attacks are a factor only as far as a programming language supports modularization and has a large ecosystem. I mean, wasn't rust in the news recently due to cargo being used to execute supply chain attacks?

Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.