@a5gard/bifrost 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,282 @@
1
+ # @a5gard/bifrost
2
+
3
+ Platform-agnostic project creator with extensible template system inspired by Remix Stacks.
4
+
5
+ ## Features
6
+
7
+ - 🌈 **Platform Agnostic**: Works with any framework (Remix, Next.js, Vite, etc.)
8
+ - 📦 **Multiple Package Managers**: Support for npm, pnpm, yarn, and bun
9
+ - 🎯 **Git-based Stacks**: Use any GitHub repository as a template
10
+ - 🚀 **Interactive CLI**: Guided setup with smart prompts
11
+ - âš¡ **Fast Setup**: Clone, configure, and install in seconds
12
+ - 🔄 **Auto Git Push**: Optionally push initial commit to GitHub
13
+
14
+ ## Usage
15
+
16
+ ### Interactive Mode
17
+
18
+ ```bash
19
+ bunx @a5gard/bifrost
20
+ ```
21
+
22
+ In interactive mode, the following prompts will display:
23
+ - What would you like to name your new project?
24
+ - Which platform would you like to use?
25
+ - Which package manager do you prefer?
26
+ - Would you like to have the install command run once the project has initialized?
27
+ - Would you like to auto create and push the first commit to GitHub?
28
+ - [!NEW] `config.bifrost` wizard
29
+ - [!NEW] Submit template to bifrost registry
30
+
31
+
32
+ ### With Options
33
+
34
+ ```bash
35
+ bunx @a5gard/bifrost my-app --template owner/repo --pkg-mgr bun
36
+ ```
37
+
38
+ ### Full Example
39
+
40
+ ```bash
41
+ bunx @a5gard/bifrost my-app -s remix-run/indie-template -p bun
42
+ ```
43
+
44
+ ### Platform Templates
45
+
46
+ ```bash
47
+ bunx @a5gard/bifrost my-app --list-templates
48
+ ```
49
+
50
+ ## Options
51
+
52
+ | Flag | Alias | Description |
53
+ |------|-------|-------------|
54
+ | `--template` | `-s` | Stack to use (format: owner/repo) |
55
+ | `--pkg-mgr` | `-p` | Package manager (npm, pnpm, yarn, bun) |
56
+ | `--no-install` | | Skip dependency installation |
57
+ | `--help` | `-h` | Show help |
58
+ | `--version` | `-V` | Show version |
59
+
60
+ ## `config.bifrost wizard`
61
+
62
+ ```bash
63
+ bunx @a5gard/bifrost wizard
64
+ ```
65
+
66
+ The wizard will help guide you through the process of the templates config file by going over the following questions:
67
+ - description
68
+ - repo ( if it doesn't sense the data by scanning your project, it will prompt you to push your current project and create a public repo )
69
+ - tags that you would like to associate with your template
70
+ - post install scripts that are required to run once the project has initialized, providing the npm scripts names in a csv format
71
+ - in a csv format, provide any and all plugins that you would like to include with your template to be installed and used with your template'
72
+
73
+ It will then create config.bifrost for you with the submitted data, and if no values are missing will prompt you, asking if you would like to submit your template at this time. The only requirements for submitting is for the repo to be public and that your template includes the bifrost config file
74
+
75
+ ```json
76
+ // config.bifrost
77
+ {
78
+ "name": "My Stack",
79
+ "description": "A custom template for X platform",
80
+ "platform": "remix",
81
+ "github": "owner/repo",
82
+ "tags": ["react", "typescript", "tailwind"],
83
+ "postInstall": ["setup", "db:generate"],
84
+ "plugins": ["owner/plugin1", "owner/plugin2"]
85
+ }
86
+ ```
87
+
88
+ ## `Submit template to bifrost registry`
89
+
90
+ As long as your project already has a public repo already in place, if not it will prompt you to do so at this time, and the required `config.bifrost`. If you don't currently have the config file, it will start the config wizard to help you create it.
91
+
92
+ ```bash
93
+ bunx @a5gard/bifrost submit
94
+ ```
95
+
96
+
97
+ ### Stack Configuration (Optional)
98
+
99
+ Add a `config.bifrost` to your repository root for enhanced functionality:
100
+
101
+ ```json
102
+ {
103
+ "name": "My Stack",
104
+ "description": "A custom template for X platform",
105
+ "platform": "remix",
106
+ "github": "owner/repo",
107
+ "tags": ["react", "typescript", "tailwind"],
108
+ "postInstall": ["setup", "db:generate"],
109
+ "plugins": ["owner/plugin1", "owner/plugin2"]
110
+ }
111
+ ```
112
+
113
+ # @a5gard/bifrost-plugin
114
+
115
+ Plugin installer / wizard for bifrost projects.
116
+
117
+ ## Installing A Plugin
118
+
119
+ ### Interactive Mode
120
+
121
+ Once your project has completed its installation process, you may now cd into the newly created directory and run:
122
+
123
+ ```bash
124
+ bunx @a5gard/bifrost-plugin
125
+ ```
126
+
127
+ Entering interactive mode it will display the following options:
128
+ - List available plugins to install
129
+ - Plugin wizard ( guide in creating your own plugin )
130
+ - Submit Plugin
131
+
132
+ ## `List available plugins to install`
133
+
134
+ Running the following command will start plugin installation process:
135
+
136
+ ```bash
137
+ bunx @a5gard/bifrost-plugin list
138
+ ```
139
+
140
+ The installer will then obtain the list of available plugins to choose from the @a5gard/bifrost-plugin repo (owner `8an3`) from the file labeled `registry.bifrost`
141
+
142
+ ### Direct Installation
143
+
144
+ or you may use the supplied method
145
+
146
+ ```bash
147
+ bunx @a5gard/bifrost-plugin otp-auth-plugin
148
+ ```
149
+
150
+ Which will immediatly start the installation process, after scanning your projects config.bifrost to see if the platforms match for compatibility to ensure you are installing the correct plugin.
151
+
152
+ ## `Plugin wizard`
153
+ ### Creating your own plugin
154
+
155
+ Running the following command will start the create plugin wizard:
156
+
157
+ ```bash
158
+ bunx @a5gard/bifrost-plugin create
159
+ ```
160
+
161
+ Where it will then inquirer:
162
+ - name of plugin ( req )
163
+ - platform ( req )
164
+ - description ( req )
165
+ - tags you would like to have associated with your plugin
166
+ - will ask if you would like to supply the req. libraries now
167
+ - a placeholder will display the format to input the library names but will go as follows @remix-run/react, remix-auth, react
168
+ - auto push / create github repo
169
+
170
+ It will then create:
171
+ - create `files/` folder
172
+ - run `npm init`
173
+ - push to github
174
+ - create a readme containing a plugin guide and links to the site in order to submit your new plugin and discover others
175
+ - create `plugin.bifrost` configuration file, filing in all the fields that it had gotten from you during the setup process
176
+ - name
177
+ - description
178
+ - platform
179
+ - tags, if you completed this step
180
+ - libraries, if you completed this step
181
+ - github
182
+
183
+ Plugins are to be made with their own repo so as it can host all the required files for the plugin.
184
+ The repo is required to include a json config file labeled `plugin.bifrost` and a folder labeled `files` where it will host all the required files.
185
+ When installing a plugin it will prompt the user to either confirm the default supplied file location or the use can also edit the location to suite their use cases needs.
186
+
187
+ ### plugin.bifrost
188
+
189
+ ```json
190
+ {
191
+ "name": "otp-auth-plugin",
192
+ "description": "A custom one time password auth plugin for the remix platform",
193
+ "platform": "remix",
194
+ "github": "8an3/otp-auth-plugin",
195
+ "tags": ["remix-run", "auth", "one-time-password"],
196
+ "libraries": ["remix-auth-totp","remix-auth","@catalystsoftware/icons","@prisma/client","resend"],
197
+ "files": [
198
+ {
199
+ "name": "email.tsx",
200
+ "location": "app/components/catalyst-ui/utils/email.tsx"
201
+ },
202
+ {
203
+ "name": "client-auth.tsx",
204
+ "location": "app/components/catalyst-ui/utils/client-auth.tsx"
205
+ },
206
+ {
207
+ "name": "auth-session.ts",
208
+ "location": "app/components/catalyst-ui/utils/auth-session.ts"
209
+ },
210
+ {
211
+ "name": "prisma.ts",
212
+ "location": "app/components/catalyst-ui/utils/prisma.ts"
213
+ },
214
+ {
215
+ "name": "login.tsx",
216
+ "location": "app/routes/auth/login.tsx"
217
+ },
218
+ {
219
+ "name": "lougout.tsx",
220
+ "location": "app/routes/auth/lougout.tsx"
221
+ },
222
+ {
223
+ "name": "signup.tsx",
224
+ "location": "app/routes/auth/signup.tsx"
225
+ },
226
+ {
227
+ "name": "magic-link.tsx",
228
+ "location": "app/routes/auth/magic-link.tsx"
229
+ },
230
+ {
231
+ "name": "verify.tsx",
232
+ "location": "app/routes/auth/verify.tsx"
233
+ },
234
+ ],
235
+ "configs":[]
236
+ }
237
+ ```
238
+
239
+ ## `Submit Plugin`
240
+
241
+ Running the following command will start the submission process without the need of interactive mode:
242
+
243
+ ```bash
244
+ bunx @a5gard/bifrost-plugin submit
245
+ ```
246
+
247
+ Selecting this option will automate the submission process for you, adding your plugin to the libraries registry. Allowing you to share you plugin with others that will also be posted on the site to allow users to find it more easily.
248
+
249
+
250
+ ## Searching / Posting Templates and Plugins
251
+
252
+ Shortly a site will be available for use where you can search for templates and plugins.
253
+
254
+ Feature two tabs, both tabs will host a filtering section located to the left of the pages content and a search bar located at the top of each tabs section. Allowing you to filter by platform, tags, etc meanwhile the search bar will allow you to search for individual templates or plugins for you to use.
255
+
256
+ ### Templates
257
+
258
+ Each template result will display:
259
+ - name
260
+ - description
261
+ - platform
262
+ - command line to install the template
263
+ - tags
264
+ - any plugins that are to be included with the templates installation
265
+
266
+ ### Plugins
267
+
268
+ Each plugin result will display
269
+ - name
270
+ - description
271
+ - platform
272
+ - command line to install the plugin
273
+ - tags
274
+ - required libraries
275
+ - required files
276
+
277
+ ### Submitting
278
+
279
+ Whether its a template or plugin, you will have the ability to submit your own to be included with its respective registry, this step is not required or needed but will help in its overall discoverability.
280
+ All you have to do in order to submit is supply your templates or plugins config file once you start the submission process. The pages nav bar will host a `submit` button in order to start the process.
281
+
282
+ Upon submission the website will automatically update the relevant registry file and push the update to github to ensure the process is automated.
@@ -0,0 +1 @@
1
+ #!/usr/bin/env bun