anl

FE command line tool
13,552 4
Install
npm install anl
Latest Version:26.1010.0
Vue:3
License:ISC
Last Updated:Oct 10, 2026
Links: GitHub  ·  npm
Maintainer: gleason

🌐 Language / 语言

English | 简体中文 | 日本語 | Español | Français | Русский | العربية

[!NOTE] Starting from version 26.201.0, new features are documented only in English and 简体中文. Other language versions are no longer updated.

从 26.201.0 版本开始,新增功能仅更新 英文 和 简体中文 文档,其他语言文档不再更新。


Overview

Path prefix configuration now uses stripPathPrefix, requestPathPrefix and mockPathPrefix, without legacy aliases. Migration guide.

an-cli is a frontend command-line tool that includes the following commands:

  • anl type command: A command-line tool that automatically generates TypeScript type definitions and API request functions based on Swagger JSON.
  • anl mock command: Generates Mock.js JSON files from local service response types for mock-service-plugin. Documentation.
  • anl lint command: Generates eslint, stylelint, prettier, commitLint, and VSCode related configurations for React or Vue projects
  • anl git command: Generates git local configuration with optional features: gitflow standard branch creation, git commit messages subject, and git custom command configuration
  • anl skill command: Initializes Agent Skill files for AI-assisted development, supporting api-report and api-mock skills.

Features

  • anl type

    • 🚀 Automatically parses Swagger JSON documentation
    • 📦 Generates TypeScript type definition files
    • 🔄 Generates type-safe API request functions
    • 🎯 Supports path parameters, query parameters, and request body
    • 📝 Automatically generates enum type definitions
    • 🎨 Supports code formatting
    • ⚡️ Supports file upload
    • 🛠 Configurable code generation options
    • 🌐 Supports multiple Swagger server configurations
    • 🔧 Supports HTTP methods like OPTIONS, HEAD, SEARCH
  • anl mock

    • Select one, multiple, or all generated services
    • Recursively generate Mock.js templates with inferred response envelopes
    • Write service-scoped JSON files with @url and @method headers
    • Preserve existing mocks unless --overwrite is specified
    • Usage and plugin installation
  • anl lint

    • 🔍 One-click configuration for various lint tools
    • 🎨 Automated ESLint configuration
    • 🎯 Prettier formatting configuration
    • 🔄 CommitLint commit standards
    • 📦 VSCode editor configuration
  • anl git

    • 🔍 Multiple optional features for installation
    • 🎨 Standard git flow branch creation
    • 🎯 Automatic subject setting that complies with CommitLint commit standards
    • 🔄 Provides git custom command configuration and entry points
    • 📦 Automated generation with zero configuration
  • anl skill

    • Initialize Agent Skill files for AI-assisted development
    • Support api-report for API change reports and api-mock for AI-assisted mock generation
    • Usage

功能概述

路径前缀配置已统一为 stripPathPrefix、requestPathPrefix、mockPathPrefix,不保留旧字段别名。升级前请查看迁移说明。

an-cli 是前端命令行工具,包含以下命令:

  • anl type 命令:基于 Swagger JSON 自动生成 TypeScript 类型定义和 API 请求函数的命令行工具。
  • anl mock 命令:从本地服务响应类型生成供 mock-service-plugin 使用的 Mock.js JSON 文件。使用文档。
  • anl lint 命令: 生成 react 或 vue 项目 eslint、stylelint、prettier、commitLint、VSCode相关配置
  • anl git 命令: 生成 git 本地配置,并设有可选功能: gitflow 标准分支创建、git commit messages 主题、git 自定义命令配置
  • anl skill 命令:初始化 AI 辅助开发的 Agent Skill 文件,支持 api-report 和 api-mock。

功能特点

  • anl type

    • 🚀 自动解析 Swagger JSON 文档
    • 📦 生成 TypeScript 类型定义文件
    • 🔄 生成类型安全的 API 请求函数
    • 🎯 支持路径参数、查询参数和请求体
    • 📝 自动生成枚举类型定义
    • 🎨 支持代码格式化
    • ⚡️ 支持文件上传
    • 🛠 可配置的代码生成选项
    • 🌐 支持多 Swagger 服务器配置
    • 🔧 支持 OPTIONS、HEAD、SEARCH 等 HTTP 方法
  • anl mock

    • 选择单个、多个或全部已生成的服务
    • 推导响应外壳并递归生成 Mock.js 模板
    • 按服务目录输出带有 @url、@method 注释的 JSON 文件
    • 默认保留已有 mock,仅在指定 --overwrite 时覆盖
    • 使用说明与插件安装
  • anl lint

    • 🔍 一键配置各种 lint 工具
    • 🎨 ESLint 配置自动化
    • 🎯Prettier 格式化配置
    • 🔄 CommitLint 提交规范
    • 📦 VSCode 编辑器配置
  • anl git

    • 🔍 多种功能可选安装
    • 🎨 标准 git flow 分支创建
    • 🎯 符合 CommitLint 提交规范的主题自动设置
    • 🔄 提供 git 自定义命令配置以及入口
    • 📦 自动化生成 0 配置
  • anl skill

    • 初始化 AI 辅助开发的 Agent Skill 文件
    • 支持 api-report 接口变更报告与 api-mock AI 辅助 mock 生成
    • 使用说明

نظرة عامة على الوظائف

an-cli هو أداة سطر أوامر للواجهة الأمامية، يتضمن الأوامر التالية:

  • أمر anl type: أداة سطر أوامر لتوليد تعريفات أنواع TypeScript ودوال طلبات API تلقائيًا بناءً على Swagger JSON.
  • أمر anl lint: توليد تكوينات eslint و stylelint و prettier و commitLint و VSCode ذات الصلة لمشاريع react أو vue
  • أمر anl git: توليد تكوين git المحلي، مع وظائف اختيارية: إنشاء فروع gitflow القياسية، موضوعات رسائل git commit، تكوين أوامر git المخصصة

الميزات الرئيسية

  • anl type

    • 🚀 تحليل مستندات Swagger JSON تلقائيًا
    • 📦 توليد ملفات تعريف أنواع TypeScript
    • 🔄 توليد دوال طلبات API آمنة من حيث الأنواع
    • 🎯 دعم معاملات المسار ومعاملات الاستعلام وجسم الطلب
    • 📝 توليد تعريفات أنواع التعداد تلقائيًا
    • 🎨 دعم تنسيق الكود
    • ⚡️ دعم تحميل الملفات
    • 🛠 خيارات توليد كود قابلة للتكوين
    • 🌐 دعم تكوين خوادم Swagger متعددة
    • 🔧 دعم طرق HTTP مثل OPTIONS و HEAD و SEARCH
  • anl lint

    • 🔍 تكوين أدوات lint المختلفة بنقرة واحدة
    • 🎨 أتمتة تكوين ESLint
    • 🎯 تكوين تنسيق Prettier
    • 🔄 معيار التزام CommitLint
    • 📦 تكوين محرر VSCode
  • anl git

    • 🔍 تثبيت اختياري لوظائف متعددة
    • 🎨 إنشاء فروع git flow القياسية
    • 🎯 تعيين موضوع تلقائي يتوافق مع معيار CommitLint
    • 🔄 توفير تكوين أوامر git المخصصة ونقطة الدخول
    • 📦 توليد تلقائي بدون تكوين

Descripción General de Funciones

an-cli es una herramienta de línea de comandos para frontend que incluye los siguientes comandos:

  • Comando anl type: Herramienta de línea de comandos que genera automáticamente definiciones de tipos TypeScript y funciones de solicitud API basadas en Swagger JSON.
  • Comando anl lint: Genera configuraciones de eslint, stylelint, prettier, commitLint y VSCode para proyectos React o Vue.
  • Comando anl git: Genera configuración local de git con funciones opcionales: creación de ramas estándar gitflow, temas de mensajes git commit y configuración de comandos personalizados de git.

Características

  • anl type

    • 🚀 Análisis automático de documentos Swagger JSON
    • 📦 Generación de archivos de definición de tipos TypeScript
    • 🔄 Generación de funciones de solicitud API con seguridad de tipos
    • 🎯 Soporte para parámetros de ruta, parámetros de consulta y cuerpo de solicitud
    • 📝 Generación automática de definiciones de tipos enum
    • 🎨 Soporte para formateo de código
    • ⚡️ Soporte para carga de archivos
    • 🛠 Opciones de generación de código configurables
    • 🌐 Soporte para configuración de múltiples servidores Swagger
    • 🔧 Soporte para métodos HTTP como OPTIONS, HEAD, SEARCH
  • anl lint

    • 🔍 Configuración de varias herramientas lint con un solo clic
    • 🎨 Automatización de configuración ESLint
    • 🎯 Configuración de formateo Prettier
    • 🔄 Especificaciones de commits CommitLint
    • 📦 Configuración del editor VSCode
  • anl git

    • 🔍 Instalación opcional de múltiples funciones
    • 🎨 Creación de ramas estándar git flow
    • 🎯 Configuración automática de temas que cumplen con las especificaciones CommitLint
    • 🔄 Proporciona configuración de comandos personalizados de git y punto de entrada
    • 📦 Generación automatizada con 0 configuración

Aperçu des fonctionnalités

an-cli est un outil de ligne de commande frontend qui inclut les commandes suivantes :

  • Commande anl type : Un outil de ligne de commande qui génère automatiquement des définitions de types TypeScript et des fonctions de requête API basées sur Swagger JSON.
  • Commande anl lint : Génère les configurations eslint, stylelint, prettier, commitLint et VSCode pour les projets React ou Vue
  • Commande anl git : Génère la configuration locale Git avec des fonctionnalités optionnelles : création de branches selon le standard gitflow, thèmes de messages git commit, configuration de commandes git personnalisées

Caractéristiques

  • anl type

    • 🚀 Analyse automatique des documents Swagger JSON
    • 📦 Génération de fichiers de définition de types TypeScript
    • 🔄 Génération de fonctions de requête API type-safe
    • 🎯 Support des paramètres de chemin, de requête et de corps
    • 📝 Génération automatique de définitions de types enum
    • 🎨 Support du formatage de code
    • ⚡️ Support du téléchargement de fichiers
    • 🛠 Options de génération de code configurables
    • 🌐 Support de la configuration de plusieurs serveurs Swagger
    • 🔧 Support des méthodes HTTP OPTIONS, HEAD, SEARCH, etc.
  • anl lint

    • 🔍 Configuration en un clic de divers outils lint
    • 🎨 Configuration ESLint automatisée
    • 🎯 Configuration de formatage Prettier
    • 🔄 Normes de commit CommitLint
    • 📦 Configuration de l'éditeur VSCode
  • anl git

    • 🔍 Installation optionnelle de plusieurs fonctionnalités
    • 🎨 Création de branches selon le standard git flow
    • 🎯 Configuration automatique de thèmes conformes aux normes CommitLint
    • 🔄 Fournit la configuration et le point d'entrée pour les commandes git personnalisées
    • 📦 Génération automatisée avec configuration zéro

機能概要

an-cli はフロントエンド開発用コマンドラインツールで、以下のコマンドを含みます:

  • anl type コマンド:Swagger JSON に基づいて TypeScript 型定義と API リクエスト関数を自動生成するコマンドラインツール。
  • anl lint コマンド:React または Vue プロジェクト用の eslint、stylelint、prettier、commitLint、VSCode 関連設定を生成
  • anl git コマンド:Git ローカル設定を生成し、オプション機能として gitflow 標準ブランチ作成、git commit メッセージテーマ、git カスタムコマンド設定を提供

機能特徴

  • anl type

    • 🚀 Swagger JSON ドキュメントの自動解析
    • 📦 TypeScript 型定義ファイルの生成
    • 🔄 型安全な API リクエスト関数の生成
    • 🎯 パスパラメータ、クエリパラメータ、リクエストボディのサポート
    • 📝 列挙型定義の自動生成
    • 🎨 コードフォーマットのサポート
    • ⚡️ ファイルアップロードのサポート
    • 🛠 カスタマイズ可能なコード生成オプション
    • 🌐 複数の Swagger サーバー設定のサポート
    • 🔧 OPTIONS、HEAD、SEARCH などの HTTP メソッドのサポート
  • anl lint

    • 🔍 各種 lint ツールのワンクリック設定
    • 🎨 ESLint 設定の自動化
    • 🎯 Prettier フォーマット設定
    • 🔄 CommitLint コミット規約
    • 📦 VSCode エディタ設定
  • anl git

    • 🔍 複数の機能を選択してインストール
    • 🎨 標準的な git flow ブランチ作成
    • 🎯 CommitLint 規約に準拠したテーマの自動設定
    • 🔄 git カスタムコマンド設定とエントリーポイントの提供
    • 📦 ゼロ設定の自動生成

Обзор функций

an-cli — это CLI-инструмент для фронтенда, включающий следующие команды:

  • Команда anl type: CLI-инструмент для автоматической генерации определений типов TypeScript и функций API-запросов на основе Swagger JSON.
  • Команда anl lint: Генерирует конфигурации eslint, stylelint, prettier, commitLint, VSCode для проектов react или vue
  • Команда anl git: Генерирует локальную конфигурацию git с опциональными функциями: создание стандартных веток gitflow, темы сообщений git commit, конфигурация пользовательских команд git

Особенности функций

  • anl type

    • 🚀 Автоматически парсит Swagger JSON документы
    • 📦 Генерирует файлы определений типов TypeScript
    • 🔄 Генерирует типобезопасные функции API-запросов
    • 🎯 Поддерживает параметры пути, запроса и тела запроса
    • 📝 Автоматически генерирует определения типов enum
    • 🎨 Поддерживает форматирование кода
    • ⚡️ Поддерживает загрузку файлов
    • 🛠 Настраиваемые опции генерации кода
    • 🌐 Поддерживает конфигурации нескольких Swagger серверов
    • 🔧 Поддерживает HTTP методы OPTIONS, HEAD, SEARCH и другие
  • anl lint

    • 🔍 Настройка различных инструментов линтинга в один клик
    • 🎨 Автоматизация конфигурации ESLint
    • 🎯 Конфигурация форматирования Prettier
    • 🔄 Стандарты коммитов CommitLint
    • 📦 Конфигурация редактора VSCode
  • anl git

    • 🔍 Множественные опциональные функции для установки
    • 🎨 Создание стандартных веток git flow
    • 🎯 Автоматическая настройка тем, соответствующих стандартам CommitLint
    • 🔄 Предоставляет конфигурацию пользовательских команд git и точки входа
    • 📦 Автоматическая генерация с нулевой конфигурацией

Related Packages

lavy

Enterprise-level code quality and project configuration management tool

1,724 1
frontend-ai-review

AI-powered code review tool for frontend developers

2,319 0
@vfourny/node-toolkit

Shared ESLint, TypeScript, Prettier, Vitest and Commitlint configurations for No...

10,173 1
openapi-fetch

Fast, type-safe fetch client for your OpenAPI schema. Only 6 kb (min). Works wit...

226,490,942 8,405
be-ui-cli

A cli for quickly generating project template

1,431 13

Version History

Version Released License
26.1010.0 ISC
26.1008.0 ISC
26.930.0 ISC
26.929.0 ISC
26.928.0 ISC
Pre-releases (1)
Version Released License
25.10.1-3.1 ISC