@morphist/aspects 0.1.1 → 0.1.3
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 +287 -162
- package/dist/scripts/postinstall.js +90 -0
- package/dist/{cli.js → src/cli.js} +4239 -791
- package/package.json +13 -5
package/README.md
CHANGED
|
@@ -1,37 +1,132 @@
|
|
|
1
1
|
```text
|
|
2
|
-
█████╗
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
██║
|
|
7
|
-
╚═╝
|
|
2
|
+
█████╗ ███████╗██████╗ ███████╗ ██████╗████████╗███████╗
|
|
3
|
+
██╔══██╗██╔════╝██╔══██╗██╔════╝██╔════╝╚══██╔══╝██╔════╝
|
|
4
|
+
███████║███████╗██████╔╝█████╗ ██║ ██║ ███████╗
|
|
5
|
+
██╔══██║╚════██║██╔═══╝ ██╔══╝ ██║ ██║ ╚════██║
|
|
6
|
+
██║ ██║███████║██║ ███████╗╚██████╗ ██║ ███████║
|
|
7
|
+
╚═╝ ╚═╝╚══════╝╚═╝ ╚══════╝ ╚═════╝ ╚═╝ ╚══════╝
|
|
8
8
|
```
|
|
9
9
|
|
|
10
|
-
> **
|
|
10
|
+
> **The Open Aspect Registry** - Personality modules for AI agents.
|
|
11
11
|
|
|
12
|
-
[
|
|
12
|
+
**Website:** [aspects.sh](https://aspects.sh) | **Docs:** [aspects.sh/docs](https://aspects.sh/docs)
|
|
13
13
|
|
|
14
14
|
---
|
|
15
15
|
|
|
16
16
|
## What are Aspects?
|
|
17
17
|
|
|
18
|
-
Aspects are personality modules for AI agents. They define how an AI speaks, thinks, and behaves
|
|
18
|
+
Aspects are personality modules for AI agents. They define how an AI speaks, thinks, and behaves - from quirky wizards to helpful assistants to domain experts.
|
|
19
19
|
|
|
20
20
|
Each aspect is a JSON file containing:
|
|
21
21
|
|
|
22
|
-
- **Identity**
|
|
23
|
-
- **Voice Hints**
|
|
24
|
-
- **Modes**
|
|
25
|
-
- **Prompt**
|
|
22
|
+
- **Identity** - Name, tagline, character description
|
|
23
|
+
- **Voice Hints** - Speaking speed, emotional tone, style guidance
|
|
24
|
+
- **Modes** - Different behavioral modes (e.g., "campaign mode" for a D&D wizard)
|
|
25
|
+
- **Prompt** - The core personality prompt
|
|
26
26
|
|
|
27
27
|
## Quick Start
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
```bash
|
|
30
|
+
npx @morphist/aspects add alaric
|
|
31
|
+
```
|
|
30
32
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
That's it. The aspect is now installed to your project.
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
# Search the registry
|
|
37
|
+
npx @morphist/aspects search wizard
|
|
38
|
+
|
|
39
|
+
# Create a new aspect
|
|
40
|
+
npx @morphist/aspects create
|
|
41
|
+
|
|
42
|
+
# List installed aspects
|
|
43
|
+
npx @morphist/aspects list
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### Installation Scope
|
|
47
|
+
|
|
48
|
+
| Flag | Scope | Location |
|
|
49
|
+
|------|-------|----------|
|
|
50
|
+
| (default) | Project | `./.aspects/` |
|
|
51
|
+
| `-g` | Global | `~/.aspects/` |
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
# Install to project (default if .aspects/ exists)
|
|
55
|
+
npx @morphist/aspects add alaric
|
|
56
|
+
|
|
57
|
+
# Install globally
|
|
58
|
+
npx @morphist/aspects add -g alaric
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### Install Formats
|
|
62
|
+
|
|
63
|
+
Multiple ways to specify an aspect:
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
# By name (registry)
|
|
67
|
+
aspects add alaric
|
|
68
|
+
|
|
69
|
+
# Anonymous aspect (name with hash suffix)
|
|
70
|
+
aspects add my-wizard-7kYx3abc12
|
|
71
|
+
|
|
72
|
+
# By URL
|
|
73
|
+
aspects add https://aspects.sh/aspects/my-wizard-7kYx3abc12
|
|
74
|
+
|
|
75
|
+
# By hash
|
|
76
|
+
aspects add blake3:BnCcPam...
|
|
77
|
+
|
|
78
|
+
# From GitHub
|
|
79
|
+
aspects add github:user/repo
|
|
80
|
+
|
|
81
|
+
# From local path
|
|
82
|
+
aspects add ./path/to/aspect
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### Create & Share (No Account Needed)
|
|
86
|
+
|
|
87
|
+
The simplest way to publish an aspect:
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
# 1. Create your aspect interactively
|
|
91
|
+
npx @morphist/aspects create my-aspect
|
|
92
|
+
|
|
93
|
+
# 2. Edit the generated aspect.json (customize prompt, add directives)
|
|
94
|
+
|
|
95
|
+
# 3. Share to the public registry
|
|
96
|
+
npx @morphist/aspects share ./my-aspect
|
|
97
|
+
# Output: ✓ Shared! Name: my-aspect-7kYx3abc12
|
|
98
|
+
|
|
99
|
+
# 4. Anyone can now install it:
|
|
100
|
+
npx @morphist/aspects add my-aspect-7kYx3abc12
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
### Publishing to Registry
|
|
104
|
+
|
|
105
|
+
Two ways to publish aspects to the public registry:
|
|
106
|
+
|
|
107
|
+
| Method | Command | Account | Features |
|
|
108
|
+
|--------|---------|---------|----------|
|
|
109
|
+
| **Share** | `aspects share` | No | Quick anonymous sharing via content hash |
|
|
110
|
+
| **Publish** | `aspects publish` | Yes | Claim names, version updates, edit metadata |
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
# Anonymous sharing (no account)
|
|
114
|
+
npx @morphist/aspects share ./my-aspect
|
|
115
|
+
# Output: ✓ Shared! Name: my-aspect-7kYx3abc12
|
|
116
|
+
# Install with: npx @morphist/aspects add my-aspect-7kYx3abc12
|
|
117
|
+
|
|
118
|
+
# Publishing with account
|
|
119
|
+
npx @morphist/aspects login # Create account or authenticate
|
|
120
|
+
npx @morphist/aspects publish # Claim name, publish versions
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
We fully embrace anonymous contributions - but creating an account lets you claim names and publish updates.
|
|
124
|
+
|
|
125
|
+
### Behavioral Rules
|
|
126
|
+
|
|
127
|
+
Aspects support **directives** (strict MUST-follow rules) and **instructions** (softer guidance). See [Instructions & Directives](#instructions--directives) for details.
|
|
128
|
+
|
|
129
|
+
Run `npx @morphist/aspects --help` for quick reference, or see [CLI Documentation](./docs/CLI.md) for full details.
|
|
35
130
|
|
|
36
131
|
## Registry Structure
|
|
37
132
|
|
|
@@ -92,7 +187,9 @@ Aspects are defined in `aspect.json`:
|
|
|
92
187
|
|
|
93
188
|
### Categories
|
|
94
189
|
|
|
95
|
-
Every aspect
|
|
190
|
+
Every aspect has exactly one category. You can use an official category or create your own custom category.
|
|
191
|
+
|
|
192
|
+
**Official Categories:**
|
|
96
193
|
|
|
97
194
|
| Category | Description |
|
|
98
195
|
| -------------- | ---------------------------------- |
|
|
@@ -105,6 +202,10 @@ Every aspect must have exactly one official category:
|
|
|
105
202
|
| `spiritual` | Mindfulness, wisdom, guidance |
|
|
106
203
|
| `pundit` | Commentary, analysis, opinions |
|
|
107
204
|
|
|
205
|
+
**Custom Categories:**
|
|
206
|
+
|
|
207
|
+
You can use any category name (2-20 characters, alphanumeric + hyphens, any case). Examples: `YOLO`, `my-niche`, `Cooking`.
|
|
208
|
+
|
|
108
209
|
### Optional Fields
|
|
109
210
|
|
|
110
211
|
| Field | Description |
|
|
@@ -119,106 +220,122 @@ Every aspect must have exactly one official category:
|
|
|
119
220
|
|
|
120
221
|
### Field Limits
|
|
121
222
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
| Field |
|
|
125
|
-
| ------------- | ----------------------- |
|
|
126
|
-
| `name` | 50 characters |
|
|
127
|
-
| `displayName` | 100 characters |
|
|
128
|
-
| `tagline` | 200 characters |
|
|
129
|
-
| `
|
|
130
|
-
| `prompt` | 50,000 characters |
|
|
131
|
-
| `
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
223
|
+
Fields have minimum and maximum lengths:
|
|
224
|
+
|
|
225
|
+
| Field | Min | Max |
|
|
226
|
+
| ------------- | --- | ----------------------- |
|
|
227
|
+
| `name` | 2 | 50 characters |
|
|
228
|
+
| `displayName` | 2 | 100 characters |
|
|
229
|
+
| `tagline` | 10 | 200 characters |
|
|
230
|
+
| `category` | 2 | 20 characters |
|
|
231
|
+
| `prompt` | 10 | 50,000 characters |
|
|
232
|
+
| `tags` | 2 | 30 chars each, max 10 |
|
|
233
|
+
| `icon` | - | 50 characters |
|
|
234
|
+
| `modes` | - | 10 maximum |
|
|
235
|
+
|
|
236
|
+
## Instructions & Directives
|
|
237
|
+
|
|
238
|
+
Aspects can include behavioral rules that shape how the AI responds.
|
|
239
|
+
|
|
240
|
+
### Directives (Strict Rules)
|
|
241
|
+
|
|
242
|
+
Directives are **MUST-follow** rules with priority levels. They receive special formatting and emphasis across all LLM models.
|
|
243
|
+
|
|
244
|
+
```json
|
|
245
|
+
{
|
|
246
|
+
"directives": [
|
|
247
|
+
{
|
|
248
|
+
"id": "stay-in-character",
|
|
249
|
+
"rule": "Never break character under any circumstances",
|
|
250
|
+
"priority": "high"
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
"id": "no-real-advice",
|
|
254
|
+
"rule": "Always clarify you cannot provide real medical, legal, or financial advice",
|
|
255
|
+
"priority": "high"
|
|
256
|
+
}
|
|
257
|
+
]
|
|
258
|
+
}
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
### Instructions (General Guidance)
|
|
262
|
+
|
|
263
|
+
Instructions are softer preferences-guidance rather than hard rules.
|
|
264
|
+
|
|
265
|
+
```json
|
|
266
|
+
{
|
|
267
|
+
"instructions": [
|
|
268
|
+
{ "id": "concise", "rule": "Prefer shorter responses when possible" },
|
|
269
|
+
{ "id": "humor", "rule": "Use dry wit and occasional wordplay" }
|
|
270
|
+
]
|
|
271
|
+
}
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
### Cross-LLM Universal Pattern
|
|
275
|
+
|
|
276
|
+
When you compile an aspect (`aspects compile <name> -m <model>`), **high-priority directives are automatically repeated** at both the beginning and end of the prompt:
|
|
277
|
+
|
|
278
|
+
| Model | Behavior |
|
|
279
|
+
|-------|----------|
|
|
280
|
+
| **Claude** | Weights the **beginning** of prompts more heavily |
|
|
281
|
+
| **GPT** | Weights the **end** of prompts more heavily |
|
|
282
|
+
|
|
283
|
+
By placing critical rules in both positions, aspects work reliably across all models. The compiled output includes a comment explaining this:
|
|
284
|
+
|
|
285
|
+
```xml
|
|
286
|
+
<!-- Universal Pattern: High-priority directives repeated here for cross-LLM compatibility.
|
|
287
|
+
Claude weights prompt beginning; GPT weights prompt end. Repetition ensures emphasis on both. -->
|
|
288
|
+
<critical-reminders>
|
|
289
|
+
<rule id="stay-in-character" priority="high">Never break character under any circumstances</rule>
|
|
290
|
+
</critical-reminders>
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
### Best Practices
|
|
294
|
+
|
|
295
|
+
- **Few > Many** - A few well-crafted rules beat many vague ones
|
|
296
|
+
- **Add escape clauses** - "Never do X, unless the user explicitly requests it" (GPT takes absolutes very literally)
|
|
297
|
+
- **Be specific** - "Never reveal you are an AI" vs "Stay in character"
|
|
298
|
+
|
|
299
|
+
See [Multi-LLM Prompting Guide](./docs/MULTI-LLM-PROMPTING.md) for detailed cross-model guidance.
|
|
300
|
+
|
|
301
|
+
## Create & Publish an Aspect
|
|
302
|
+
|
|
303
|
+
### Quick Start
|
|
304
|
+
|
|
305
|
+
```bash
|
|
306
|
+
# 1. Create your aspect interactively
|
|
307
|
+
npx @morphist/aspects create my-aspect
|
|
308
|
+
|
|
309
|
+
# 2. Edit the generated aspect.json (customize prompt, add directives)
|
|
310
|
+
|
|
311
|
+
# 3. Share anonymously (no account needed)
|
|
312
|
+
npx @morphist/aspects share ./my-aspect
|
|
313
|
+
# Output: ✓ Shared! Name: my-aspect-BnCcPam123
|
|
314
|
+
# Anyone can install with: npx @morphist/aspects add my-aspect-BnCcPam123
|
|
315
|
+
```
|
|
316
|
+
|
|
317
|
+
### Publishing with an Account
|
|
318
|
+
|
|
319
|
+
To claim a name and publish versioned updates:
|
|
320
|
+
|
|
321
|
+
```bash
|
|
322
|
+
# Authenticate with the registry
|
|
323
|
+
npx @morphist/aspects login
|
|
324
|
+
|
|
325
|
+
# Publish your aspect
|
|
326
|
+
npx @morphist/aspects publish
|
|
327
|
+
```
|
|
328
|
+
|
|
329
|
+
We fully embrace anonymous contributions via `share` - but creating an account lets you claim names and publish updates.
|
|
330
|
+
|
|
331
|
+
### Validation
|
|
332
|
+
|
|
333
|
+
All aspects are automatically validated:
|
|
210
334
|
|
|
211
335
|
- ✅ JSON schema validation
|
|
212
336
|
- ✅ Field length limits
|
|
213
337
|
- ✅ Category verification
|
|
214
338
|
- ✅ Security scan for prompt injection
|
|
215
|
-
- ✅ Registry entry consistency
|
|
216
|
-
|
|
217
|
-
### Submit via Issue Form
|
|
218
|
-
|
|
219
|
-
Don't want to use git? Submit directly via our issue template:
|
|
220
|
-
|
|
221
|
-
**[Submit an Aspect →](https://github.com/aimorphist/aspects/issues/new?template=new-aspect.yml)**
|
|
222
339
|
|
|
223
340
|
## Trust Levels
|
|
224
341
|
|
|
@@ -229,74 +346,70 @@ Don't want to use git? Submit directly via our issue template:
|
|
|
229
346
|
|
|
230
347
|
## For App Developers
|
|
231
348
|
|
|
232
|
-
Fetch aspects from the registry:
|
|
349
|
+
Fetch aspects from the registry API:
|
|
233
350
|
|
|
234
351
|
```typescript
|
|
235
|
-
const
|
|
236
|
-
"https://raw.githubusercontent.com/aimorphist/aspects/main/registry/index.json";
|
|
237
|
-
|
|
238
|
-
// Fetch registry index
|
|
239
|
-
const registry = await fetch(REGISTRY_URL).then((r) => r.json());
|
|
240
|
-
|
|
241
|
-
// Get aspect details
|
|
242
|
-
const alaricEntry = registry.aspects["alaric"];
|
|
243
|
-
const aspectUrl = alaricEntry.versions[alaricEntry.latest].url;
|
|
352
|
+
const API_URL = "https://aspects.sh/api/v1";
|
|
244
353
|
|
|
245
|
-
// Fetch
|
|
246
|
-
const
|
|
354
|
+
// Fetch a specific aspect
|
|
355
|
+
const response = await fetch(`${API_URL}/aspects/alaric/1.0.0`);
|
|
356
|
+
const { aspect } = await response.json();
|
|
247
357
|
|
|
248
358
|
console.log(aspect.prompt); // The personality prompt
|
|
249
359
|
console.log(aspect.voiceHints); // Voice configuration
|
|
360
|
+
|
|
361
|
+
// Search aspects
|
|
362
|
+
const search = await fetch(`${API_URL}/search?q=wizard`).then(r => r.json());
|
|
363
|
+
console.log(search.results);
|
|
250
364
|
```
|
|
251
365
|
|
|
366
|
+
See the [API documentation](https://aspects.sh/docs) for full details.
|
|
367
|
+
|
|
252
368
|
## CLI
|
|
253
369
|
|
|
254
370
|
The Aspects CLI helps you create and manage aspects.
|
|
255
371
|
|
|
256
372
|
```bash
|
|
257
|
-
#
|
|
258
|
-
|
|
259
|
-
cd aspects && bun install
|
|
373
|
+
# Use directly with npx (no install required)
|
|
374
|
+
npx @morphist/aspects <command>
|
|
260
375
|
|
|
261
|
-
#
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
# Install aspects
|
|
265
|
-
bun run dev add alaric gandalf
|
|
376
|
+
# Or install globally for shorter commands
|
|
377
|
+
npm install -g @morphist/aspects
|
|
378
|
+
```
|
|
266
379
|
|
|
267
|
-
|
|
268
|
-
bun run dev search wizard
|
|
380
|
+
After global installation, run commands directly without npx:
|
|
269
381
|
|
|
270
|
-
|
|
271
|
-
|
|
382
|
+
```bash
|
|
383
|
+
aspects add alaric
|
|
384
|
+
aspects search wizard
|
|
385
|
+
aspects list
|
|
272
386
|
```
|
|
273
387
|
|
|
274
388
|
### Commands
|
|
275
389
|
|
|
276
|
-
| Command | Description
|
|
277
|
-
|
|
278
|
-
| `create` | Interactive aspect
|
|
279
|
-
| `add` | Install aspects
|
|
280
|
-
| `list` | List installed aspects
|
|
281
|
-
| `search` | Search registry
|
|
282
|
-
| `info` | Show aspect details
|
|
283
|
-
| `remove` | Uninstall aspect
|
|
284
|
-
| `validate` | Validate aspect.json
|
|
285
|
-
| `publish` | Submit to registry
|
|
390
|
+
| Command | Aliases | Description |
|
|
391
|
+
| ---------- | ------- | ------------------------- |
|
|
392
|
+
| `create` | `c`, `new`, `n` | Interactive aspect generator |
|
|
393
|
+
| `add` | `install`, `i`, `a` | Install aspects |
|
|
394
|
+
| `list` | `ls` | List installed aspects |
|
|
395
|
+
| `search` | | Search registry |
|
|
396
|
+
| `info` | | Show aspect details |
|
|
397
|
+
| `remove` | `rm` | Uninstall aspect |
|
|
398
|
+
| `validate` | | Validate aspect.json |
|
|
399
|
+
| `publish` | | Submit to registry |
|
|
400
|
+
| `share` | | Share anonymously via hash |
|
|
401
|
+
| `login` | | Authenticate with registry |
|
|
402
|
+
| `logout` | | Sign out |
|
|
403
|
+
|
|
404
|
+
### Options
|
|
405
|
+
|
|
406
|
+
| Flag | Description |
|
|
407
|
+
|------|-------------|
|
|
408
|
+
| `-g, --global` | Use global scope (~/.aspects) |
|
|
409
|
+
| `--force` | Overwrite existing installation |
|
|
286
410
|
|
|
287
411
|
See [CLI Documentation](./docs/CLI.md) for full reference.
|
|
288
412
|
|
|
289
|
-
### Roadmap
|
|
290
|
-
|
|
291
|
-
Planned features:
|
|
292
|
-
|
|
293
|
-
- **`find`** — Advanced search with boolean operators (`-n wizard --not -t evil`)
|
|
294
|
-
- **`edit`** — Edit existing aspects with prepopulated wizard
|
|
295
|
-
- **`set`** — Manage collections of aspects
|
|
296
|
-
- **`generate`** — AI-powered aspect creation
|
|
297
|
-
|
|
298
|
-
See [CLI Roadmap](./docs/CLI-ROADMAP.md) for details.
|
|
299
|
-
|
|
300
413
|
## Development
|
|
301
414
|
|
|
302
415
|
```bash
|
|
@@ -315,10 +428,22 @@ bun run scan
|
|
|
315
428
|
|
|
316
429
|
## Links
|
|
317
430
|
|
|
318
|
-
- **Website:** [
|
|
319
|
-
- **
|
|
431
|
+
- **Website:** [aspects.sh](https://aspects.sh)
|
|
432
|
+
- **Documentation:** [aspects.sh/docs](https://aspects.sh/docs)
|
|
433
|
+
- **Source Code:** [github.com/aimorphist/aspects](https://github.com/aimorphist/aspects)
|
|
320
434
|
- **Morphist App:** [morphist.ai](https://morphist.ai)
|
|
321
435
|
|
|
322
436
|
## License
|
|
323
437
|
|
|
324
|
-
MIT © [Aspects](https://
|
|
438
|
+
MIT © [Aspects](https://aspects.sh)
|
|
439
|
+
|
|
440
|
+
---
|
|
441
|
+
|
|
442
|
+
## Morphist App
|
|
443
|
+
|
|
444
|
+
Browse and install aspects directly in the [Morphist app](https://morphist.ai):
|
|
445
|
+
|
|
446
|
+
1. Open the **Aspects** tab in settings
|
|
447
|
+
2. Browse community aspects
|
|
448
|
+
3. Tap **Install** on any aspect you like
|
|
449
|
+
4. Switch between aspects anytime
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createRequire } from "node:module";
|
|
3
|
+
var __create = Object.create;
|
|
4
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
5
|
+
var __defProp = Object.defineProperty;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __toESM = (mod, isNodeMode, target) => {
|
|
9
|
+
target = mod != null ? __create(__getProtoOf(mod)) : {};
|
|
10
|
+
const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
11
|
+
for (let key of __getOwnPropNames(mod))
|
|
12
|
+
if (!__hasOwnProp.call(to, key))
|
|
13
|
+
__defProp(to, key, {
|
|
14
|
+
get: () => mod[key],
|
|
15
|
+
enumerable: true
|
|
16
|
+
});
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
20
|
+
var __export = (target, all) => {
|
|
21
|
+
for (var name in all)
|
|
22
|
+
__defProp(target, name, {
|
|
23
|
+
get: all[name],
|
|
24
|
+
enumerable: true,
|
|
25
|
+
configurable: true,
|
|
26
|
+
set: (newValue) => all[name] = () => newValue
|
|
27
|
+
});
|
|
28
|
+
};
|
|
29
|
+
var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
30
|
+
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
31
|
+
|
|
32
|
+
// scripts/lib/output.ts
|
|
33
|
+
var rgb = (r, g, b) => (text) => `\x1B[38;2;${r};${g};${b}m${text}\x1B[0m`;
|
|
34
|
+
var colors = {
|
|
35
|
+
cyan: rgb(3, 138, 213),
|
|
36
|
+
teal: rgb(80, 163, 171),
|
|
37
|
+
orange: rgb(246, 114, 58),
|
|
38
|
+
red: rgb(196, 59, 57),
|
|
39
|
+
dim: (text) => `\x1B[2m${text}\x1B[0m`,
|
|
40
|
+
bold: (text) => `\x1B[1m${text}\x1B[0m`,
|
|
41
|
+
green: rgb(34, 197, 94),
|
|
42
|
+
yellow: rgb(234, 179, 8),
|
|
43
|
+
white: rgb(255, 255, 255)
|
|
44
|
+
};
|
|
45
|
+
var icons = {
|
|
46
|
+
pass: colors.green("✓"),
|
|
47
|
+
fail: colors.red("✗"),
|
|
48
|
+
warn: colors.orange("!"),
|
|
49
|
+
file: colors.cyan("◆"),
|
|
50
|
+
arrow: colors.dim("→"),
|
|
51
|
+
dot: colors.teal("●")
|
|
52
|
+
};
|
|
53
|
+
var LINE_COLORS = [colors.cyan, colors.teal, colors.orange, colors.red];
|
|
54
|
+
function morphistBanner() {
|
|
55
|
+
const lines = [
|
|
56
|
+
" █████╗ ███████╗██████╗ ███████╗ ██████╗████████╗███████╗",
|
|
57
|
+
" ██╔══██╗██╔════╝██╔══██╗██╔════╝██╔════╝╚══██╔══╝██╔════╝",
|
|
58
|
+
" ███████║███████╗██████╔╝█████╗ ██║ ██║ ███████╗",
|
|
59
|
+
" ██╔══██║╚════██║██╔═══╝ ██╔══╝ ██║ ██║ ╚════██║",
|
|
60
|
+
" ██║ ██║███████║██║ ███████╗╚██████╗ ██║ ███████║",
|
|
61
|
+
" ╚═╝ ╚═╝╚══════╝╚═╝ ╚══════╝ ╚═════╝ ╚═╝ ╚══════╝"
|
|
62
|
+
];
|
|
63
|
+
console.log();
|
|
64
|
+
console.log(colors.cyan(lines[0]));
|
|
65
|
+
console.log(colors.teal(lines[1]));
|
|
66
|
+
console.log(colors.teal(lines[2]));
|
|
67
|
+
console.log(colors.orange(lines[3]));
|
|
68
|
+
console.log(colors.red(lines[4]));
|
|
69
|
+
console.log(colors.red(lines[5]));
|
|
70
|
+
console.log();
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
// scripts/postinstall.ts
|
|
74
|
+
morphistBanner();
|
|
75
|
+
console.log(colors.bold(" Quick Start"));
|
|
76
|
+
console.log();
|
|
77
|
+
console.log(colors.dim(" # Install an aspect"));
|
|
78
|
+
console.log(" npx @morphist/aspects add alaric");
|
|
79
|
+
console.log();
|
|
80
|
+
console.log(colors.dim(" # Search the registry"));
|
|
81
|
+
console.log(" npx @morphist/aspects search meditation");
|
|
82
|
+
console.log();
|
|
83
|
+
console.log(colors.dim(" # Create your own aspect"));
|
|
84
|
+
console.log(" npx @morphist/aspects create");
|
|
85
|
+
console.log();
|
|
86
|
+
console.log(colors.dim(" # List installed aspects"));
|
|
87
|
+
console.log(" npx @morphist/aspects list");
|
|
88
|
+
console.log();
|
|
89
|
+
console.log(colors.dim(" Docs: https://github.com/aimorphist/aspects"));
|
|
90
|
+
console.log();
|