create-hybrid 2.0.0 → 2.1.0
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 +2 -2
- package/dist/index.js +6 -19
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -17,7 +17,7 @@ npx create-hybrid my-agent --env production --agent-name "My Bot"
|
|
|
17
17
|
| Flag | Description | Default |
|
|
18
18
|
|------|-------------|---------|
|
|
19
19
|
| `<name>` | Project directory name | Required |
|
|
20
|
-
| `--env` |
|
|
20
|
+
| `--env` | Environment: `dev` or `production` | Prompted interactively |
|
|
21
21
|
| `--agent-name` | Display name for the agent | Prompted interactively |
|
|
22
22
|
|
|
23
23
|
## Generated Project Structure
|
|
@@ -164,7 +164,7 @@ pnpm deploy
|
|
|
164
164
|
## Relation to Other Packages
|
|
165
165
|
|
|
166
166
|
- The generated `src/server/index.ts` uses `@anthropic-ai/claude-agent-sdk` directly — same pattern as `packages/agent/src/server/index.ts`
|
|
167
|
-
- The generated `src/gateway/index.ts` is a simplified version of `packages/gateway/src/index.ts`
|
|
167
|
+
- The generated `src/gateway/index.ts` is a simplified version of `packages/gateway/src/index.ts`
|
|
168
168
|
- The generated project is standalone — no dependencies on `@hybrd/*` packages
|
|
169
169
|
- `packages/cli`'s `hybrid init` command delegates to this package
|
|
170
170
|
|
package/dist/index.js
CHANGED
|
@@ -37,16 +37,6 @@ async function main() {
|
|
|
37
37
|
message: "Project name",
|
|
38
38
|
initial: "my-agent"
|
|
39
39
|
},
|
|
40
|
-
{
|
|
41
|
-
type: cliArgs.env ? null : "select",
|
|
42
|
-
name: "env",
|
|
43
|
-
message: "XMTP environment",
|
|
44
|
-
choices: [
|
|
45
|
-
{ title: "production", value: "production" },
|
|
46
|
-
{ title: "dev", value: "dev" }
|
|
47
|
-
],
|
|
48
|
-
initial: 0
|
|
49
|
-
},
|
|
50
40
|
{
|
|
51
41
|
type: cliArgs["agent-name"] ? null : "text",
|
|
52
42
|
name: "agentName",
|
|
@@ -55,7 +45,6 @@ async function main() {
|
|
|
55
45
|
}
|
|
56
46
|
]);
|
|
57
47
|
const name = cliArgs.name || response.name;
|
|
58
|
-
const env = cliArgs.env || response.env;
|
|
59
48
|
const agentName = cliArgs["agent-name"] || response.agentName;
|
|
60
49
|
if (!name) {
|
|
61
50
|
console.log("\n Cancelled.\n");
|
|
@@ -74,8 +63,7 @@ async function main() {
|
|
|
74
63
|
mkdirSync(join(projectDir, "users"), { recursive: true });
|
|
75
64
|
const templateData = {
|
|
76
65
|
name,
|
|
77
|
-
agentName: agentName || "Hybrid Agent"
|
|
78
|
-
env: env || "production"
|
|
66
|
+
agentName: agentName || "Hybrid Agent"
|
|
79
67
|
};
|
|
80
68
|
writeFileSync(join(projectDir, "package.json"), packageJson(templateData));
|
|
81
69
|
writeFileSync(join(projectDir, "tsconfig.json"), tsconfigJson());
|
|
@@ -722,17 +710,16 @@ You are ${data.agentName}. Be accurate, concise, and practical.
|
|
|
722
710
|
- Anticipate follow-up questions.
|
|
723
711
|
`;
|
|
724
712
|
}
|
|
725
|
-
function envExample(
|
|
726
|
-
return `#
|
|
713
|
+
function envExample(templateData) {
|
|
714
|
+
return `# ${templateData.name} Agent
|
|
715
|
+
AGENT_NAME=${templateData.name}
|
|
716
|
+
|
|
717
|
+
# Anthropic API (or use OpenRouter below)
|
|
727
718
|
ANTHROPIC_API_KEY=your_api_key_here
|
|
728
719
|
|
|
729
720
|
# OpenRouter proxy (optional)
|
|
730
721
|
# ANTHROPIC_BASE_URL=https://openrouter.ai/api
|
|
731
722
|
# ANTHROPIC_AUTH_TOKEN=your_openrouter_key
|
|
732
|
-
|
|
733
|
-
# Agent configuration
|
|
734
|
-
AGENT_WALLET_KEY=your_private_key_here
|
|
735
|
-
XMTP_ENV=${data.env}
|
|
736
723
|
`;
|
|
737
724
|
}
|
|
738
725
|
function gitignore() {
|