@elizaos/cli 1.0.11 → 1.0.13

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.
Files changed (84) hide show
  1. package/README.md +93 -58
  2. package/dist/assets/{index-Cuyjmso1.js → index-D7iwnDvJ.js} +49286 -45738
  3. package/dist/assets/{index-Cuyjmso1.js.map → index-D7iwnDvJ.js.map} +1 -1
  4. package/dist/assets/index-Hst_nvMK.css +1 -0
  5. package/dist/assets/index-Hst_nvMK.css.br +0 -0
  6. package/dist/assets/{index-poChVCDJ.js → index-ojKLjt7K.js} +2 -2
  7. package/dist/assets/index-ojKLjt7K.js.br +0 -0
  8. package/dist/assets/{index-poChVCDJ.js.map → index-ojKLjt7K.js.map} +1 -1
  9. package/dist/assets/vendor-DSdxb8P-.js.map +1 -1
  10. package/dist/chunk-AQ6OMR2A.js +14 -0
  11. package/dist/{chunk-HBV76MGW.js → chunk-ELCESP3O.js} +242 -23
  12. package/dist/chunk-KB3JDWUI.js +106 -0
  13. package/dist/{chunk-TPLM6M7M.js → chunk-RTJ2B547.js} +31 -8
  14. package/dist/chunk-WP6OGNZE.js +5859 -0
  15. package/dist/commands/agent/actions/index.d.ts +2 -2
  16. package/dist/commands/agent/actions/index.js +3 -3
  17. package/dist/commands/agent/index.js +3 -3
  18. package/dist/commands/create/actions/index.d.ts +8 -4
  19. package/dist/commands/create/actions/index.js +6 -4
  20. package/dist/commands/create/index.js +5 -5
  21. package/dist/commands/shared/index.js +1 -1
  22. package/dist/index.html +2 -2
  23. package/dist/index.js +707 -7831
  24. package/dist/migrator-UQ4XFYE5.js +744 -0
  25. package/dist/{plugin-creator-T4K2673C.js → plugin-creator-TLQLTQIB.js} +8 -11
  26. package/dist/{registry-PTOPJQEB.js → registry-MJQMACYE.js} +3 -3
  27. package/dist/templates/plugin-starter/bunfig.toml +5 -1
  28. package/dist/templates/plugin-starter/package.json +6 -8
  29. package/dist/templates/plugin-starter/scripts/install-test-deps.js +50 -0
  30. package/dist/templates/plugin-starter/src/index.ts +2 -272
  31. package/dist/templates/plugin-starter/src/plugin.ts +274 -0
  32. package/dist/templates/project-starter/bunfig.toml +13 -1
  33. package/dist/templates/project-starter/package.json +14 -20
  34. package/dist/templates/project-starter/scripts/install-test-deps.js +51 -0
  35. package/dist/templates/project-starter/src/__tests__/config.test.ts +9 -9
  36. package/dist/templates/project-starter/src/__tests__/error-handling.test.ts +11 -11
  37. package/dist/templates/project-starter/src/__tests__/events.test.ts +6 -6
  38. package/dist/templates/project-starter/src/__tests__/integration.test.ts +11 -11
  39. package/dist/templates/project-starter/src/__tests__/routes.test.ts +2 -2
  40. package/dist/templates/project-starter/src/character.ts +134 -0
  41. package/dist/templates/project-starter/src/index.ts +3 -133
  42. package/dist/templates/project-starter/tsconfig.json +2 -2
  43. package/dist/templates/project-tee-starter/__tests__/env.test.ts +10 -6
  44. package/dist/templates/project-tee-starter/bunfig.toml +13 -1
  45. package/dist/templates/project-tee-starter/e2e/project.test.ts +1 -1
  46. package/dist/templates/project-tee-starter/e2e/starter-plugin.test.ts +1 -1
  47. package/dist/templates/project-tee-starter/package.json +3 -3
  48. package/dist/templates/project-tee-starter/src/index.ts +2 -15
  49. package/dist/{utils-TDE6Y3CB.js → utils-JWYJVLQ4.js} +15 -3
  50. package/package.json +28 -57
  51. package/templates/plugin-starter/bunfig.toml +5 -1
  52. package/templates/plugin-starter/package.json +6 -8
  53. package/templates/plugin-starter/scripts/install-test-deps.js +50 -0
  54. package/templates/plugin-starter/src/index.ts +2 -272
  55. package/templates/plugin-starter/src/plugin.ts +274 -0
  56. package/templates/project-starter/bunfig.toml +13 -1
  57. package/templates/project-starter/package.json +14 -20
  58. package/templates/project-starter/scripts/install-test-deps.js +51 -0
  59. package/templates/project-starter/src/__tests__/config.test.ts +9 -9
  60. package/templates/project-starter/src/__tests__/error-handling.test.ts +11 -11
  61. package/templates/project-starter/src/__tests__/events.test.ts +6 -6
  62. package/templates/project-starter/src/__tests__/integration.test.ts +11 -11
  63. package/templates/project-starter/src/__tests__/routes.test.ts +2 -2
  64. package/templates/project-starter/src/character.ts +134 -0
  65. package/templates/project-starter/src/index.ts +3 -133
  66. package/templates/project-starter/tsconfig.json +2 -2
  67. package/templates/project-tee-starter/__tests__/env.test.ts +10 -6
  68. package/templates/project-tee-starter/bunfig.toml +13 -1
  69. package/templates/project-tee-starter/e2e/project.test.ts +1 -1
  70. package/templates/project-tee-starter/e2e/starter-plugin.test.ts +1 -1
  71. package/templates/project-tee-starter/package.json +3 -3
  72. package/templates/project-tee-starter/src/index.ts +2 -15
  73. package/dist/assets/index-Df1AFSuJ.css +0 -1
  74. package/dist/assets/index-Df1AFSuJ.css.br +0 -0
  75. package/dist/assets/index-poChVCDJ.js.br +0 -0
  76. package/dist/chunk-2GXSCVA2.js +0 -2057
  77. package/dist/chunk-567UPUC7.js +0 -52
  78. package/dist/chunk-LQ6XHF53.js +0 -19487
  79. package/dist/chunk-QLKBXRME.js +0 -11101
  80. package/dist/chunk-WS4DWCDZ.js +0 -892
  81. package/dist/fileFromPath-KB6XMTJ4.js +0 -133
  82. package/dist/migrator-JREQPDN3.js +0 -7523
  83. package/dist/pglite.data +0 -0
  84. package/dist/pglite.wasm +0 -0
package/README.md CHANGED
@@ -79,7 +79,7 @@ Start the project or plugin in development mode with auto-rebuild, detailed logg
79
79
 
80
80
  - **Options:**
81
81
  - `-c, --configure`: Reconfigure services and AI models (skips using saved configuration)
82
- - `-char, --character [paths...]`: Character file(s) to use - accepts paths or URLs
82
+ - `--character [paths...]`: Character file(s) to use - accepts paths or URLs
83
83
  - `-b, --build`: Build the project before starting
84
84
  - `-p, --port <port>`: Port to listen on
85
85
 
@@ -139,22 +139,51 @@ Clone ElizaOS monorepo from a specific branch (defaults to develop).
139
139
 
140
140
  #### `elizaos plugins <subcommand>`
141
141
 
142
- Manage an ElizaOS plugin.
142
+ Manage ElizaOS plugins through character configurations.
143
+
144
+ **Important:** ElizaOS uses a character-centric plugin architecture. Plugins are specified in character files, not installed at the project level. This allows each character to have its own set of capabilities.
143
145
 
144
146
  - **Subcommands:**
145
- - `list` (alias: `l`): List available plugins (shows v1.x plugins by default)
146
- - `add <plugin>` (alias: `install`): Add a plugin to the project
147
+ - `list` (alias: `l`): List available plugins in the registry
148
+ - `add <plugin>` (alias: `install`): Add a plugin to character file(s)
147
149
  - Arguments: `<plugin>` (plugin name)
148
- - Options: `-n, --no-env-prompt`, `-b, --branch <branchName>`, `-T, --tag <tagname>`
150
+ - Options: `-c, --character <paths...>` (required), `-n, --no-env-prompt`
149
151
  - `update` (alias: `refresh`): Fetch the latest plugin registry and update local cache
150
- - `installed-plugins`: List plugins found in the project dependencies
151
- - `remove <plugin>` (alias: `delete`): Remove a plugin from the project
152
+ - `installed-plugins`: List plugins found in character files
153
+ - Options: `-c, --character <paths...>` (required)
154
+ - `remove <plugin>` (alias: `delete`): Remove a plugin from character file(s)
152
155
  - Arguments: `<plugin>` (plugin name)
156
+ - Options: `-c, --character <paths...>` (required)
153
157
  - `upgrade <path>`: Upgrade a plugin from v0.x to v1.x using AI
154
158
  - Arguments: `<path>` (GitHub URL or local path)
155
159
  - Options: `--api-key <key>`, `--skip-tests`, `--skip-validation`
156
160
  - See [Plugin Upgrade Documentation](./docs/PLUGIN_UPGRADE.md) for details
157
161
 
162
+ **Character File Example:**
163
+
164
+ ```json
165
+ {
166
+ "name": "MyAssistant",
167
+ "plugins": ["@elizaos/plugin-openai", "@elizaos/plugin-discord", "./path/to/local/plugin"],
168
+ "settings": {
169
+ // Character-specific settings
170
+ }
171
+ }
172
+ ```
173
+
174
+ **Plugin Management Examples:**
175
+
176
+ ```bash
177
+ # Add a plugin to a character
178
+ elizaos plugins add openai --character assistant.json
179
+
180
+ # Remove a plugin from multiple characters
181
+ elizaos plugins remove discord --character bot1.json bot2.json
182
+
183
+ # List plugins in character files
184
+ elizaos plugins installed-plugins --character assistant.json
185
+ ```
186
+
158
187
  ### Agent Management
159
188
 
160
189
  #### `elizaos agent <subcommand>`
@@ -169,38 +198,51 @@ Manage ElizaOS agents.
169
198
  - `-p, --port <port>`: Port to listen on
170
199
  - `get` (alias: `g`): Get agent details
171
200
  - Options:
172
- - `-n, --name <name>`: Agent id, name, or index number from list
201
+ - `-c, --character <paths...>`: Character name(s), file path(s), or URL(s) (supports multiple)
173
202
  - `-j, --json`: Display JSON output in terminal
174
203
  - `-o, --output <file>`: Save agent data to file
175
204
  - `-r, --remote-url <url>`: URL of the remote agent runtime
176
205
  - `-p, --port <port>`: Port to listen on
177
- - `start` (alias: `s`): Start an agent
206
+ - `start` (alias: `s`): Start agent(s)
178
207
  - Options:
179
- - `-n, --name <name>`: Name of an existing agent to start
180
- - `--path <path>`: Local path to character JSON file
181
- - `--remote-character <url>`: URL to remote character JSON file
208
+ - `-c, --character <paths...>`: Character name(s), file path(s), or URL(s) (supports multiple)
182
209
  - `-r, --remote-url <url>`: URL of the remote agent runtime
183
210
  - `-p, --port <port>`: Port to listen on
184
- - `stop` (alias: `st`): Stop an agent
211
+ - `stop` (alias: `st`): Stop agent(s)
185
212
  - Options:
186
- - `-n, --name <name>`: Agent id, name, or index number from list
213
+ - `-c, --character <paths...>`: Character name(s), file path(s), or URL(s) (supports multiple)
187
214
  - `--all`: Stop all running ElizaOS agents locally
188
215
  - `-r, --remote-url <url>`: URL of the remote agent runtime
189
216
  - `-p, --port <port>`: Port to listen on
190
- - `remove` (alias: `rm`): Remove an agent
217
+ - `remove` (alias: `rm`): Remove agent(s)
218
+ - Options:
219
+ - `-c, --character <paths...>`: Character name(s), file path(s), or URL(s) (supports multiple)
220
+ - `-r, --remote-url <url>`: URL of the remote agent runtime
221
+ - `-p, --port <port>`: Port to listen on
222
+ - `set`: Update agent configuration (single agent only)
191
223
  - Options:
192
- - `-n, --name <name>`: Agent id, name, or index number from list
224
+ - `-c, --character <path>`: Character name, file path, or URL (single character only)
225
+ - `--config <json>`: Agent configuration as JSON string
226
+ - `--file <path>`: Path to agent configuration JSON file
193
227
  - `-r, --remote-url <url>`: URL of the remote agent runtime
194
228
  - `-p, --port <port>`: Port to listen on
195
- - `set`: Update agent configuration
229
+ - `clear-memories`: Clear agent memories
196
230
  - Options:
197
- - `-n, --name <name>`: Agent id, name, or index number from list
198
- - `-c, --config <json>`: Agent configuration as JSON string
199
- - `-f, --file <path>`: Path to agent configuration JSON file
231
+ - `-c, --character <paths...>`: Character name(s), file path(s), or URL(s) (supports multiple)
200
232
  - `-r, --remote-url <url>`: URL of the remote agent runtime
201
233
  - `-p, --port <port>`: Port to listen on
202
234
 
203
- **Note:** All agent commands support interactive mode when run without key parameters.
235
+ **Character Specification:**
236
+
237
+ - **Multiple formats supported**: Space-separated, comma-separated, or mixed
238
+ - **Auto-extension**: `.json` extension added automatically if missing
239
+ - **Path resolution**: Supports local files, URLs, and character names
240
+ - **Examples**:
241
+ - `elizaos agent start -c bobby,billy` (comma-separated)
242
+ - `elizaos agent start -c bobby billy` (space-separated)
243
+ - `elizaos agent get -c ./characters/bobby.json https://example.com/billy.json`
244
+
245
+ **Note:** All agent commands support interactive mode when run without required parameters. Most commands support multiple characters except `set` which only accepts a single character.
204
246
 
205
247
  ### Publishing
206
248
 
@@ -211,7 +253,7 @@ Publish a plugin to the registry.
211
253
  - **Options:**
212
254
  - `-t, --test`: Test publish process without making changes
213
255
  - `--npm`: Publish to npm instead of GitHub
214
- - `-sr, --skip-registry`: Skip publishing to the registry
256
+ - `--skip-registry`: Skip publishing to the registry
215
257
  - `-d, --dry-run`: Generate registry files locally without publishing
216
258
 
217
259
  **Default behavior:**
@@ -243,7 +285,7 @@ Start the Eliza agent with configurable plugins and services.
243
285
 
244
286
  - **Options:**
245
287
  - `-c, --configure`: Force reconfiguration of services and AI models (bypasses saved configuration)
246
- - `-char, --character [paths...]`: Character file(s) to use - accepts paths or URLs
288
+ - `--character [paths...]`: Character file(s) to use - accepts paths or URLs
247
289
  - `-b, --build`: Build the project before starting
248
290
  - `-p, --port <port>`: Port to listen on (default: 3000)
249
291
 
@@ -274,6 +316,10 @@ If any character files fail to load, ElizaOS will:
274
316
  - Continue starting with any successfully loaded characters
275
317
  - Fall back to the default Eliza character if no characters loaded successfully
276
318
 
319
+ **Plugin Loading:**
320
+
321
+ Plugins are loaded from each character's `plugins` array. The runtime automatically installs any missing plugins when starting.
322
+
277
323
  ### Testing
278
324
 
279
325
  #### `elizaos test`
@@ -505,7 +551,7 @@ Update ElizaOS CLI and project dependencies to the latest versions.
505
551
 
506
552
  - **Options:**
507
553
  - `-c, --check`: Check for available updates without applying them - shows what packages would be updated
508
- - `-sb, --skip-build`: Skip building after updating
554
+ - `--skip-build`: Skip building after updating
509
555
  - `--cli`: Update only the global CLI installation (without updating packages)
510
556
  - `--packages`: Update only packages (without updating the CLI)
511
557
 
@@ -639,16 +685,14 @@ Plugins extend the functionality of ElizaOS agents by providing additional capab
639
685
  5. **Test your plugin**:
640
686
 
641
687
  ```bash
642
- # Run tests during development
643
- elizaos test
644
- # Or with the CLI directly:
645
- elizaos test
688
+ # Add to a character file for testing
689
+ elizaos plugins add ./plugin-my-plugin --character test-character.json
646
690
 
647
- # Test specific components
648
- elizaos test component
691
+ # Run development mode
692
+ elizaos dev --character test-character.json
649
693
 
650
- # Test end-to-end functionality
651
- elizaos test e2e
694
+ # Run tests
695
+ elizaos test
652
696
  ```
653
697
 
654
698
  6. **Publish your plugin**:
@@ -671,7 +715,7 @@ Plugins extend the functionality of ElizaOS agents by providing additional capab
671
715
 
672
716
  ```bash
673
717
  # Make changes to your plugin
674
- elizaos dev # Test locally
718
+ elizaos dev --character test-character.json # Test locally
675
719
 
676
720
  # Test your changes
677
721
  elizaos test
@@ -709,45 +753,36 @@ Projects contain agent configurations and code for building agent-based applicat
709
753
 
710
754
  3. **Configure your agent**:
711
755
 
712
- The main character definition is in src/index.ts:
756
+ Create or edit a character file (e.g., character.json):
713
757
 
714
- ```typescript
715
- import { type Character } from '@elizaos/core';
716
-
717
- export const character: Character = {
718
- name: 'My Assistant',
719
- plugins: [
720
- '@elizaos/plugin-openai',
721
- // Add other plugins here
722
- ],
723
- system: 'You are a helpful assistant...',
724
- bio: [
725
- 'Helpful and knowledgeable',
726
- 'Communicates clearly and concisely',
727
- // Other character traits
728
- ],
729
- messageExamples: [
758
+ ```json
759
+ {
760
+ "name": "My Assistant",
761
+ "plugins": ["@elizaos/plugin-openai", "./path/to/local/plugin"],
762
+ "system": "You are a helpful assistant...",
763
+ "bio": ["Helpful and knowledgeable", "Communicates clearly and concisely"],
764
+ "messageExamples": [
730
765
  // Example conversations
731
- ],
732
- };
766
+ ]
767
+ }
733
768
  ```
734
769
 
735
- 4. **Add plugins to your project**:
770
+ 4. **Add plugins to your character**:
736
771
 
737
772
  ```bash
738
- elizaos plugins add @elizaos/plugin-openai
773
+ elizaos plugins add @elizaos/plugin-openai --character character.json
739
774
  ```
740
775
 
741
776
  5. **Run your project in development mode**:
742
777
 
743
778
  ```bash
744
- elizaos dev
779
+ elizaos dev --character character.json
745
780
  ```
746
781
 
747
782
  6. **Build and start your project**:
748
783
 
749
784
  ```bash
750
- elizaos start
785
+ elizaos start --character character.json
751
786
  ```
752
787
 
753
788
  7. **Test your project**:
@@ -770,13 +805,13 @@ Projects contain agent configurations and code for building agent-based applicat
770
805
 
771
806
  ```bash
772
807
  # Make changes to your project
773
- elizaos dev # Development mode with hot-reload
808
+ elizaos dev --character character.json # Development mode with hot-reload
774
809
 
775
810
  # Test your changes
776
811
  elizaos test
777
812
 
778
813
  # Build and start in production mode
779
- elizaos start
814
+ elizaos start --character character.json
780
815
  ```
781
816
 
782
817
  ## Contributing