npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

flu-cli

v2.0.6

Published

Flutter MVVM 脚手架工具

Downloads

339

Readme

flu-cli


🌟 为什么选择 Flu CLI

Flu CLI 让 Flutter 项目创建和代码生成变得简单高效,从零到生产只需几分钟。

核心亮点

  • 🎯 交互式向导:现代化 CLI 交互体验,所有选择一目了然
  • 🏗 多架构模板:Lite(轻量)、Modular(模块化)、Clean(整洁架构),开箱即用
  • 🌐 智能网络层:可选集成 Dio + 网络工具 + 真实示例,按需引入
  • 🧩 多状态管理:Provider、GetX 一键切换,自动配置
  • ⚡️ 快速生成:Page、ViewModel、Widget、Service、Model 全覆盖
  • 🎨 资源管理:可视化配置应用图标与启动图
  • 📝 代码片段:内置 8+ 种智能模板,自动同步到 VSCode
  • 🔧 灵活定制:支持 Git 仓库或本地文件夹作为自定义模板

📦 安装

npm install -g flu-cli

要求:Node.js >= 14.0.0 + Flutter SDK


🚀 快速开始

1️⃣ 创建项目

flu new my_app

向导会引导你选择

  • 架构模板(Lite / Modular / Clean / 自定义)
  • 状态管理(Provider / GetX)
  • 是否包含网络层(Dio + 示例代码)

2️⃣ 生成代码

# 生成页面(包含 View + ViewModel)
flu add page home

# 生成列表页面(自动包含分页逻辑)
flu add page user_list --list-page

# 生成其他类型
flu add widget button_widget
flu add service user_service
flu add model user

3️⃣ 配置现有项目

cd my_existing_project
flu config init

自动检测项目结构,生成 .flu-cli.json 配置文件。

4️⃣ 自定义模板

# 添加 Git 仓库模板
flu template add my-tpl https://github.com/my/template.git

# 添加本地模板
flu template add local-tpl /path/to/template --local

# 使用自定义模板创建项目
flu new my_app -t my-tpl

📚 命令速查

| 命令 | 别名 | 说明 | | ----------------------------- | ------ | -------------- | | flu new <name> | n | 创建新项目 | | flu add page <name> | a p | 生成页面 | | flu add widget <name> | a w | 生成组件 | | flu add service <name> | a s | 生成服务 | | flu add model <name> | a m | 生成模型 | | flu template add <id> <url> | - | 添加自定义模板 | | flu template list | - | 查看模板列表 | | flu config init | conf | 初始化项目配置 | | flu assets | - | 配置应用资源 | | flu sync-snippets | sync | 同步代码片段 |

使用 flu <command> --help 查看详细参数


🧩 推荐:VSCode 插件

配合 Flu CLI VSCode Extension 使用,体验翻倍!

插件特性

  • ✨ 右键菜单快速生成代码
  • 🎨 可视化管理项目资源
  • ⌨️ 快捷键 Cmd+Shift+G (Mac) / Ctrl+Shift+G (Windows) 唤起生成面板
  • 📝 智能代码片段,根据架构动态适配

👉 点击安装 VSCode 插件


💡 使用技巧

快速创建带网络层的项目

flu new my_app
# 选择 Lite 模板 → Provider → 包含网络层
# 一分钟后,完整的 MVVM 项目就绪!

同步最新代码片段

flu sync-snippets

自动升级项目中的 VSCode 代码片段到最新版本(8+ 种智能模板)。

查看所有模板

flu template list

💬 加入社区

获取最新动态、反馈问题或与开发者交流:

二维码过期请添加作者微信 Huoye-TT,备注 "flu-cli"


📄 License

MIT License - Copyright © 2026 火叶工作室