AI Agent Hub
Back to skills
Frontend Repository CLI Generator icon

Frontend Repository CLI Generator

Development Updated 2026.08.29

Paste the following prompt into your AI chat to install this skill:

Install @user_c36d82a7/fe-api2cli into your AI assistant using https://skillhub.cn/install/skillhub.md.

About this skill

Problem

In frontend repositories, API calls, request types, enum constants, and auth settings are often spread across directories and custom HTTP wrappers. Manually building a CLI can miss optional fields, nested types, status-code meanings, or environment-specific base URLs.

How It Works

  • Builds a repository profile first: detects monorepo structure and locates API, type, enum, and HTTP wrapper files.
  • Samples before scanning: reads a few API files to infer baseURL, path prefixes, and calling patterns, then scans candidate endpoints.
  • Parses types and enums: extracts fields, optional markers, enum values, and comments from TypeScript interface, type, and constant files.
  • Detects auth strategy: supports Bearer Token, Cookie, API Key, and no-auth flows, with matching auth commands or configuration.
  • Confirms before generation: outputs a technical plan first, then generates a Python Click or Node.js oclif project for local installation and debugging.

Boundaries

This is best suited for frontend repos with clear API layers, type definitions, and business enums. Dynamic URL construction, runtime configs, or unconventional auth may require manual review. Cookie capture also depends on a local browser debugging setup.

Use Cases

  • Take over a Vue/React repo and wrap common query endpoints into a local CLI.
  • Maintain a monorepo frontend project and generate list/get subcommands from team CLI naming rules.
  • Debug an internal system where Cookies and parameters are copied often, and build a CLI with Bearer Token or Cookie auth.
  • Read API type files and enum constants to generate a Python or Node.js CLI with confirmable parameters.

Best For

  • Frontend engineers taking over an unfamiliar repo and needing quick local commands for common endpoints
  • Engineers maintaining monorepos who want CLI commands that match team naming conventions
  • Frontend or test engineers debugging internal systems and repeatedly handling Bearer Token or Cookie auth
  • Engineers who want to turn TypeScript API types and enum constants into executable tools