### Create and Start ElizaOS Plugin Development Source: https://github.com/elizaos-plugins/plugin-auton8n/blob/main/src/resources/templates/plugin-starter/README.md Commands to create a new ElizaOS plugin using a template, navigate into its directory, and start the development server with hot-reloading. ```bash # Create a new plugin (automatically adds "plugin-" prefix) elizaos create -t plugin solana # This creates: plugin-solana # Dependencies are automatically installed and built # Navigate to the plugin directory cd plugin-solana # Start development immediately elizaos dev ``` -------------------------------- ### NPM Authentication and GitHub Setup Source: https://github.com/elizaos-plugins/plugin-auton8n/blob/main/src/resources/templates/plugin-starter/README.md Commands for authenticating with NPM and setting up a GitHub repository for an ElizaOS plugin. ```bash # npm login npm login # Add 'elizaos-plugins' topic to your GitHub repository. # Use 'main' as the default branch. ``` -------------------------------- ### Vitest Unit and Integration Test Examples Source: https://github.com/elizaos-plugins/plugin-auton8n/blob/main/src/resources/templates/plugin-starter/README.md Example TypeScript code demonstrating how to write unit and integration tests for ElizaOS plugins using Vitest. ```typescript // Unit test example (__tests__/plugin.test.ts) describe('Plugin Configuration', () => { it('should have correct plugin metadata', () => { expect(starterPlugin.name).toBe('plugin-starter'); }); }); // Integration test example (__tests__/integration.test.ts) describe('Integration: HelloWorld Action with StarterService', () => { it('should handle HelloWorld action with StarterService', async () => { // Test interactions between components }); }); ``` -------------------------------- ### ElizaOS E2E Test Example Source: https://github.com/elizaos-plugins/plugin-auton8n/blob/main/src/resources/templates/plugin-starter/README.md Example TypeScript code for writing end-to-end tests for an ElizaOS plugin using the ElizaOS test interface. ```typescript // E2E test example (e2e/starter-plugin.test.ts) export class StarterPluginTestSuite implements TestSuite { name = 'plugin_starter_test_suite'; tests = [ { name: 'example_test', fn: async (runtime) => { // Test plugin in a real runtime }, }, ]; } export default new StarterPluginTestSuite(); ``` -------------------------------- ### Initial ElizaOS Plugin Publishing Source: https://github.com/elizaos-plugins/plugin-auton8n/blob/main/src/resources/templates/plugin-starter/README.md Commands to test plugin requirements before publishing and to perform the initial publish to npm, GitHub, and the ElizaOS registry. ```bash # Test your plugin meets all requirements elizaos publish --test # Publish to npm + GitHub + registry (recommended) elizaos publish ``` -------------------------------- ### Alternative Initial ElizaOS Plugin Publishing Options Source: https://github.com/elizaos-plugins/plugin-auton8n/blob/main/src/resources/templates/plugin-starter/README.md Commands for alternative initial publishing scenarios, such as publishing only to npm, skipping the registry, or performing a dry run. ```bash # Publish to npm only (skip GitHub and registry) elizaos publish --npm # Publish but skip registry submission elizaos publish --skip-registry # Generate registry files locally without publishing elizaos publish --dry-run ``` -------------------------------- ### ElizaOS Plugin Development Commands Source: https://github.com/elizaos-plugins/plugin-auton8n/blob/main/src/resources/templates/plugin-starter/README.md Commands for running an ElizaOS plugin during development, including options for hot-reloading and manual rebuilding. ```bash # Start development with hot-reloading (recommended) elizaos dev # OR start without hot-reloading elizaos start # Note: When using 'start', you need to rebuild after changes: # bun run build # Test the plugin elizaos test ``` -------------------------------- ### ElizaOS Plugin Testing Commands Source: https://github.com/elizaos-plugins/plugin-auton8n/blob/main/src/resources/templates/plugin-starter/README.md Commands for executing different types of tests for an ElizaOS plugin, including component, end-to-end, and all tests. ```bash # Run component tests elizaos test component # Run end-to-end tests elizaos test e2e # Running All Tests elizaos test elizaos test component # Component tests only elizaos test e2e # E2E tests only ``` -------------------------------- ### Standard Plugin Update Workflow Source: https://github.com/elizaos-plugins/plugin-auton8n/blob/main/src/resources/templates/plugin-starter/README.md Steps and commands for updating an ElizaOS plugin after the initial publish, using standard npm and git workflows. ```bash # 1. Make Changes elizaos dev # Test locally with hot-reload # 2. Test Your Changes elizaos test # 3. Update Version # Patch version (bug fixes): 1.0.0 → 1.0.1 npm version patch # Minor version (new features): 1.0.1 → 1.1.0 npm version minor # Major version (breaking changes): 1.1.0 → 2.0.0 npm version major # 4. Publish to npm npm publish # 5. Push to GitHub git push origin main git push --tags # Push version tags ``` -------------------------------- ### Install AutoN8n Plugin Source: https://github.com/elizaos-plugins/plugin-auton8n/blob/main/README.md Installs the AutoN8n plugin for ElizaOS using npm, yarn, or pnpm. This is the first step to enabling AI-driven plugin development within your ElizaOS agent. ```bash npm install @elizaos/plugin-auton8n yarn add @elizaos/plugin-auton8n pnpm add @elizaos/plugin-auton8n ``` -------------------------------- ### Development Setup: Clone AutoN8n Repository (Bash) Source: https://github.com/elizaos-plugins/plugin-auton8n/blob/main/README.md This bash script provides instructions for setting up the development environment by cloning the AutoN8n repository and navigating to the plugin-auton8n package directory. This is the initial step for contributing to the project. ```bash # Clone the repo git clone https://github.com/elizaos/elizaos.git cd packages/plugin-auton8n ``` -------------------------------- ### Configure Agent Parameters with JSON Source: https://github.com/elizaos-plugins/plugin-auton8n/blob/main/src/resources/templates/plugin-starter/README.md Defines the structure for plugin configuration within `package.json`. It specifies the plugin type and a list of parameters, including their type and description, such as an API key. This configuration is essential for the plugin to function correctly. ```json { "agentConfig": { "pluginType": "elizaos:plugin:1.0.0", "pluginParameters": { "API_KEY": { "type": "string", "description": "API key for the service" } } } } ``` -------------------------------- ### Monitor Plugin Creation Status in TypeScript Source: https://github.com/elizaos-plugins/plugin-auton8n/blob/main/README.md This snippet demonstrates how to monitor the progress of a plugin creation job. It shows an example response format indicating the status, phase, progress, and recent activities during the creation process. No specific dependencies are mentioned beyond the runtime environment. ```typescript // Example response Agent: 📊 Plugin Creation Status: ├─ Status: running ├─ Phase: testing (4/5) ├─ Progress: 80% └─ Recent activity: • ✅ Code generation complete • ✅ Build successful • ✅ Linting passed • 🔄 Running tests... (18/20 passed) ``` -------------------------------- ### Check Anthropic API Key for Code Generation Issues (Bash) Source: https://github.com/elizaos-plugins/plugin-auton8n/blob/main/README.md This bash command helps troubleshoot 'AI code generation not available' errors by checking the ANTHROPIC_API_KEY environment variable. It advises to ensure the key starts with 'sk-ant-api' and provides a link to obtain a key from the Anthropic console. ```bash # Check your API key echo $ANTHROPIC_API_KEY # Verify it starts with sk-ant-api # Get a key from https://console.anthropic.com ``` -------------------------------- ### Configure Claude Model for Plugin Generation (TypeScript) Source: https://github.com/elizaos-plugins/plugin-auton8n/blob/main/README.md This code demonstrates how to configure the Claude model used for plugin generation by setting the CLAUDE_MODEL environment variable. It shows examples for using 'claude-3-5-sonnet-20241022' for faster generation and 'claude-3-opus-20240229' for more complex plugins. Ensure the ANTHROPIC_API_KEY is set in your environment. ```typescript // Use Sonnet for faster generation process.env.CLAUDE_MODEL = 'claude-3-5-sonnet-20241022'; // Use Opus for more complex plugins process.env.CLAUDE_MODEL = 'claude-3-opus-20240229'; ``` -------------------------------- ### Create Plugin from Specification (TypeScript) Source: https://github.com/elizaos-plugins/plugin-auton8n/blob/main/README.md Demonstrates how to initiate plugin creation using a structured JSON specification via a TypeScript conversation with the ElizaOS agent. This method provides precise control over the plugin's name, description, and actions. ```typescript User: Create a plugin with this spec: { "name": "@elizaos/plugin-github", "description": "GitHub integration for repo management", "actions": [ { "name": "createIssue", "description": "Create a new GitHub issue", "parameters": { "repo": "string", "title": "string", "body": "string", "labels": "string[]" } }, { "name": "mergePR", "description": "Merge a pull request", "parameters": { "repo": "string", "prNumber": "number" } } ] } Agent: Creating your GitHub integration plugin now... ``` -------------------------------- ### Create Plugin from Description (Natural Language) Source: https://github.com/elizaos-plugins/plugin-auton8n/blob/main/README.md Illustrates how to trigger plugin creation using a natural language description of the desired functionality. The ElizaOS agent interprets the request and generates a plugin, providing status updates and details about the included features. ```text User: Create a weather plugin that can fetch current weather and forecasts for any city Agent: I'll create a comprehensive weather plugin for you. This will include actions for fetching current weather and forecasts, with proper error handling and caching. 🚀 Plugin creation started! 📋 Job ID: 7d4b3c2a-8e9f-4a1b-9c5d-1234567890ab ⏳ Status: Generating plugin code... The plugin will include: - getCurrentWeather action - getWeatherForecast action - weatherProvider for context - Caching service for API efficiency - OpenWeatherMap API integration Use "check plugin status" to monitor progress. ``` -------------------------------- ### Configure AutoN8n Plugin Source: https://github.com/elizaos-plugins/plugin-auton8n/blob/main/README.md Sets up the necessary configuration for the AutoN8n plugin by defining environment variables for the Anthropic API key and optionally specifying the plugin data directory and Claude model. This enables the plugin to communicate with Claude AI and manage generated plugin files. ```env # Required ANTHROPIC_API_KEY=sk-ant-api03-... # Optional PLUGIN_DATA_DIR=./plugin-workspace CLAUDE_MODEL=claude-3-5-sonnet-20241022 ``` -------------------------------- ### Enable Debug Mode for AutoN8n Plugin System (Environment Variables) Source: https://github.com/elizaos-plugins/plugin-auton8n/blob/main/README.md This shows how to enable debug logging for the AutoN8n plugin system. It can be configured either in the `.env` file or programmatically by setting the `DEBUG` environment variable to `elizaos:plugin-auton8n:*`. This is useful for troubleshooting. ```env # In your .env file DEBUG=elizaos:plugin-auton8n:* # Or programmatically process.env.DEBUG = 'elizaos:plugin-auton8n:*'; ``` -------------------------------- ### AutoN8n Plugin Action: createPluginFromDescription Source: https://github.com/elizaos-plugins/plugin-auton8n/blob/main/README.md This action utilizes natural language processing to create a new ElizaOS plugin from a user's descriptive request. It allows for more intuitive plugin generation without requiring a strict specification. ```typescript // Example usage User: Create a plugin that can translate text between languages ``` -------------------------------- ### AutoN8n Plugin Action: createPlugin Source: https://github.com/elizaos-plugins/plugin-auton8n/blob/main/README.md This action within the AutoN8n plugin is responsible for generating a new ElizaOS plugin based on a detailed specification provided in a structured format, typically JSON. ```typescript // Example usage in conversation User: Create a plugin with the specification: { ... } ``` -------------------------------- ### Define Custom Plugin Templates (TypeScript) Source: https://github.com/elizaos-plugins/plugin-auton8n/blob/main/README.md This snippet illustrates how to define custom templates for plugin generation in TypeScript. It shows a `customSpec` object that includes the plugin name and the path to the custom template. This allows for greater flexibility in plugin structure and generation. ```typescript const customSpec = { name: '@company/plugin-custom', template: 'path/to/custom-template', // ... other options }; ``` -------------------------------- ### Register AutoN8n Plugin in ElizaOS Agent Source: https://github.com/elizaos-plugins/plugin-auton8n/blob/main/README.md Registers the AutoN8n plugin dynamically within an ElizaOS agent configuration. This allows the agent to utilize the plugin's capabilities for creating new plugins. ```typescript import { pluginDynamic } from '@elizaos/plugin-auton8n'; const agent = new Agent({ name: "DevBot", plugins: [pluginDynamic], // ... other configuration }); ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.