Project Command
The project
command helps you manage ElizaOS projects, including their plugins and configurations.
Usage
npx @elizaos/cli project <action> [options]
Actions
Action | Description |
---|---|
list-plugins | List available plugins to install into the project |
add-plugin | Add a plugin to the project |
remove-plugin | Remove a plugin from the project |
Managing Plugins
Listing Available Plugins
View all plugins that are available to install:
npx @elizaos/cli project list-plugins
You can filter the results by type:
npx @elizaos/cli project list-plugins --type adapter
Options for list-plugins
Option | Description |
---|---|
-t, --type <type> | Filter by type (adapter, client, plugin) |
Adding Plugins
Add a plugin to your project:
npx @elizaos/cli project add-plugin @elizaos/plugin-discord
This will:
- Find the plugin in the registry
- Install the plugin into your project
- Add it to your project's dependencies
Options for add-plugin
Option | Description |
---|---|
--no-env-prompt | Skip prompting for environment variables |
Removing Plugins
Remove a plugin from your project:
npx @elizaos/cli project remove-plugin @elizaos/plugin-discord
This will:
- Uninstall the plugin from your project
- Remove it from your project's dependencies
Examples
Discovering and installing plugins
# List all available plugins
npx @elizaos/cli project list-plugins
# Install a specific plugin
npx @elizaos/cli project add-plugin @elizaos/plugin-telegram
Managing multiple plugins
# Add multiple plugins
npx @elizaos/cli project add-plugin @elizaos/plugin-discord
npx @elizaos/cli project add-plugin @elizaos/plugin-pdf
# Remove a plugin you no longer need
npx @elizaos/cli project remove-plugin @elizaos/plugin-pdf
Plugin Configuration
After adding a plugin, you'll need to configure it in your project's code:
// In your src/index.ts file
import { createProject } from '@elizaos/core';
import { discordPlugin } from '@elizaos/plugin-discord';
const project = createProject({
name: 'my-project',
plugins: [
discordPlugin, // Use the imported plugin
],
// Plugin-specific configuration
discord: {
token: process.env.DISCORD_BOT_TOKEN,
guildId: process.env.DISCORD_GUILD_ID,
},
});
export default project;
Troubleshooting
Plugin Not Found
If a plugin can't be found in the registry:
Plugin @elizaos/plugin-name not found in registry
Check for:
- Typos in the plugin name
- Network connectivity issues
- Registry availability
Installation Problems
If a plugin fails to install:
- Check that you have the necessary permissions
- Ensure you have a stable internet connection
- Check for compatibility issues with your project