@daydreamsai/create-agent
v0.3.22
Published
CLI to bootstrap Daydreams agents
Readme
@daydreamsai/create-agent
A CLI tool to bootstrap Daydreams agents easily.
Usage
# Using npx (recommended)
npx @daydreamsai/create-agent my-agent
# Or install globally
npm install -g @daydreamsai/create-agent
create-agent my-agentOptions
You can specify extensions to include:
npx @daydreamsai/create-agent my-agent --twitter --discord --cliAvailable extensions:
--cli: Include CLI extension--twitter: Include Twitter extension--discord: Include Discord extension--telegram: Include Telegram extension--all: Include all extensions
If no extensions are specified, you will be prompted to select which ones to include.
What it does
This tool:
- Creates a new directory for your agent (or uses the current directory)
- Sets up a package.json with the necessary dependencies
- Creates an index.js file with the selected extensions
- Generates a basic .env.example file with required environment variables
- Installs all dependencies
Development
# Install dependencies
pnpm install
# Build the package
pnpm run build
# Test the CLI locally
pnpm run startTesting
The create-agent CLI is tested using Vitest. To run tests:
# Run all tests
pnpm run test
# Run tests in watch mode during development
pnpm run test:watch
# Run tests with coverage report
pnpm run test:coverageTest Structure
test/index.test.ts: Main CLI integration teststest/utils/utils.test.ts: Unit tests for utility functionstest/template-generation.test.ts: Tests for template generation functionality
Adding New Tests
When adding new features to the CLI, make sure to:
- Extract pure functions to the
src/utils.tsfile where possible - Add unit tests for those functions in
test/utils/utils.test.ts - Add integration tests for CLI behavior in
test/index.test.ts
