maddex
v0.0.1
Published
Maddex is a zero-build CLI that installs **Caspian-ready UI components** (Python) into your project—similar in spirit to how shadcn-style CLIs “copy in” components, but for a Caspian/Python component workflow.
Readme
Maddex CLI
Maddex is a zero-build CLI that installs Caspian-ready UI components (Python) into your project—similar in spirit to how shadcn-style CLIs “copy in” components, but for a Caspian/Python component workflow.
It pulls components from the Maddex component registry API and writes them directly into your repository (e.g., src/lib/maddex). It can also bootstrap baseline styling and icons so a fresh project is ready to use immediately.
What it does
- Adds components on demand:
maddex add Button Carddownloads component code and writes it locally. - Supports multi-file components: components can ship as multiple files (e.g.,
Button.py,Button.html) or as a single file (legacy protocol). - Bulk install:
maddex add --allinstalls the full component set. - Updates installed components:
maddex updatescans your output directory for installed.pycomponents and refreshes them from the registry. - First-run bootstrap:
- Creates
maddex.jsonwith sensible defaults. - Copies a bundled
globals.cssinto your app (src/app/globals.css) if missing (or on first run). - Ensures
tw-animate-cssis installed (as a dev dependency). - Installs a default set of icons via
ppiconsand writes them tosrc/lib/ppicons.
- Creates
Requirements
- Node.js 18+ recommended
- A project with:
package.json- Typical Caspian layout assumptions:
src/app/globals.csssrc/lib/*for generated libraries (default output)
Install
Globally via npm:
npm i -g maddexLocal via npm:
npm i -D maddexOr run via npx:
npx maddex add ButtonQuick start
Add one or more components
maddex add Button CardInteractive add:
maddex addInstall everything
maddex add --allUpdate what’s already installed
maddex updateFlags
| Flag | Works with | Meaning |
| --------- | ---------: | ------------------------------------------------------------------ |
| --all | add | Install every component from the registry |
| --force | add | Overwrite existing files (also enabled automatically on first run) |
Output location
Default:
src/lib/maddexConfiguration (maddex.json)
Created on first run. Default shape:
{
"style": "default",
"force": false,
"outputDir": "src/lib/maddex",
"iconsInstalled": false,
"tailwind": {
"css": "src/app/globals.css",
"baseColor": "neutral",
"cssVariables": true,
"prefix": ""
},
"pythonPath": "src/lib/maddex",
"iconLibrary": "ppicons"
}First-run behavior
When maddex.json does not exist yet, Maddex will:
- Create
maddex.json. - Install default icons (one-time) via:
npm install -g ppiconsnpx ppicons add <icon list>
- Copy bundled
globals.csstosrc/app/globals.cssif missing. - Ensure
tw-animate-cssis installed indevDependencies. - Ensure core components exist (unless
--all):SlotPortalutils
Registry API
- Single component:
https://maddex.tsnc.tech/cli?component=<Name> - All components:
https://maddex.tsnc.tech/cli?component=all
Payloads supported
Multi-file payload:
{
"name": "Button",
"files": [
{ "name": "Button.py", "content": "..." },
{ "name": "Button.html", "content": "..." }
]
}Legacy single-file payload:
{
"name": "Button",
"content": "...python code..."
}Troubleshooting
- “No components found to update.”:
updateonly scans.pyfiles inoutputDirand ignores__init__.py. - Icon install fails: ensure you can install global npm packages and run
npx.
📄 License
maddex-cli is released under the MIT License. See LICENSE for details.
👤 Author
This project is developed and maintained by The Steel Ninja Code, continuously pushing the boundaries of Python development.
📧 Contact
Questions or feedback? Reach us at [email protected] — we’d love to hear from you!
Credits
- Component registry:
maddex.tsnc.tech - Icons workflow:
ppicons
