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

malette

v1.0.1

Published

Malette - The Declarative AI Application Framework CLI

Downloads

34

Readme

Malette CLI

NPM Version Downloads License: MIT

Malette 是一个声明式 AI 应用开发框架的命令行工具,让您能够通过简单的配置文件快速构建、部署和管理 AI 应用。

✨ 特性

  • 🚀 零配置启动 - 一键启动完整的 AI 应用环境
  • 📦 声明式开发 - 通过 UTP 文件定义应用逻辑,无需编写复杂代码
  • 🔧 丰富的工具链 - 内置开发、构建、部署、测试工具
  • 🎨 多引擎支持 - 支持 ComfyUI、自定义服务等多种执行引擎
  • 🌐 Web UI 生成 - 自动生成美观的 Web 用户界面
  • ☁️ 云端部署 - 支持一键部署到云服务器
  • 🔄 热重载开发 - 文件变更自动重新加载
  • 📊 实时监控 - 内置应用状态监控和日志管理

🎯 快速开始

安装

# 使用 npm 安装
npm install -g malette

# 使用 yarn 安装
yarn global add malette

# 使用 pnpm 安装
pnpm add -g malette

零配置体验

# 立即体验 Malette(推荐新手)
malette quick-start

这将启动一个完整的演示环境,包括:

  • AI 图像生成应用
  • Web 用户界面
  • 后台任务处理
  • 实时监控面板

创建新项目

# 创建新的 Malette 项目
malette init my-ai-app

# 进入项目目录
cd my-ai-app

# 启动开发环境
malette dev

运行示例应用

# 下载并运行官方示例
malette run https://github.com/malette-ai/examples/comfyui-basic.malette

# 或运行本地 UTP 文件
malette run my-app.utp.json

📖 主要命令

开发命令

# 初始化新项目
malette init <project-name>

# 启动开发环境(包含热重载)
malette dev

# 验证 UTP 文件语法
malette validate app.utp.json

# 快速运行应用包
malette run app.malette

构建和部署

# 构建应用包
malette build app.utp.json

# 部署到服务器
malette deploy app.malette --server my-server

# 云端托管服务
malette cloud deploy app.malette

服务器管理

# 启动 Malette 服务器
malette server start

# 停止服务器
malette server stop

# 查看服务器状态
malette server status

🎨 UTP 文件示例

创建一个简单的 AI 图像生成应用:

{
  "specVersion": "1.0.0",
  "id": "my.image.generator",
  "info": {
    "name": "我的图像生成器",
    "version": "1.0.0",
    "description": "基于 SDXL 的图像生成应用"
  },
  "environment": {
    "engine": {
      "type": "io.malette.engine.comfyui",
      "version": "1.14.0"
    }
  },
  "interface": {
    "inputs": {
      "type": "object",
      "properties": {
        "prompt": {
          "type": "string",
          "description": "图像描述"
        }
      }
    },
    "outputs": {
      "type": "object",
      "properties": {
        "image": {
          "type": "string",
          "format": "uri"
        }
      }
    }
  },
  "presentation": {
    "create": {
      "component": "StandardForm",
      "fields": [
        {
          "source": "/prompt",
          "component": "TextArea",
          "props": {
            "label": "描述您想要的图像",
            "placeholder": "例如:一只可爱的猫咪在花园里玩耍"
          }
        }
      ]
    },
    "result": {
      "component": "ImageGallery",
      "props": {
        "images": "{{ outputs.image }}"
      }
    }
  }
}

保存为 image-gen.utp.json,然后运行:

malette run image-gen.utp.json

🛠️ 高级用法

自定义配置

在项目根目录创建 malette.config.json

{
  "project": {
    "name": "my-project",
    "version": "1.0.0"
  },
  "server": {
    "port": 3001,
    "host": "0.0.0.0"
  },
  "worker": {
    "concurrency": 2,
    "timeout": 300000
  },
  "storage": {
    "type": "local",
    "path": "./data"
  }
}

环境变量

# 设置工作目录
export MALETTE_WORKDIR=/path/to/workdir

# 设置日志级别
export LOG_LEVEL=debug

# 设置 Redis 连接
export REDIS_URL=redis://localhost:6379

# 设置数据库连接
export DATABASE_URL=postgresql://user:pass@localhost/db

Docker 使用

# 使用官方 Docker 镜像
docker run -p 3001:3001 malette/server:latest

# 使用 Docker Compose
curl -O https://raw.githubusercontent.com/malette-ai/malette/main/docker-compose.yml
docker-compose up -d

📚 文档和资源

🤝 贡献

我们欢迎社区贡献!请查看 贡献指南 了解如何参与项目开发。

📄 许可证

MIT License - 详见 LICENSE 文件。


Malette - 让 AI 应用开发变得简单高效 🚀