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

flib-cli

v2.1.4

Published

用于快速flutter_flexible构建的命令行工具

Readme

快速创建flutter项目的命令行工具

创建项目

1、全局安装插件

npm i -g flib-cli

2、更新模板,并创建项目

flib updata // 更新模板
// 进入需要创建项目文件目录
flib create

指令介绍

| 指令 | 描述 | |---------------------------|--------------------------------------------| | flib --help | 显示帮助信息 | | flib create | 创建一个 Flutter 项目,根据提示输入相关参数 | | flib page <name> | 创建一个页面,例如: flib page DemoPage | | flib add router | 创建一个路由(包含页面),例如: flib add router | | flib updata | 更新当前脚手架模板 | | flib clear | 清除本地所有模板 | | flib setGitRemote | 切换更新源类型(默认使用 Gitee 国内源),只功能只支持内置模板,自定义模板不支持切换源功能 | | flib addTemplate | 添加一个自定义模板 | | flib removeTemplate | 移除一个自定义模板 |

添加自定义模板示例

自定义模板准备工作

flib addTemplate 选项框参数含义

<模板仓库地址>:xxx.git仓库源地址,用于更新本地模板文件
<模板名称>:此处取的名称,需要和自定义模板的根目录的pubspec.yaml文件内name相同
<模板别名>:用于后续选项模板回显的名称,可以是中文
<org名称>:自定义flutter org,默认com.example,具体可搜索android目录内com.example,主要用于后续创建模板时,替换指定相匹配的数据
<APP安装名称>:对应安卓及IOS安装后的APP名称

创建自定义模板

flutter create 创建一个项目,然后构建自己模板结构目录等(此处忽略),

获取 flib addTemplate 选项框参数注意事项:

  • <模板名称>:pubspec.yaml文件内name值,对应后期添加<模板名称>时使用
// pubspec.yaml文件
name: flutter_flexible
// ...
  • <org名称>:如果flutter create --org=xxx这样创建项目(指定包名前缀),者需要把此参数保留用于添加自定义模板,默认:com.example

  • <APP安装名称>:安卓、IOS 二端文件名必须名称一致

安卓文件(android\app\src\main\AndroidManifest.xml)

<!-- android:label的值,app安装名为:flutter_flexible -->
<application android:label="flutter_flexible" android:name="${applicationName}" android:icon="@mipmap/ic_launcher"></application>

IOS文件(ios\Runner\Info.plist)

<!-- app安装名为:flutter_flexible -->
<key>CFBundleName</key>
<string>flutter_flexible</string>

本地添加模板

终端输入 flib addTemplate ,然后把自己的自定义模板相关数据(关键参数:仓库地址、模板名称、org名称、app安装名称)填写进去即可,后续按正常创建模板使用

自定义模板支持的功能

flib removeTemplate 移除自定义模板 flib updata 更新自定义模板 flib create 创建项目(支持自定义模板)