{"id":28578184,"url":"https://github.com/hyperbrew/meta-bolt","last_synced_at":"2026-03-27T04:57:39.529Z","repository":{"id":297081807,"uuid":"804544197","full_name":"hyperbrew/meta-bolt","owner":"hyperbrew","description":"Unified Framework for Bolt projects by Hyper Brew","archived":false,"fork":false,"pushed_at":"2025-06-04T00:03:12.000Z","size":245,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-04T03:51:05.485Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://hyperbrew.co/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hyperbrew.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-05-22T19:39:33.000Z","updated_at":"2025-06-04T02:16:11.000Z","dependencies_parsed_at":"2025-06-04T03:51:09.492Z","dependency_job_id":"7e0c637e-f6a8-404a-a0c3-c7c4d664a985","html_url":"https://github.com/hyperbrew/meta-bolt","commit_stats":null,"previous_names":["hyperbrew/meta-bolt"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyperbrew%2Fmeta-bolt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyperbrew%2Fmeta-bolt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyperbrew%2Fmeta-bolt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyperbrew%2Fmeta-bolt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hyperbrew","download_url":"https://codeload.github.com/hyperbrew/meta-bolt/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyperbrew%2Fmeta-bolt/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259178519,"owners_count":22817388,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-11T01:09:06.281Z","updated_at":"2026-03-27T04:57:34.503Z","avatar_url":"https://github.com/hyperbrew.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg src=\"meta-bolt-logo.svg\" alt=\"Meta Bolt\" title=\"Meta Bolt\" width=\"400\" /\u003e\n\nMeta Bolt by Hyper Brew is an underlying framework for many of Hyper Brew's popular frameworks like [Bolt Figma](https://github.com/hyperbrew/bolt-figma) [Bolt CEP](https://github.com/hyperbrew/bolt-cep/), [Bolt Express](https://github.com/hyperbrew/bolt-express/).\n\nComing soon:\n\n- [Bolt UXP](https://github.com/hyperbrew/bolt-uxp/)\n\n![npm](https://img.shields.io/npm/v/meta-bolt)\n[![License](https://img.shields.io/badge/License-MIT-green.svg)](https://github.com/hyperbrew/meta-bolt/blob/master/LICENSE)\n[![Chat](https://img.shields.io/badge/chat-discord-7289da.svg)](https://discord.gg/PC3EvvuRbc)\n\nMeta Bolt provides these frameworks with 2 things:\n\n1.  A template for easily creating new `create-script` projects (e.g. `yarn create bolt-cep`)\n2.  Helper functions for use in vite plugins (e.g. syncing npm packages, emptying folders, copying files, etc)\n\nThis package is mainly build for Hyper Brew's project, but it is open-source so feel free to use if you find it useful.\n\n# How to build a new Bolt project with Meta Bolt\n\n## 1. The Template\n\nFirstly, you will need to construct a template that works for your desired project, ideally built on Vite.js, whether it's for a plugin template, addon framework, script setup, or something else.\n\nOnce you have your template working, add necessary files for various options (e.g. framework (svelte, react, vue))\n\n## 2. The Plugin\n\nVery connected to step 1, you will need to construct a custom Vite plugin for your project type (e.g. vite-cep-plugin, vite-figma-plugin, etc).\n\nUtilize functions in meta-bolt's `plugin-utils` package to help with the plugin's functionality.\n\n```js\nimport {\n  packageSync,\n  emptyFolder,\n  copyFilesRecursively,\n  zipPackage,\n} from \"meta-bolt/dist/plugin-utils\";\n```\n\n## 3. The Create Script\n\nOnce your template and plugin are functioning well, now you'll need to construct a create script so a user can easily generate their own project from the specific Bolt project (e.g. `yarn create bolt-project`).\n\nTo do this, follow the template below to list all possible options for the user to choose from.\n\nOnly truly required options are:\n\n- folder\n- installDeps\n\n```js\n#!/usr/bin/env node\n\nimport { main } from \"meta-bolt\";\nimport type { BoltInitData, ArgOpt } from \"meta-bolt\";\n\nexport const frameworkOptions: ArgOpt[] = [\n  {\n    value: \"svelte\",\n    label: \"Svelte\",\n    files: [\"src/index-svelte.ts\", \"src/main.svelte\", \"package.svelte.jsonc\"],\n  },\n  {\n    value: \"react\",\n    label: \"React\",\n    files: [\"src/index-react.tsx\", \"src/main.tsx\", \"package.react.jsonc\"],\n  },\n  {\n    value: \"vue\",\n    label: \"Vue\",\n    files: [\"src/index-vue.ts\", \"src/main.vue\", \"package.vue.jsonc\"],\n  },\n];\n\nexport const otherOptions: ArgOpt[] = [\n  {\n    value: \"a\",\n    label: \"A\",\n    files: [\"src/a.ts\"],\n  },\n  {\n    value: \"b\",\n    label: \"B\",\n    files: [\"src/b.ts\"],\n  },\n];\n\nconst initData: BoltInitData = {\n  intro: {\n    name: \"create-bolt-project\",\n    prettyName: \"Bolt Project\",\n  },\n  base: {\n    module: \"bolt-project\",\n    globalIncludes: [\n      \"*\",\n      \"src/**/*\",\n      \"public/**/*\",\n      \"public-zip/**/*\",\n      \".github/**/*\",\n      \".gitignore\",\n      \".env.example\",\n    ],\n    globalExcludes: [\".env\", \"yarn-error.log\", \"package.json\"],\n    fileRenames: [\n      [\"package.svelte.jsonc\", \"package.json\"],\n      [\"package.react.jsonc\", \"package.json\"],\n      [\"package.vue.jsonc\", \"package.json\"],\n    ],\n  },\n  argsTemplate: [\n    {\n      name: \"folder\",\n      type: \"folder\",\n      message: \"Where do you want to create your project?\",\n      initialValue: \"./\",\n      required: true,\n      validator: (input: string) =\u003e {\n        if (input.length \u003c 3) return `Value is required!`;\n      },\n      describe: \"Name of the folder for the new Bolt Project plugin\",\n    },\n    {\n      name: \"displayName\",\n      type: \"string\",\n      message: \"Choose a unique Display Name for your plugin:\",\n      initialValue: \"Bolt Project\",\n      required: true,\n      validator: (input: string) =\u003e {\n        if (input.length \u003c 1) return `Value is required!`;\n      },\n      describe: \"Panel's display name (e.g. Bolt Project)\",\n      alias: \"n\",\n    },\n    {\n      name: \"framework\",\n      type: \"select\",\n      message: \"Select framework:\",\n      alias: \"f\",\n      describe: \"Select a Framework for your plugin:\",\n      options: frameworkOptions,\n      required: true,\n    },\n    {\n      name: \"other\",\n      type: \"select\",\n      message: \"Select other:\",\n      alias: \"o\",\n      describe: \"Select a Other for your plugin:\",\n      options: otherOptions,\n      required: true,\n    },\n    {\n      name: \"installDeps\",\n      type: \"boolean\",\n      message: \"Install dependencies?\",\n      initialValue: true,\n      required: true,\n      alias: \"d\",\n      describe: \"Install dependencies (default: false)\",\n    },\n    {\n      name: \"sampleCode\",\n      type: \"boolean\",\n      message: \"Keep Sample Code Snippets?\",\n      initialValue: true,\n      required: true,\n      alias: \"s\",\n      describe: \"Keep Sample Code (default: true)\",\n    },\n  ],\n};\n\n//* if not using as a module, run immediately\nif (!process.env.BOLT_MODULEONLY) main(initData);\n```\n\nOnce you've built out your template with all the options for your project, now you will need to update your template to be dynamic with this create script.\n\nYou can accomplish this by:\n\n### 1. Adding dynamic comments to various code sections:\n\nMulti-Line options\n\n```js\n// BOLT_VARIABLE_START\nsomeCode();\n// BOLT_VARIABLE_END\n```\n\nSingle Line options\n\n```js\nsomeCode(); // BOLT_VARIABLE_ONLY\n```\n\n### 2. Adding replace comments to various code sections:\n\nReplace comments will grab the last string and replace it's contents with the parameter result\n\n```jsonc\n\"name\": \"bolt-project\", // BOLT_ID_REPLACE\n```\n\n```ts\nconst manifest: PluginManifest = {\n  name: \"Bolt Project\", // BOLT_DISPLAYNAME_REPLACE\n  id: \"co.bolt.project\", // BOLT_ID_REPLACE\n  [...]\n};\n```\n\n### 3. Adding files to various options\n\n```ts\n  {\n    value: \"react\",\n    label: \"React\",\n    files: [\"src/index-react.tsx\", \"src/main.tsx\", \"package.react.jsonc\"],\n  },\n  {\n    value: \"vue\",\n    label: \"Vue\",\n    files: [\"src/index-vue.ts\", \"src/main.vue\", \"package.vue.jsonc\"],\n  },\n```\n\n### 4. Adding File Rename Instructions\n\n```ts\n  fileRenames: [\n    [\"package.svelte.jsonc\", \"package.json\"],\n    [\"package.react.jsonc\", \"package.json\"],\n    [\"package.vue.jsonc\", \"package.json\"],\n  ],\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhyperbrew%2Fmeta-bolt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhyperbrew%2Fmeta-bolt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhyperbrew%2Fmeta-bolt/lists"}