byteplan-cli 1.0.2 → 1.2.2

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.
Files changed (66) hide show
  1. package/package.json +7 -3
  2. package/skills/byteplan-analysis/SKILL.md +1078 -0
  3. package/skills/byteplan-api/API_REFERENCE.md +249 -0
  4. package/skills/byteplan-api/SKILL.md +96 -0
  5. package/skills/byteplan-api/package.json +16 -0
  6. package/skills/byteplan-api/scripts/api.js +973 -0
  7. package/skills/byteplan-excel/SKILL.md +212 -0
  8. package/skills/byteplan-excel/examples/margin-analysis.json +40 -0
  9. package/skills/byteplan-excel/package.json +12 -0
  10. package/skills/byteplan-excel/pnpm-lock.yaml +68 -0
  11. package/skills/byteplan-excel/scripts/generate_excel.js +156 -0
  12. package/skills/byteplan-html/SKILL.md +490 -0
  13. package/skills/byteplan-html/examples/example-output.html +184 -0
  14. package/skills/byteplan-html/examples/generate-ppt-style-html.js +611 -0
  15. package/skills/byteplan-html/examples/margin-contribution-analysis.json +152 -0
  16. package/skills/byteplan-html/package.json +18 -0
  17. package/skills/byteplan-html/scripts/generate_html.js +517 -0
  18. package/skills/byteplan-ppt/SKILL.md +394 -0
  19. package/skills/byteplan-ppt/examples/margin-contribution-analysis.json +152 -0
  20. package/skills/byteplan-ppt/package.json +16 -0
  21. package/skills/byteplan-ppt/pnpm-lock.yaml +138 -0
  22. package/skills/byteplan-ppt/scripts/check_ppt_overlap.js +318 -0
  23. package/skills/byteplan-ppt/scripts/generate_ppt.js +680 -0
  24. package/skills/byteplan-video/SKILL.md +606 -0
  25. package/skills/byteplan-video/examples/sample-video-data.json +82 -0
  26. package/skills/byteplan-video/remotion-project/package.json +22 -0
  27. package/skills/byteplan-video/remotion-project/pnpm-lock.yaml +1646 -0
  28. package/skills/byteplan-video/remotion-project/remotion.config.ts +6 -0
  29. package/skills/byteplan-video/remotion-project/scene_durations.json +32 -0
  30. package/skills/byteplan-video/remotion-project/scripts/generate_audio.js +279 -0
  31. package/skills/byteplan-video/remotion-project/src/DynamicReport.tsx +172 -0
  32. package/skills/byteplan-video/remotion-project/src/Root.tsx +51 -0
  33. package/skills/byteplan-video/remotion-project/src/SalesReport.tsx +107 -0
  34. package/skills/byteplan-video/remotion-project/src/index.tsx +4 -0
  35. package/skills/byteplan-video/remotion-project/src/scenes/ChartSlide.tsx +201 -0
  36. package/skills/byteplan-video/remotion-project/src/scenes/CoverSlide.tsx +61 -0
  37. package/skills/byteplan-video/remotion-project/src/scenes/EndSlide.tsx +60 -0
  38. package/skills/byteplan-video/remotion-project/src/scenes/InsightSlide.tsx +101 -0
  39. package/skills/byteplan-video/remotion-project/src/scenes/KpiSlide.tsx +84 -0
  40. package/skills/byteplan-video/remotion-project/src/scenes/RecommendationSlide.tsx +100 -0
  41. package/skills/byteplan-video/remotion-project/tsconfig.json +13 -0
  42. package/skills/byteplan-video/remotion-project/video_data.json +76 -0
  43. package/skills/byteplan-video/scripts/generate_video.js +270 -0
  44. package/skills/byteplan-video/templates/package.json +31 -0
  45. package/skills/byteplan-video/templates/pnpm-lock.yaml +2200 -0
  46. package/skills/byteplan-video/templates/remotion.config.ts +9 -0
  47. package/skills/byteplan-video/templates/scripts/generate-audio.ts +55 -0
  48. package/skills/byteplan-video/templates/src/components/BarChartScene.tsx +153 -0
  49. package/skills/byteplan-video/templates/src/components/InsightScene.tsx +135 -0
  50. package/skills/byteplan-video/templates/src/components/LineChartScene.tsx +214 -0
  51. package/skills/byteplan-video/templates/src/components/SceneFactory.tsx +34 -0
  52. package/skills/byteplan-video/templates/src/components/SummaryScene.tsx +155 -0
  53. package/skills/byteplan-video/templates/src/components/TitleScene.tsx +130 -0
  54. package/skills/byteplan-video/templates/src/compositions/AnalysisVideo.tsx +39 -0
  55. package/skills/byteplan-video/templates/src/index.tsx +28 -0
  56. package/skills/byteplan-video/templates/src/register-root.tsx +4 -0
  57. package/skills/byteplan-video/templates/src/storyboard/types.ts +46 -0
  58. package/skills/byteplan-video/templates/tsconfig.json +17 -0
  59. package/skills/byteplan-video/templates/tsconfig.scripts.json +13 -0
  60. package/skills/byteplan-word/SKILL.md +233 -0
  61. package/skills/byteplan-word/package.json +12 -0
  62. package/skills/byteplan-word/pnpm-lock.yaml +120 -0
  63. package/skills/byteplan-word/scripts/generate_word.js +548 -0
  64. package/src/api.js +78 -22
  65. package/src/cli.js +11 -0
  66. package/src/commands/skills.js +279 -0
@@ -0,0 +1,152 @@
1
+ {
2
+ "title": "跨境电商边际贡献分析报告",
3
+ "subtitle": "找出贡献最大的要素",
4
+ "period": "2026年3月31日",
5
+ "sections": [
6
+ "核心发现摘要",
7
+ "关键指标概览",
8
+ "渠道贡献分析",
9
+ "贡献率对比",
10
+ "贡献排行榜",
11
+ "数据明细表",
12
+ "关键洞察",
13
+ "行动建议"
14
+ ],
15
+ "summary": [
16
+ {
17
+ "rank": "🥇 第一名",
18
+ "name": "天猫",
19
+ "type": "渠道",
20
+ "value": "¥16,273,934",
21
+ "rate": "贡献率 68%"
22
+ },
23
+ {
24
+ "rank": "🥈 第二名",
25
+ "name": "CD120P",
26
+ "type": "产品",
27
+ "value": "¥5,635,209",
28
+ "rate": "贡献率 74%"
29
+ },
30
+ {
31
+ "rank": "🥉 第三名",
32
+ "name": "美国",
33
+ "type": "国家",
34
+ "value": "¥4,983,568",
35
+ "rate": "贡献率 65%"
36
+ }
37
+ ],
38
+ "kpis": [
39
+ {
40
+ "icon": "💰",
41
+ "label": "最大边际贡献",
42
+ "value": "16,273,934",
43
+ "unit": "元(天猫)"
44
+ },
45
+ {
46
+ "icon": "📈",
47
+ "label": "最高贡献率",
48
+ "value": "74%",
49
+ "unit": "(CD120P)"
50
+ },
51
+ {
52
+ "icon": "🌍",
53
+ "label": "核心市场贡献",
54
+ "value": "4,983,568",
55
+ "unit": "元(美国)"
56
+ },
57
+ {
58
+ "icon": "⚠️",
59
+ "label": "负贡献要素",
60
+ "value": "2",
61
+ "unit": "个(需关注)"
62
+ }
63
+ ],
64
+ "barChart": {
65
+ "title": "渠道边际贡献对比",
66
+ "data": [
67
+ { "name": "天猫", "value": 16273934 },
68
+ { "name": "Amazon", "value": 2785991 },
69
+ { "name": "Walmart", "value": 2528805 },
70
+ { "name": "Amazon_VC", "value": 1712695 },
71
+ { "name": "Shopify", "value": 624534 }
72
+ ]
73
+ },
74
+ "ratioData": {
75
+ "title": "渠道边际贡献率对比",
76
+ "data": [
77
+ { "name": "天猫", "value": 68 },
78
+ { "name": "Amazon", "value": 12 },
79
+ { "name": "Walmart", "value": 11 },
80
+ { "name": "Amazon_VC", "value": 7 },
81
+ { "name": "Shopify", "value": 3 }
82
+ ]
83
+ },
84
+ "rankingData": {
85
+ "title": "边际贡献 TOP8 排行榜",
86
+ "data": [
87
+ { "name": "天猫 (渠道)", "value": 16273934 },
88
+ { "name": "CD120P (产品)", "value": 5635209 },
89
+ { "name": "美国 (国家)", "value": 4983568 },
90
+ { "name": "Amazon (渠道)", "value": 2785991 },
91
+ { "name": "品牌01", "value": 3059742 },
92
+ { "name": "Walmart (渠道)", "value": 2528805 },
93
+ { "name": "英国 (国家)", "value": 1712695 },
94
+ { "name": "品牌03", "value": 2445409 }
95
+ ]
96
+ },
97
+ "tableData": {
98
+ "title": "边际贡献明细表",
99
+ "columns": ["要素名称", "类型", "收入(元)", "边际贡献(元)", "贡献率"],
100
+ "rows": [
101
+ ["天猫", "渠道", "17,742,456", "16,273,934", "68%"],
102
+ ["CD120P", "产品", "27,538,152", "5,635,209", "74%"],
103
+ ["美国", "国家", "35,434,599", "4,983,568", "65%"],
104
+ ["Amazon", "渠道", "29,469,759", "2,785,991", "12%"],
105
+ ["品牌01", "品牌", "10,447,912", "3,059,742", "40%"],
106
+ ["Walmart", "渠道", "6,583,724", "2,528,805", "11%"],
107
+ ["CD130P-B", "产品", "3,134,013", "-654,608", "-9%"],
108
+ ["CD140P", "产品", "3,638,106", "-388,318", "-5%"]
109
+ ]
110
+ },
111
+ "insights": [
112
+ {
113
+ "title": "天猫渠道表现卓越",
114
+ "content": "以68%贡献率和16,273,934元贡献额,成为最大贡献来源,运营效率高。",
115
+ "warning": false
116
+ },
117
+ {
118
+ "title": "CD120P效率最高",
119
+ "content": "贡献率达74%,每单位收入创造边际贡献最大,是明星产品。",
120
+ "warning": false
121
+ },
122
+ {
123
+ "title": "美国市场是核心",
124
+ "content": "贡献4,983,568元,贡献率65%,覆盖面广、效益稳定。",
125
+ "warning": false
126
+ },
127
+ {
128
+ "title": "⚠️ 存在亏损产品",
129
+ "content": "CD130P-B和CD140P边际贡献为负,需评估定价策略。",
130
+ "warning": true
131
+ }
132
+ ],
133
+ "recommendations": [
134
+ {
135
+ "title": "加大天猫渠道投入",
136
+ "content": "增加营销预算和运营资源,强化最大贡献渠道。"
137
+ },
138
+ {
139
+ "title": "推广CD120P产品",
140
+ "content": "扩大生产规模并加强推广力度,打造明星产品。"
141
+ },
142
+ {
143
+ "title": "深耕美国市场",
144
+ "content": "优化物流、客服和本地化服务,巩固核心市场。"
145
+ },
146
+ {
147
+ "title": "调整亏损产品",
148
+ "content": "对CD130P-B和CD140P进行成本分析和定价评估。"
149
+ }
150
+ ],
151
+ "source": "BytePlan 数据平台 · 跨境电商租户"
152
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "name": "byteplan-html",
3
+ "version": "1.0.0",
4
+ "description": "BytePlan 数据分析 网页报告生成器",
5
+ "main": "scripts/generate_html.js",
6
+ "scripts": {
7
+ "generate": "node scripts/generate_html.js",
8
+ "example": "node scripts/generate_html.js -o example-output.html -d examples/margin-contribution-analysis.json"
9
+ },
10
+ "keywords": [
11
+ "byteplan",
12
+ "html",
13
+ "report",
14
+ "chart"
15
+ ],
16
+ "author": "",
17
+ "license": "MIT"
18
+ }