fpx 0.1.0
fpx: ^0.1.0 copied to clipboard
A lean CLI tool to scaffold Flutter components using Mason.
๐งฉ Flutter Paste eXpress - a fast way to clone compatible templated bricks into your flutter project #
fpx is a lightweit developer-first CLI tool that helps you install, scaffold, and customize Flutter components from any source โ instantly. Pull mason bricks from anywhere.
It works like npx for Flutter: you run a single command and get ready-to-edit code in your project.
โจ fpx = Flutter Paste eXpress
Drop-in Flutter components. Local, editable, and fast.
๐ Developer Experience (User View) #
As a Flutter developer, you can use fpx to scaffold buttons, cards, modals, layouts โ from open-source UI kits, internal design systems, or community bricks.
๐ง Getting Started #
dart pub global activate fpx
Then in your Flutter project:
fpx add button --name=LoginButton
Or use a specific component from GitHub:
fpx add card --source=github.com/my-org/ui-bricks
โ What Happens? #
- Downloads the template (from local, Git, or registry)
- Runs prompts or accepts flags (--name, --variant)
- Copies fully editable code into your project (e.g. lib/components/)
- Optionally hooks into your theme, design tokens, or folder structure
๐ก Examples #
fpx add modal --variant=fullscreen
fpx add form --fields=email,password --name=LoginForm
fpx list
fpx search card
๐งฑ Usage for Component Creators - Provide your components #
You can publish your own components that developers can install using fpx. Compatible with Mason templates under the hood.
๐ง Project Structure for fpx Compatibility #
Create a Git repo like:
my-ui-kit/
โโโ bricks/
โ โโโ button/
โ โโโ brick.yaml
โ โโโ __brick__/ # Mason template files
โ โโโ button.dart
โ โโโ README.md
โโโ meta/
โ โโโ component_index.yaml # fpx registry metadata (optional)
โโโ LICENSE
โโโ README.md
๐ brick.yaml Example #
name: button
description: A customizable button component
vars:
name:
type: string
description: The name of the button widget
variant:
type: string
description: Button style (primary, secondary, ghost)
๐งฉ Optional: component_index.yaml #
Used by fpx list, fpx search, or hosted registries:
components:
- name: button
description: A basic button with variant support
tags: [button, ui, widget]
source: ./bricks/button
- name: card
source: github.com/my-org/ui-bricks/card
๐ Component Sources Supported #
- โ Local paths
- โ Git repositories (public or private)
- ๐งช (Planned) Hosted registries
- ๐งช (Planned) Component preview sandbox (web)
๐งฐ CLI Reference #
fpx add <component> [--name=...] [--variant=...]
fpx list # List available components
fpx search <term> # Search compatible components
fpx config # View or edit config
fpx update # Pull latest bricks from source
โ๏ธ Authoring & Publishing #
Build Mason templates for each component
Follow the brick.yaml and folder conventions
Host them on GitHub or internal Git
(Optional) Submit to the fpx registry
๐ฆ Coming soon: fpx publish to share your components with the community #
๐ Example Repos example-ui-kit
internal-team/bricks
โค๏ธ Why fpx? ๐ง Local-first: no hidden magic, fully editable code
๐งฑ Component-driven: scaffold exactly what you need
โ๏ธ Mason-powered: works with existing Dart tools
๐ Fast and flexible: from Git or from a growing ecosystem
๐ฎ Feedback, Issues, Contributions Weโd love your help evolving the Flutter component ecosystem.
File issues or feature requests
Publish your own components
Contribute improvements to fpx