@intentsolutionsio/jeremy-genkit-pro 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/.claude-plugin/plugin.json +22 -0
- package/LICENSE +21 -0
- package/README.md +204 -0
- package/agents/genkit-flow-architect.md +206 -0
- package/commands/init-genkit-project.md +356 -0
- package/package.json +44 -0
- package/skills/genkit-production-expert/SKILL.md +81 -0
- package/skills/genkit-production-expert/references/ARD.md +71 -0
- package/skills/genkit-production-expert/references/PRD.md +70 -0
- package/skills/genkit-production-expert/references/errors.md +57 -0
- package/skills/genkit-production-expert/references/examples.md +493 -0
- package/skills/genkit-production-expert/references/how-it-works.md +55 -0
- package/skills/genkit-production-expert/references/production-best-practices-applied.md +40 -0
- package/skills/genkit-production-expert/references/workflow-examples.md +105 -0
- package/skills/genkit-production-expert/scripts/init-genkit.sh +77 -0
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# init-genkit.sh - Initialize Firebase Genkit project
|
|
3
|
+
|
|
4
|
+
set -euo pipefail
|
|
5
|
+
|
|
6
|
+
PROJECT_NAME="${1:-my-genkit-app}"
|
|
7
|
+
RUNTIME="${2:-nodejs}"
|
|
8
|
+
|
|
9
|
+
echo "Initializing Firebase Genkit Project"
|
|
10
|
+
echo "Name: $PROJECT_NAME"
|
|
11
|
+
echo "Runtime: $RUNTIME"
|
|
12
|
+
echo ""
|
|
13
|
+
|
|
14
|
+
mkdir -p "$PROJECT_NAME"
|
|
15
|
+
cd "$PROJECT_NAME"
|
|
16
|
+
|
|
17
|
+
if [[ "$RUNTIME" == "nodejs" ]]; then
|
|
18
|
+
# Initialize Node.js project
|
|
19
|
+
npm init -y
|
|
20
|
+
npm install genkit @genkit-ai/googleai @genkit-ai/vertexai
|
|
21
|
+
|
|
22
|
+
# Create basic flow
|
|
23
|
+
cat > src/index.ts <<'EOF'
|
|
24
|
+
import { genkit } from 'genkit';
|
|
25
|
+
import { googleAI } from '@genkit-ai/googleai';
|
|
26
|
+
|
|
27
|
+
const ai = genkit({
|
|
28
|
+
plugins: [googleAI()],
|
|
29
|
+
model: 'googleai/gemini-2.5-flash',
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
export const greetingFlow = ai.defineFlow('greeting', async (name: string) => {
|
|
33
|
+
const response = await ai.generate({
|
|
34
|
+
prompt: `Say hello to ${name}`,
|
|
35
|
+
});
|
|
36
|
+
return response.text;
|
|
37
|
+
});
|
|
38
|
+
EOF
|
|
39
|
+
|
|
40
|
+
cat > package.json <<'EOF'
|
|
41
|
+
{
|
|
42
|
+
"name": "genkit-app",
|
|
43
|
+
"version": "1.0.0",
|
|
44
|
+
"type": "module",
|
|
45
|
+
"scripts": {
|
|
46
|
+
"dev": "genkit start",
|
|
47
|
+
"build": "tsc",
|
|
48
|
+
"deploy": "gcloud run deploy"
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
EOF
|
|
52
|
+
|
|
53
|
+
elif [[ "$RUNTIME" == "python" ]]; then
|
|
54
|
+
# Initialize Python project
|
|
55
|
+
pip install firebase-genkit
|
|
56
|
+
|
|
57
|
+
cat > main.py <<'EOF'
|
|
58
|
+
from genkit import genkit
|
|
59
|
+
from genkit.googleai import GoogleAI
|
|
60
|
+
|
|
61
|
+
ai = genkit(
|
|
62
|
+
plugins=[GoogleAI()],
|
|
63
|
+
model='googleai/gemini-2.5-flash'
|
|
64
|
+
)
|
|
65
|
+
|
|
66
|
+
@ai.flow
|
|
67
|
+
def greeting(name: str) -> str:
|
|
68
|
+
response = ai.generate(prompt=f"Say hello to {name}")
|
|
69
|
+
return response.text
|
|
70
|
+
EOF
|
|
71
|
+
fi
|
|
72
|
+
|
|
73
|
+
echo "✓ Genkit project initialized"
|
|
74
|
+
echo ""
|
|
75
|
+
echo "Next steps:"
|
|
76
|
+
echo " cd $PROJECT_NAME"
|
|
77
|
+
echo " genkit start # Start dev UI"
|