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

@yuworm/fba-cli

v0.1.2

Published

CLI tool for creating, managing, and running fastapi-best-architecture projects

Readme

fba-cli

English

主项目: fastapi-best-architecture
文档: https://fastapi-practices.github.io/fastapi_best_architecture_docs/

简介

fba-clifastapi-best-architecture 的 CLI 工具,用于一键创建、配置、管理和运行 FBA 项目。提供交互式引导流程和插件市场,大幅简化项目初始化和日常开发操作。

特性

  • 🚀 交互式项目创建 — 引导式流程完成环境检测、仓库克隆、基础设施部署和项目初始化
  • 🐳 开发基础设施管理 — 自动生成并管理 Docker Compose 开发环境(PostgreSQL / Redis / RabbitMQ)
  • 🔌 插件生态系统 — 内置插件市场,支持搜索、安装、创建和移除前后端插件
  • 🌐 国际化 (i18n) — 完整的中英文双语支持
  • 📦 多项目管理 — 注册、切换和管理多个 FBA 项目

环境要求

运行已发布 CLI

开发此仓库

安装

使用 npm 安装

npm install -g @yuworm/fba-cli

安装后可直接运行:

fba-cli --help

从源码开发

# 克隆仓库
git clone https://github.com/fastapi-practices/fba-cli.git
cd fba-cli

# 安装依赖
bun install

快速开始

# 运行 CLI(默认执行 create 命令)
bun run dev

# 或直接执行
bun run src/index.ts

命令概览

fba-cli create(默认命令)

交互式创建新的 FBA 项目:

  1. 检测环境依赖(Python、pnpm、uv、npm),缺失可选安装
  2. 输入项目名称及前后端目录名称
  3. 克隆前后端仓库
  4. 可选创建 Docker 开发基础设施(PostgreSQL / Redis / RabbitMQ)
  5. 配置数据库、Redis、RabbitMQ 等连接参数并写入 .env
  6. 初始化前端依赖(pnpm install)和后端环境(uv sync + uv run fba init
  7. 可选安装插件市场中的第三方插件

fba-cli dev

启动后端开发服务器。

fba-cli dev [--host <host>] [--port <port>] [--no-reload] [--workers <n>]
  • 自动检测基础设施(infra)状态并在需要时启动
  • 端口默认使用项目配置 .fba.json 中的 server_port

fba-cli dev:web

启动前端开发服务器。

fba-cli dev:web [--host <host>] [--port <port>]

fba-cli dev:celery <subcommand>

启动 Celery 服务。

fba-cli dev:celery worker   # Celery worker
fba-cli dev:celery beat     # Celery beat
fba-cli dev:celery flower   # Celery flower

fba-cli plugin

插件管理子命令组:

| 子命令 | 说明 | |---|---| | plugin add | 从市场或本地添加插件(支持 -b 后端 / -f 前端) | | plugin remove | 移除已安装的插件 | | plugin create | 从模板创建新插件(前端 / 后端 / 前后端) | | plugin list | 列出已安装的前后端插件 |

插件市场支持搜索和筛选,数据源来自 fastapi-practices/plugins

项目管理

| 命令 | 说明 | |---|---| | list | 列出所有已注册的项目 | | current | 显示当前默认项目 | | use | 切换默认项目 | | remove | 从注册表中移除项目 | | edit | 编辑全局配置文件 ~/.fba.json | | go | 进入当前项目目录 |

基础设施管理

| 命令 | 说明 | |---|---| | infra start | 启动 Docker Compose 开发基础设施 | | infra stop | 停止 Docker Compose 开发基础设施 |

配置管理

fba-cli config set   # 交互式设置配置项

全局选项

-p, --project <dir>   指定项目目录(默认使用 current 项目)
--lang <lang>          语言切换 (zh/en)
-h, --help             显示帮助信息
-v, --version          显示版本号

配置文件

  • 全局配置: ~/.fba.json — 存储语言偏好、项目注册表和当前默认项目
  • 项目配置: <project>/.fba.json — 存储前后端目录名、服务端口等项目级设置

技术栈

许可证

MIT