@openagentmarket/create-agent 1.0.0 → 1.0.1
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 +33 -0
- package/dist/index.js +44 -0
- package/package.json +1 -1
- package/src/index.ts +45 -0
package/README.md
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# @openagentmarket/create-agent
|
|
2
|
+
|
|
3
|
+
The quickest way to start building an OpenAgent. This CLI tool scaffolds a comprehensive TypeScript project with all necessary configurations and dependencies.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
Run the following command to create a new agent:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm create @openagentmarket/agent@latest
|
|
11
|
+
# or
|
|
12
|
+
npx @openagentmarket/create-agent@latest
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Follow the interactive prompts to name your agent.
|
|
16
|
+
|
|
17
|
+
## What is included?
|
|
18
|
+
|
|
19
|
+
The scaffolded project includes:
|
|
20
|
+
- **TypeScript** configuration for modern Node.js development.
|
|
21
|
+
- **ESLint & Prettier** setup (implied standards).
|
|
22
|
+
- **@openagentmarket/nodejs** SDK integration.
|
|
23
|
+
- **Example Agent** code (`index.ts`) demonstrating the basic structure.
|
|
24
|
+
- **Environment Configuration** (`.env`) template.
|
|
25
|
+
|
|
26
|
+
## Getting Started with your new Agent
|
|
27
|
+
|
|
28
|
+
Once created:
|
|
29
|
+
|
|
30
|
+
1. Navigate to your project directory: `cd <your-agent-name>`
|
|
31
|
+
2. Install dependencies: `pnpm install` (or `npm install`)
|
|
32
|
+
3. Configure your `.env` file with a valid mnemonic.
|
|
33
|
+
4. Start dev mode: `pnpm dev`
|
package/dist/index.js
CHANGED
|
@@ -101,6 +101,50 @@ async function main() {
|
|
|
101
101
|
main().catch(console.error);
|
|
102
102
|
`;
|
|
103
103
|
fs.writeFileSync(path.join(targetDir, 'index.ts'), indexTs);
|
|
104
|
+
// 5. README.md
|
|
105
|
+
const readme = `# ${projectName}
|
|
106
|
+
|
|
107
|
+
## Getting Started
|
|
108
|
+
|
|
109
|
+
This project was scaffolded with \`@openagentmarket/create-agent\`.
|
|
110
|
+
|
|
111
|
+
### Prerequisites
|
|
112
|
+
|
|
113
|
+
- Node.js (v18 or higher)
|
|
114
|
+
- pnpm (recommended) or npm
|
|
115
|
+
|
|
116
|
+
### Installation
|
|
117
|
+
|
|
118
|
+
\`\`\`bash
|
|
119
|
+
pnpm install
|
|
120
|
+
\`\`\`
|
|
121
|
+
|
|
122
|
+
### Configuration
|
|
123
|
+
|
|
124
|
+
1. Copy the example environment file:
|
|
125
|
+
\`\`\`bash
|
|
126
|
+
cp .env.example .env
|
|
127
|
+
\`\`\`
|
|
128
|
+
2. Edit \`.env\` and add your 12-word mnemonic phrase.
|
|
129
|
+
|
|
130
|
+
### Running the Agent
|
|
131
|
+
|
|
132
|
+
\`\`\`bash
|
|
133
|
+
# Development mode with hot-reload
|
|
134
|
+
pnpm dev
|
|
135
|
+
|
|
136
|
+
# Production build
|
|
137
|
+
pnpm build
|
|
138
|
+
pnpm start
|
|
139
|
+
\`\`\`
|
|
140
|
+
|
|
141
|
+
## Agent Details
|
|
142
|
+
|
|
143
|
+
- **Name**: ${projectName}
|
|
144
|
+
- **Framework**: @openagentmarket/nodejs
|
|
145
|
+
- **Network**: Base (Coinbase L2)
|
|
146
|
+
`;
|
|
147
|
+
fs.writeFileSync(path.join(targetDir, 'README.md'), readme);
|
|
104
148
|
console.log(kleur.green('Success! Project created.'));
|
|
105
149
|
console.log('\nNext steps:');
|
|
106
150
|
console.log(` cd ${projectName}`);
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -113,6 +113,51 @@ main().catch(console.error);
|
|
|
113
113
|
`;
|
|
114
114
|
fs.writeFileSync(path.join(targetDir, 'index.ts'), indexTs);
|
|
115
115
|
|
|
116
|
+
// 5. README.md
|
|
117
|
+
const readme = `# ${projectName}
|
|
118
|
+
|
|
119
|
+
## Getting Started
|
|
120
|
+
|
|
121
|
+
This project was scaffolded with \`@openagentmarket/create-agent\`.
|
|
122
|
+
|
|
123
|
+
### Prerequisites
|
|
124
|
+
|
|
125
|
+
- Node.js (v18 or higher)
|
|
126
|
+
- pnpm (recommended) or npm
|
|
127
|
+
|
|
128
|
+
### Installation
|
|
129
|
+
|
|
130
|
+
\`\`\`bash
|
|
131
|
+
pnpm install
|
|
132
|
+
\`\`\`
|
|
133
|
+
|
|
134
|
+
### Configuration
|
|
135
|
+
|
|
136
|
+
1. Copy the example environment file:
|
|
137
|
+
\`\`\`bash
|
|
138
|
+
cp .env.example .env
|
|
139
|
+
\`\`\`
|
|
140
|
+
2. Edit \`.env\` and add your 12-word mnemonic phrase.
|
|
141
|
+
|
|
142
|
+
### Running the Agent
|
|
143
|
+
|
|
144
|
+
\`\`\`bash
|
|
145
|
+
# Development mode with hot-reload
|
|
146
|
+
pnpm dev
|
|
147
|
+
|
|
148
|
+
# Production build
|
|
149
|
+
pnpm build
|
|
150
|
+
pnpm start
|
|
151
|
+
\`\`\`
|
|
152
|
+
|
|
153
|
+
## Agent Details
|
|
154
|
+
|
|
155
|
+
- **Name**: ${projectName}
|
|
156
|
+
- **Framework**: @openagentmarket/nodejs
|
|
157
|
+
- **Network**: Base (Coinbase L2)
|
|
158
|
+
`;
|
|
159
|
+
fs.writeFileSync(path.join(targetDir, 'README.md'), readme);
|
|
160
|
+
|
|
116
161
|
console.log(kleur.green('Success! Project created.'));
|
|
117
162
|
console.log('\nNext steps:');
|
|
118
163
|
console.log(` cd ${projectName}`);
|