create-adk-agent 0.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 +198 -0
- package/dist/generators/init/generator.js +87 -0
- package/dist/generators/init/generator.js.map +1 -0
- package/dist/generators/init/schema.d.js +3 -0
- package/dist/generators/init/schema.d.js.map +1 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/create-adk-agent.js +5 -0
- package/dist/lib/create-adk-agent.js.map +1 -0
- package/generators.json +10 -0
- package/package.json +73 -0
- package/src/generators/init/files/.env.example.template +16 -0
- package/src/generators/init/files/.eslintrc.json.template +20 -0
- package/src/generators/init/files/.gitignore.template +27 -0
- package/src/generators/init/files/.prettierrc.template +7 -0
- package/src/generators/init/files/README.md.template +242 -0
- package/src/generators/init/files/jest.config.ts.template +7 -0
- package/src/generators/init/files/package.json.template +39 -0
- package/src/generators/init/files/src/agents/basic/agent.ts.template +34 -0
- package/src/generators/init/files/src/agents/multi-tool/agent.ts.template +83 -0
- package/src/generators/init/files/src/agents/streaming/agent.ts.template +36 -0
- package/src/generators/init/files/src/agents/team/farewell-agent.ts.template +43 -0
- package/src/generators/init/files/src/agents/team/greeting-agent.ts.template +43 -0
- package/src/generators/init/files/src/agents/team/root-agent.ts.template +18 -0
- package/src/generators/init/files/src/agents/workflow/agent.ts.template +69 -0
- package/src/generators/init/files/src/index.ts.template +61 -0
- package/src/generators/init/files/tests/agents.test.ts.template +80 -0
- package/src/generators/init/files/tsconfig.json.template +20 -0
- package/src/generators/init/schema.json +124 -0
package/README.md
ADDED
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
# @adk-ts-new/create-adk-agent
|
|
2
|
+
|
|
3
|
+
> Nx generator for scaffolding ADK (Agent Development Kit) TypeScript projects with multiple templates, multi-model support, and modern tooling.
|
|
4
|
+
|
|
5
|
+
## ๐ Quick Start
|
|
6
|
+
|
|
7
|
+
### Using npx (Recommended)
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npx @adk-ts-new/create-adk-agent my-agent
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
### Using Nx workspace
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
nx g @adk-ts-new/create-adk-agent:init my-agent
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## โจ Features
|
|
20
|
+
|
|
21
|
+
- ๐ค **Multiple Agent Templates** - Choose from 5 different agent templates from official ADK docs
|
|
22
|
+
- ๐ **Multi-Model Support** - Works with Gemini, OpenAI, and Anthropic models
|
|
23
|
+
- โก **tsx Development** - Instant TypeScript execution with hot reload (no build step)
|
|
24
|
+
- ๐ **Security First** - Built-in `.env` management with clear security warnings
|
|
25
|
+
- ๐งช **Testing Ready** - Pre-configured Jest testing setup
|
|
26
|
+
- ๐ฆ **Modern Stack** - TypeScript, ESLint, Prettier, Zod validation
|
|
27
|
+
|
|
28
|
+
## ๐ Agent Templates
|
|
29
|
+
|
|
30
|
+
### Basic Agent
|
|
31
|
+
|
|
32
|
+
Simple agent with time tool - perfect for learning ADK basics.
|
|
33
|
+
|
|
34
|
+
### Multi-Tool Agent (Default)
|
|
35
|
+
|
|
36
|
+
Agent with multiple tools (time, weather, calculator) demonstrating tool composition.
|
|
37
|
+
|
|
38
|
+
### Team Agent
|
|
39
|
+
|
|
40
|
+
Multi-agent system with coordination, delegation, and sub-agents (greeting + farewell).
|
|
41
|
+
|
|
42
|
+
### Streaming Agent
|
|
43
|
+
|
|
44
|
+
Demonstrates real-time streaming responses using ADK Live API.
|
|
45
|
+
|
|
46
|
+
### Workflow Agent
|
|
47
|
+
|
|
48
|
+
Sequential workflow patterns with validation, transformation, and saving steps.
|
|
49
|
+
|
|
50
|
+
## ๐ฏ Usage
|
|
51
|
+
|
|
52
|
+
### Interactive Mode
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
npx @adk-ts-new/create-adk-agent my-agent
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
You'll be prompted for:
|
|
59
|
+
|
|
60
|
+
- Agent templates to include
|
|
61
|
+
- Model provider (Gemini/OpenAI/Anthropic)
|
|
62
|
+
- Whether to install dependencies
|
|
63
|
+
- Whether to initialize git
|
|
64
|
+
|
|
65
|
+
### Non-Interactive Mode
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
npx @adk-ts-new/create-adk-agent my-agent \
|
|
69
|
+
--templates=basic,multi-tool \
|
|
70
|
+
--modelProvider=gemini \
|
|
71
|
+
--model=gemini-3.0-flash \
|
|
72
|
+
--description="My custom agent" \
|
|
73
|
+
--directory=apps \
|
|
74
|
+
--installDependencies \
|
|
75
|
+
--no-interactive
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
### Options
|
|
79
|
+
|
|
80
|
+
| Option | Type | Description | Default |
|
|
81
|
+
| ----------------------- | --------------------------------- | -------------------------- | ---------------------- |
|
|
82
|
+
| `name` | string | Project name (required) | - |
|
|
83
|
+
| `--templates` | string[] | Agent templates to include | `['multi-tool']` |
|
|
84
|
+
| `--modelProvider` | gemini\|openai\|anthropic\|custom | LLM provider | `gemini` |
|
|
85
|
+
| `--model` | string | Specific model to use | Provider's first model |
|
|
86
|
+
| `--description` | string | Project description | `My ADK Agent` |
|
|
87
|
+
| `--directory` | string | Target directory | Same as name |
|
|
88
|
+
| `--installDependencies` | boolean | Run npm install | Prompt |
|
|
89
|
+
| `--initGit` | boolean | Initialize git repo | Prompt |
|
|
90
|
+
| `--no-interactive` | boolean | Skip prompts | `false` |
|
|
91
|
+
|
|
92
|
+
## ๐ค Supported Models
|
|
93
|
+
|
|
94
|
+
### Google Gemini (Direct)
|
|
95
|
+
|
|
96
|
+
- gemini-3.0-flash
|
|
97
|
+
- gemini-3.0-pro
|
|
98
|
+
- gemini-2.5-flash
|
|
99
|
+
- gemini-2.5-pro
|
|
100
|
+
|
|
101
|
+
### OpenAI (via LiteLLM)
|
|
102
|
+
|
|
103
|
+
- gpt-5
|
|
104
|
+
- gpt-5-mini
|
|
105
|
+
- gpt-4o
|
|
106
|
+
- gpt-4o-mini
|
|
107
|
+
|
|
108
|
+
### Anthropic (via LiteLLM)
|
|
109
|
+
|
|
110
|
+
- claude-4.5-sonnet
|
|
111
|
+
- claude-4-sonnet
|
|
112
|
+
- claude-4-opus
|
|
113
|
+
- claude-3-5-sonnet
|
|
114
|
+
|
|
115
|
+
**Note:** You can change to any model after project generation. The list above is for initial setup convenience.
|
|
116
|
+
|
|
117
|
+
## ๐ฆ Generated Project Structure
|
|
118
|
+
|
|
119
|
+
```
|
|
120
|
+
my-agent/
|
|
121
|
+
โโโ src/
|
|
122
|
+
โ โโโ agents/
|
|
123
|
+
โ โ โโโ basic/ # Basic agent (if selected)
|
|
124
|
+
โ โ โโโ multi-tool/ # Multi-tool agent (if selected)
|
|
125
|
+
โ โ โโโ team/ # Team agents (if selected)
|
|
126
|
+
โ โ โโโ streaming/ # Streaming agent (if selected)
|
|
127
|
+
โ โ โโโ workflow/ # Workflow agent (if selected)
|
|
128
|
+
โ โโโ index.ts # Entry point with env validation
|
|
129
|
+
โโโ tests/
|
|
130
|
+
โ โโโ agents.test.ts # Jest tests
|
|
131
|
+
โโโ .env.example # Environment template (commit this)
|
|
132
|
+
โโโ .env # Your API keys (DO NOT COMMIT)
|
|
133
|
+
โโโ .gitignore # Includes .env patterns
|
|
134
|
+
โโโ package.json # With tsx, ADK, and dev tools
|
|
135
|
+
โโโ tsconfig.json # Configured for ESM + NodeNext
|
|
136
|
+
โโโ README.md # Project-specific documentation
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
## ๐ Security
|
|
140
|
+
|
|
141
|
+
**โ ๏ธ Generated projects include:**
|
|
142
|
+
|
|
143
|
+
- `.env` in `.gitignore` by default
|
|
144
|
+
- API key validation on startup
|
|
145
|
+
- Clear warnings about committing secrets
|
|
146
|
+
- `.env.example` template for sharing
|
|
147
|
+
|
|
148
|
+
## ๐ ๏ธ Development Workflow
|
|
149
|
+
|
|
150
|
+
After generating your project:
|
|
151
|
+
|
|
152
|
+
```bash
|
|
153
|
+
cd my-agent
|
|
154
|
+
|
|
155
|
+
# 1. Set up your API key
|
|
156
|
+
cp .env.example .env
|
|
157
|
+
# Edit .env and add your API key
|
|
158
|
+
|
|
159
|
+
# 2. Install dependencies (if not done during generation)
|
|
160
|
+
npm install
|
|
161
|
+
|
|
162
|
+
# 3. Start development with hot reload
|
|
163
|
+
npm run dev
|
|
164
|
+
|
|
165
|
+
# 4. Run tests
|
|
166
|
+
npm test
|
|
167
|
+
|
|
168
|
+
# 5. Use ADK DevTools
|
|
169
|
+
npm run adk:web # Web UI
|
|
170
|
+
npm run adk:run # CLI runner
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
## ๐ Documentation
|
|
174
|
+
|
|
175
|
+
- [ADK Documentation](https://google.github.io/adk-docs/)
|
|
176
|
+
- [TypeScript Quick Start](https://google.github.io/adk-docs/get-started/typescript/)
|
|
177
|
+
- [Agent Tutorial](https://google.github.io/adk-docs/tutorial/agent/)
|
|
178
|
+
|
|
179
|
+
## ๐ค Contributing
|
|
180
|
+
|
|
181
|
+
Contributions welcome! This is an Nx workspace project.
|
|
182
|
+
|
|
183
|
+
### Development
|
|
184
|
+
|
|
185
|
+
```bash
|
|
186
|
+
# Build the generator
|
|
187
|
+
nx build create-adk-agent
|
|
188
|
+
|
|
189
|
+
# Test locally
|
|
190
|
+
nx g @adk-ts-new/create-adk-agent:init test-project
|
|
191
|
+
|
|
192
|
+
# Run tests
|
|
193
|
+
nx test create-adk-agent
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
## ๐ License
|
|
197
|
+
|
|
198
|
+
MIT ยฉ Maina Wycliffe
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { _ as _extends } from "@swc/helpers/_/_extends";
|
|
2
|
+
import { formatFiles, generateFiles, installPackagesTask, joinPathFragments, names } from '@nx/devkit';
|
|
3
|
+
import * as path from 'path';
|
|
4
|
+
// Model options based on provider
|
|
5
|
+
// Note: Users can change to any model in their generated project
|
|
6
|
+
// This list is just for initial selection during project creation
|
|
7
|
+
const MODEL_OPTIONS = {
|
|
8
|
+
gemini: [
|
|
9
|
+
'gemini-3.0-flash',
|
|
10
|
+
'gemini-3.0-pro',
|
|
11
|
+
'gemini-2.5-flash',
|
|
12
|
+
'gemini-2.5-pro'
|
|
13
|
+
],
|
|
14
|
+
openai: [
|
|
15
|
+
'gpt-5',
|
|
16
|
+
'gpt-5-mini',
|
|
17
|
+
'gpt-4o',
|
|
18
|
+
'gpt-4o-mini'
|
|
19
|
+
],
|
|
20
|
+
anthropic: [
|
|
21
|
+
'claude-4.5-sonnet',
|
|
22
|
+
'claude-4-sonnet',
|
|
23
|
+
'claude-4-opus',
|
|
24
|
+
'claude-3-5-sonnet'
|
|
25
|
+
],
|
|
26
|
+
custom: []
|
|
27
|
+
};
|
|
28
|
+
export async function initGenerator(tree, options) {
|
|
29
|
+
const projectRoot = options.directory ? joinPathFragments(options.directory, options.name) : options.name;
|
|
30
|
+
// Set default templates if none selected
|
|
31
|
+
if (!options.templates || options.templates.length === 0) {
|
|
32
|
+
options.templates = [
|
|
33
|
+
'multi-tool'
|
|
34
|
+
];
|
|
35
|
+
}
|
|
36
|
+
// Set default model provider
|
|
37
|
+
if (!options.modelProvider) {
|
|
38
|
+
options.modelProvider = 'gemini';
|
|
39
|
+
}
|
|
40
|
+
// Set default model based on provider
|
|
41
|
+
if (!options.model) {
|
|
42
|
+
var _MODEL_OPTIONS_provider;
|
|
43
|
+
const provider = options.modelProvider;
|
|
44
|
+
options.model = ((_MODEL_OPTIONS_provider = MODEL_OPTIONS[provider]) == null ? void 0 : _MODEL_OPTIONS_provider[0]) || 'gemini-3.0-flash';
|
|
45
|
+
}
|
|
46
|
+
// Generate project files
|
|
47
|
+
const substitutions = _extends({}, names(options.name), {
|
|
48
|
+
projectName: options.name,
|
|
49
|
+
description: options.description || 'My ADK Agent',
|
|
50
|
+
modelProvider: options.modelProvider,
|
|
51
|
+
model: options.model,
|
|
52
|
+
templates: options.templates,
|
|
53
|
+
hasBasic: options.templates.includes('basic'),
|
|
54
|
+
hasMultiTool: options.templates.includes('multi-tool'),
|
|
55
|
+
hasTeam: options.templates.includes('team'),
|
|
56
|
+
hasStreaming: options.templates.includes('streaming'),
|
|
57
|
+
hasWorkflow: options.templates.includes('workflow'),
|
|
58
|
+
tmpl: ''
|
|
59
|
+
});
|
|
60
|
+
generateFiles(tree, path.join(__dirname, 'files'), projectRoot, substitutions);
|
|
61
|
+
// Format files
|
|
62
|
+
await formatFiles(tree);
|
|
63
|
+
// Print success message
|
|
64
|
+
console.log(`
|
|
65
|
+
โ
ADK Agent project created successfully!
|
|
66
|
+
|
|
67
|
+
๐ Project: ${projectRoot}
|
|
68
|
+
๐ค Model: ${options.model}
|
|
69
|
+
๐ฆ Templates: ${options.templates.join(', ')}
|
|
70
|
+
|
|
71
|
+
๐ Next steps:
|
|
72
|
+
1. cd ${projectRoot}
|
|
73
|
+
2. Copy .env.example to .env and add your API key
|
|
74
|
+
3. npm install${options.installDependencies ? ' (running now...)' : ''}
|
|
75
|
+
4. npm run dev
|
|
76
|
+
|
|
77
|
+
๐ Documentation: https://google.github.io/adk-docs/
|
|
78
|
+
`);
|
|
79
|
+
// Return task for dependency installation if requested
|
|
80
|
+
if (options.installDependencies) {
|
|
81
|
+
return installPackagesTask(tree);
|
|
82
|
+
}
|
|
83
|
+
return ()=>{};
|
|
84
|
+
}
|
|
85
|
+
export default initGenerator;
|
|
86
|
+
|
|
87
|
+
//# sourceMappingURL=generator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/generators/init/generator.ts"],"sourcesContent":["import {\n Tree,\n formatFiles,\n generateFiles,\n installPackagesTask,\n joinPathFragments,\n names,\n} from '@nx/devkit';\nimport * as path from 'path';\nimport { InitGeneratorSchema } from './schema.js';\n\n// Model options based on provider\n// Note: Users can change to any model in their generated project\n// This list is just for initial selection during project creation\nconst MODEL_OPTIONS = {\n gemini: [\n 'gemini-3.0-flash',\n 'gemini-3.0-pro',\n 'gemini-2.5-flash',\n 'gemini-2.5-pro',\n ],\n openai: ['gpt-5', 'gpt-5-mini', 'gpt-4o', 'gpt-4o-mini'],\n anthropic: [\n 'claude-4.5-sonnet',\n 'claude-4-sonnet',\n 'claude-4-opus',\n 'claude-3-5-sonnet',\n ],\n custom: [],\n};\n\nexport async function initGenerator(tree: Tree, options: InitGeneratorSchema) {\n const projectRoot = options.directory\n ? joinPathFragments(options.directory, options.name)\n : options.name;\n\n // Set default templates if none selected\n if (!options.templates || options.templates.length === 0) {\n options.templates = ['multi-tool'];\n }\n\n // Set default model provider\n if (!options.modelProvider) {\n options.modelProvider = 'gemini';\n }\n\n // Set default model based on provider\n if (!options.model) {\n const provider = options.modelProvider as keyof typeof MODEL_OPTIONS;\n options.model = MODEL_OPTIONS[provider]?.[0] || 'gemini-3.0-flash';\n }\n\n // Generate project files\n const substitutions = {\n ...names(options.name),\n projectName: options.name,\n description: options.description || 'My ADK Agent',\n modelProvider: options.modelProvider,\n model: options.model,\n templates: options.templates,\n hasBasic: options.templates.includes('basic'),\n hasMultiTool: options.templates.includes('multi-tool'),\n hasTeam: options.templates.includes('team'),\n hasStreaming: options.templates.includes('streaming'),\n hasWorkflow: options.templates.includes('workflow'),\n tmpl: '',\n };\n\n generateFiles(\n tree,\n path.join(__dirname, 'files'),\n projectRoot,\n substitutions,\n );\n\n // Format files\n await formatFiles(tree);\n\n // Print success message\n console.log(`\nโ
ADK Agent project created successfully!\n\n๐ Project: ${projectRoot}\n๐ค Model: ${options.model}\n๐ฆ Templates: ${options.templates.join(', ')}\n\n๐ Next steps:\n 1. cd ${projectRoot}\n 2. Copy .env.example to .env and add your API key\n 3. npm install${options.installDependencies ? ' (running now...)' : ''}\n 4. npm run dev\n\n๐ Documentation: https://google.github.io/adk-docs/\n`);\n\n // Return task for dependency installation if requested\n if (options.installDependencies) {\n return installPackagesTask(tree);\n }\n\n return () => {};\n}\n\nexport default initGenerator;\n"],"names":["formatFiles","generateFiles","installPackagesTask","joinPathFragments","names","path","MODEL_OPTIONS","gemini","openai","anthropic","custom","initGenerator","tree","options","projectRoot","directory","name","templates","length","modelProvider","model","provider","substitutions","projectName","description","hasBasic","includes","hasMultiTool","hasTeam","hasStreaming","hasWorkflow","tmpl","join","__dirname","console","log","installDependencies"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";AAAA,SAEEA,WAAW,EACXC,aAAa,EACbC,mBAAmB,EACnBC,iBAAiB,EACjBC,KAAK,QACA,aAAa;AACpB,YAAYC,UAAU,OAAO;AAG7B,kCAAkC;AAClC,iEAAiE;AACjE,kEAAkE;AAClE,MAAMC,gBAAgB;IACpBC,QAAQ;QACN;QACA;QACA;QACA;KACD;IACDC,QAAQ;QAAC;QAAS;QAAc;QAAU;KAAc;IACxDC,WAAW;QACT;QACA;QACA;QACA;KACD;IACDC,QAAQ,EAAE;AACZ;AAEA,OAAO,eAAeC,cAAcC,IAAU,EAAEC,OAA4B;IAC1E,MAAMC,cAAcD,QAAQE,SAAS,GACjCZ,kBAAkBU,QAAQE,SAAS,EAAEF,QAAQG,IAAI,IACjDH,QAAQG,IAAI;IAEhB,yCAAyC;IACzC,IAAI,CAACH,QAAQI,SAAS,IAAIJ,QAAQI,SAAS,CAACC,MAAM,KAAK,GAAG;QACxDL,QAAQI,SAAS,GAAG;YAAC;SAAa;IACpC;IAEA,6BAA6B;IAC7B,IAAI,CAACJ,QAAQM,aAAa,EAAE;QAC1BN,QAAQM,aAAa,GAAG;IAC1B;IAEA,sCAAsC;IACtC,IAAI,CAACN,QAAQO,KAAK,EAAE;YAEFd;QADhB,MAAMe,WAAWR,QAAQM,aAAa;QACtCN,QAAQO,KAAK,GAAGd,EAAAA,0BAAAA,aAAa,CAACe,SAAS,qBAAvBf,uBAAyB,CAAC,EAAE,KAAI;IAClD;IAEA,yBAAyB;IACzB,MAAMgB,gBAAgB,aACjBlB,MAAMS,QAAQG,IAAI;QACrBO,aAAaV,QAAQG,IAAI;QACzBQ,aAAaX,QAAQW,WAAW,IAAI;QACpCL,eAAeN,QAAQM,aAAa;QACpCC,OAAOP,QAAQO,KAAK;QACpBH,WAAWJ,QAAQI,SAAS;QAC5BQ,UAAUZ,QAAQI,SAAS,CAACS,QAAQ,CAAC;QACrCC,cAAcd,QAAQI,SAAS,CAACS,QAAQ,CAAC;QACzCE,SAASf,QAAQI,SAAS,CAACS,QAAQ,CAAC;QACpCG,cAAchB,QAAQI,SAAS,CAACS,QAAQ,CAAC;QACzCI,aAAajB,QAAQI,SAAS,CAACS,QAAQ,CAAC;QACxCK,MAAM;;IAGR9B,cACEW,MACAP,KAAK2B,IAAI,CAACC,WAAW,UACrBnB,aACAQ;IAGF,eAAe;IACf,MAAMtB,YAAYY;IAElB,wBAAwB;IACxBsB,QAAQC,GAAG,CAAC,CAAC;;;YAGH,EAAErB,YAAY;UAChB,EAAED,QAAQO,KAAK,CAAC;cACZ,EAAEP,QAAQI,SAAS,CAACe,IAAI,CAAC,MAAM;;;QAGrC,EAAElB,YAAY;;gBAEN,EAAED,QAAQuB,mBAAmB,GAAG,sBAAsB,GAAG;;;;AAIzE,CAAC;IAEC,uDAAuD;IACvD,IAAIvB,QAAQuB,mBAAmB,EAAE;QAC/B,OAAOlC,oBAAoBU;IAC7B;IAEA,OAAO,KAAO;AAChB;AAEA,eAAeD,cAAc"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/generators/init/schema.d.ts"],"sourcesContent":["export interface InitGeneratorSchema {\n name: string;\n directory?: string;\n description?: string;\n templates?: Array<'basic' | 'multi-tool' | 'team' | 'streaming' | 'workflow'>;\n modelProvider?: 'gemini' | 'openai' | 'anthropic' | 'custom';\n model?: string;\n installDependencies?: boolean;\n initGit?: boolean;\n}\n"],"names":[],"rangeMappings":"","mappings":"AAAA,WASC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["export * from './lib/create-adk-agent.js';\n"],"names":[],"rangeMappings":"","mappings":"AAAA,cAAc,4BAA4B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/lib/create-adk-agent.ts"],"sourcesContent":["export function createAdkAgent(): string {\n return 'create-adk-agent';\n}\n"],"names":["createAdkAgent"],"rangeMappings":";;","mappings":"AAAA,OAAO,SAASA;IACd,OAAO;AACT"}
|
package/generators.json
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "create-adk-agent",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "Nx generator for scaffolding ADK (Agent Development Kit) TypeScript projects with multiple templates, multi-model support, and modern tooling",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"adk",
|
|
7
|
+
"agent",
|
|
8
|
+
"ai",
|
|
9
|
+
"llm",
|
|
10
|
+
"gemini",
|
|
11
|
+
"openai",
|
|
12
|
+
"anthropic",
|
|
13
|
+
"typescript",
|
|
14
|
+
"nx",
|
|
15
|
+
"generator",
|
|
16
|
+
"scaffold",
|
|
17
|
+
"template"
|
|
18
|
+
],
|
|
19
|
+
"repository": {
|
|
20
|
+
"type": "git",
|
|
21
|
+
"url": "https://github.com/mainawycliffe/adk-ts-new"
|
|
22
|
+
},
|
|
23
|
+
"author": "Maina Wycliffe",
|
|
24
|
+
"license": "MIT",
|
|
25
|
+
"type": "module",
|
|
26
|
+
"scripts": {
|
|
27
|
+
"prepublishOnly": "nx build create-adk-agent",
|
|
28
|
+
"publish:dry-run": "npm publish --dry-run",
|
|
29
|
+
"publish:npm": "npm publish --access public"
|
|
30
|
+
},
|
|
31
|
+
"generators": "./generators.json",
|
|
32
|
+
"main": "./dist/index.js",
|
|
33
|
+
"module": "./dist/index.js",
|
|
34
|
+
"types": "./dist/index.d.ts",
|
|
35
|
+
"exports": {
|
|
36
|
+
"./package.json": "./package.json",
|
|
37
|
+
".": {
|
|
38
|
+
"@adk-ts-new/source": "./src/index.ts",
|
|
39
|
+
"types": "./dist/index.d.ts",
|
|
40
|
+
"import": "./dist/index.js",
|
|
41
|
+
"default": "./dist/index.js"
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
"files": [
|
|
45
|
+
"dist",
|
|
46
|
+
"generators.json",
|
|
47
|
+
"src/generators/**/files/**",
|
|
48
|
+
"src/generators/**/schema.json",
|
|
49
|
+
"!**/*.tsbuildinfo"
|
|
50
|
+
],
|
|
51
|
+
"nx": {
|
|
52
|
+
"sourceRoot": "packages/create-adk-agent/src",
|
|
53
|
+
"targets": {
|
|
54
|
+
"build": {
|
|
55
|
+
"executor": "@nx/js:swc",
|
|
56
|
+
"outputs": [
|
|
57
|
+
"{options.outputPath}"
|
|
58
|
+
],
|
|
59
|
+
"options": {
|
|
60
|
+
"outputPath": "packages/create-adk-agent/dist",
|
|
61
|
+
"main": "packages/create-adk-agent/src/index.ts",
|
|
62
|
+
"tsConfig": "packages/create-adk-agent/tsconfig.lib.json",
|
|
63
|
+
"skipTypeCheck": true,
|
|
64
|
+
"stripLeadingPaths": true
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
"dependencies": {
|
|
70
|
+
"@nx/devkit": "^22.3.3",
|
|
71
|
+
"@swc/helpers": "~0.5.11"
|
|
72
|
+
}
|
|
73
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Google Gemini API Key
|
|
2
|
+
# Get your key from: https://aistudio.google.com/apikey
|
|
3
|
+
GEMINI_API_KEY=your_google_api_key_here
|
|
4
|
+
|
|
5
|
+
# OR use Vertex AI (for Google Cloud)
|
|
6
|
+
# GOOGLE_GENAI_USE_VERTEXAI=true
|
|
7
|
+
# GOOGLE_CLOUD_PROJECT=your-project-id
|
|
8
|
+
# GOOGLE_CLOUD_LOCATION=us-central1
|
|
9
|
+
|
|
10
|
+
# OpenAI API Key (if using OpenAI models)
|
|
11
|
+
# Get your key from: https://platform.openai.com/api-keys
|
|
12
|
+
# OPENAI_API_KEY=your_openai_api_key_here
|
|
13
|
+
|
|
14
|
+
# Anthropic API Key (if using Claude models)
|
|
15
|
+
# Get your key from: https://console.anthropic.com/settings/keys
|
|
16
|
+
# ANTHROPIC_API_KEY=your_anthropic_api_key_here
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"parser": "@typescript-eslint/parser",
|
|
3
|
+
"extends": [
|
|
4
|
+
"eslint:recommended",
|
|
5
|
+
"plugin:@typescript-eslint/recommended"
|
|
6
|
+
],
|
|
7
|
+
"plugins": ["@typescript-eslint"],
|
|
8
|
+
"env": {
|
|
9
|
+
"node": true,
|
|
10
|
+
"es2022": true
|
|
11
|
+
},
|
|
12
|
+
"parserOptions": {
|
|
13
|
+
"ecmaVersion": 2022,
|
|
14
|
+
"sourceType": "module"
|
|
15
|
+
},
|
|
16
|
+
"rules": {
|
|
17
|
+
"@typescript-eslint/no-unused-vars": ["warn", { "argsIgnorePattern": "^_" }],
|
|
18
|
+
"@typescript-eslint/no-explicit-any": "warn"
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Environment files - NEVER commit these!
|
|
2
|
+
.env
|
|
3
|
+
.env.local
|
|
4
|
+
.env*.local
|
|
5
|
+
|
|
6
|
+
# Dependencies
|
|
7
|
+
node_modules/
|
|
8
|
+
|
|
9
|
+
# Build output
|
|
10
|
+
dist/
|
|
11
|
+
|
|
12
|
+
# IDE
|
|
13
|
+
.vscode/
|
|
14
|
+
.idea/
|
|
15
|
+
|
|
16
|
+
# OS
|
|
17
|
+
.DS_Store
|
|
18
|
+
Thumbs.db
|
|
19
|
+
|
|
20
|
+
# Test coverage
|
|
21
|
+
coverage/
|
|
22
|
+
|
|
23
|
+
# Logs
|
|
24
|
+
*.log
|
|
25
|
+
npm-debug.log*
|
|
26
|
+
yarn-debug.log*
|
|
27
|
+
yarn-error.log*
|