‹ 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. kelchm · · focus · HN ↗
      Are you really suggesting that the choice to use Typescript wasn't a deliberate one?

      IMO -- it makes total sense within the existing Cloudflare tooling ecosystem.

      1. slowin · · focus · HN ↗
        Whether it was deliberate or not, I do not think it's a good choice. When agents can write in any language, there's no reason to pick the wrong tool for the job. At this point Javascript/Typescript belongs only in the browser. It's the suboptimal choice for every other environment. Especially for a command line tool. Even if the back-end is written in Typescript (also not the best choice imho), the clients need not be in the same language.
        1. chatmasta · · focus · HN ↗
          Typescript and the npm/JS ecosystem may be complex, but you don’t need AGI to figure out how to install a CLI built with TS. My agent can figure out how to install this.
          1. miki123211 · · focus · HN ↗
            Installation is not the problem.

            Javascript is plenty fast, but only if it has enough time to JIT the code and can keep it JITed in memory. For long-running backed services, it's plenty fast, for browser things, it's the only option, but for the command line, it adds needless startup time.

            Agents make this even worse because they don't have a "sense of time", so if they accidentally do something which causes startup time to increase dramatically, they won't feel it like a human dev would, and won't immediately start optimizing. Unless you have some specific benchmarks in CI that fail any PR which makes the code too slow, agents will just make things slower and slower.

Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.