Back to browse
GitHub Repository

Turn any file into a CLI from TypeScript/JavaScript exports

1 starsTypeScript

Turn any file into a CLI (reduce tokens vs. MCP)

by gounisalex·Mar 15, 2026·1 point·0 comments

AI Analysis

●●SolidShip ItSolve My ProblemBig Brain

Turns TypeScript functions into npm CLIs so AI agents spend fewer tokens than MCP.

Strengths
  • Auto-generates `--help` from JSDoc and types, saving manual documentation work for agents.
  • Bundles dependencies with esbuild automatically, ensuring single-file deployment without complex configuration files.
  • Handles npm publishing flow including 2FA, removing boilerplate for temporary tool exposure.
Weaknesses
  • Claimed token savings versus MCP schemas are debatable depending on help verbosity.
  • Lacks Windows support verification and detailed error handling for circular dependency graphs.
Target Audience

Developers building tools for AI coding agents (Claude Code, Cursor)

Similar To

oclif · pkg · Model Context Protocol

Post Description

I built a tool called clifast.

It reads your TypeScript/JavaScript exported functions and generates a complete npm/npx CLI package in one command:

npx clifast your-file.ts

It parses types, JSDoc comments and function signatures to generate a --help command which can be used by LLMs to navigate the available input arguments and use your files or repositories effectively with less input tokens.

Multiple exports become subcommands. External imports are bundled. The output is a ready-to-publish npm package (which comes with the benefits of npx).

The goal is to reduce token usage by exposing files or entire folders as CLI commands that can be executed by Claude Code or Cloudflare's Codemode using a reduced amount of input tokens while decreasing the need to build and maintain complex MCP servers when not needed.

Repo: https://github.com/AlexandrosGounis/clifast

Can you please give me some feedback if you find this helpful?

Similar Projects