@nguyenphp/antigravity-marketing 1.0.16 → 1.0.19
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 +187 -74
- package/bin/index.js +4 -4
- package/package.json +4 -3
- package/templates/.agent/agents/backend-specialist.md +263 -0
- package/templates/.agent/agents/database-architect.md +226 -0
- package/templates/.agent/agents/debugger.md +225 -0
- package/templates/.agent/agents/devops-engineer.md +242 -0
- package/templates/.agent/agents/documentation-writer.md +104 -0
- package/templates/.agent/agents/explorer-agent.md +73 -0
- package/templates/.agent/agents/frontend-specialist.md +527 -0
- package/templates/.agent/agents/game-developer.md +162 -0
- package/templates/.agent/agents/mobile-developer.md +377 -0
- package/templates/.agent/agents/orchestrator.md +400 -0
- package/templates/.agent/agents/penetration-tester.md +188 -0
- package/templates/.agent/agents/performance-optimizer.md +187 -0
- package/templates/.agent/agents/project-planner.md +403 -0
- package/templates/.agent/agents/security-auditor.md +170 -0
- package/templates/.agent/agents/seo-specialist.md +111 -0
- package/templates/.agent/agents/test-engineer.md +158 -0
- package/templates/.agent/rules/GEMINI.md +248 -0
- package/templates/.agent/skills/analytics-marketing/SKILL.md +172 -324
- package/templates/.agent/skills/api-patterns/SKILL.md +81 -0
- package/templates/.agent/skills/api-patterns/api-style.md +42 -0
- package/templates/.agent/skills/api-patterns/auth.md +24 -0
- package/templates/.agent/skills/api-patterns/documentation.md +26 -0
- package/templates/.agent/skills/api-patterns/graphql.md +41 -0
- package/templates/.agent/skills/api-patterns/rate-limiting.md +31 -0
- package/templates/.agent/skills/api-patterns/response.md +37 -0
- package/templates/.agent/skills/api-patterns/rest.md +40 -0
- package/templates/.agent/skills/api-patterns/scripts/api_validator.py +211 -0
- package/templates/.agent/skills/api-patterns/security-testing.md +122 -0
- package/templates/.agent/skills/api-patterns/trpc.md +41 -0
- package/templates/.agent/skills/api-patterns/versioning.md +22 -0
- package/templates/.agent/skills/app-builder/SKILL.md +75 -0
- package/templates/.agent/skills/app-builder/agent-coordination.md +71 -0
- package/templates/.agent/skills/app-builder/feature-building.md +53 -0
- package/templates/.agent/skills/app-builder/project-detection.md +34 -0
- package/templates/.agent/skills/app-builder/scaffolding.md +118 -0
- package/templates/.agent/skills/app-builder/tech-stack.md +40 -0
- package/templates/.agent/skills/app-builder/templates/SKILL.md +39 -0
- package/templates/.agent/skills/app-builder/templates/astro-static/TEMPLATE.md +76 -0
- package/templates/.agent/skills/app-builder/templates/chrome-extension/TEMPLATE.md +92 -0
- package/templates/.agent/skills/app-builder/templates/cli-tool/TEMPLATE.md +88 -0
- package/templates/.agent/skills/app-builder/templates/electron-desktop/TEMPLATE.md +88 -0
- package/templates/.agent/skills/app-builder/templates/express-api/TEMPLATE.md +83 -0
- package/templates/.agent/skills/app-builder/templates/flutter-app/TEMPLATE.md +90 -0
- package/templates/.agent/skills/app-builder/templates/monorepo-turborepo/TEMPLATE.md +90 -0
- package/templates/.agent/skills/app-builder/templates/nextjs-fullstack/TEMPLATE.md +82 -0
- package/templates/.agent/skills/app-builder/templates/nextjs-saas/TEMPLATE.md +100 -0
- package/templates/.agent/skills/app-builder/templates/nextjs-static/TEMPLATE.md +106 -0
- package/templates/.agent/skills/app-builder/templates/nuxt-app/TEMPLATE.md +101 -0
- package/templates/.agent/skills/app-builder/templates/python-fastapi/TEMPLATE.md +83 -0
- package/templates/.agent/skills/app-builder/templates/react-native-app/TEMPLATE.md +93 -0
- package/templates/.agent/skills/architecture/SKILL.md +55 -0
- package/templates/.agent/skills/architecture/context-discovery.md +43 -0
- package/templates/.agent/skills/architecture/examples.md +94 -0
- package/templates/.agent/skills/architecture/pattern-selection.md +68 -0
- package/templates/.agent/skills/architecture/patterns-reference.md +50 -0
- package/templates/.agent/skills/architecture/trade-off-analysis.md +77 -0
- package/templates/.agent/skills/banner-design/SKILL.md +192 -0
- package/templates/.agent/skills/banner-design/references/banner-sizes-and-styles.md +118 -0
- package/templates/.agent/skills/bash-linux/SKILL.md +199 -0
- package/templates/.agent/skills/behavioral-modes/SKILL.md +242 -0
- package/templates/.agent/skills/brainstorming/SKILL.md +163 -0
- package/templates/.agent/skills/brainstorming/dynamic-questioning.md +350 -0
- package/templates/.agent/skills/brand/SKILL.md +97 -0
- package/templates/.agent/skills/brand/references/approval-checklist.md +169 -0
- package/templates/.agent/skills/brand/references/asset-organization.md +157 -0
- package/templates/.agent/skills/brand/references/brand-guideline-template.md +140 -0
- package/templates/.agent/skills/brand/references/color-palette-management.md +186 -0
- package/templates/.agent/skills/brand/references/consistency-checklist.md +94 -0
- package/templates/.agent/skills/brand/references/logo-usage-rules.md +185 -0
- package/templates/.agent/skills/brand/references/messaging-framework.md +85 -0
- package/templates/.agent/skills/brand/references/typography-specifications.md +214 -0
- package/templates/.agent/skills/brand/references/update.md +118 -0
- package/templates/.agent/skills/brand/references/visual-identity.md +96 -0
- package/templates/.agent/skills/brand/references/voice-framework.md +88 -0
- package/templates/.agent/skills/brand/scripts/extract-colors.cjs +341 -0
- package/templates/.agent/skills/brand/scripts/inject-brand-context.cjs +349 -0
- package/templates/.agent/skills/brand/scripts/sync-brand-to-tokens.cjs +266 -0
- package/templates/.agent/skills/brand/scripts/validate-asset.cjs +387 -0
- package/templates/.agent/skills/brand/templates/brand-guidelines-starter.md +275 -0
- package/templates/.agent/skills/clean-code/SKILL.md +201 -0
- package/templates/.agent/skills/code-review-checklist/SKILL.md +109 -0
- package/templates/.agent/skills/copywriting/SKILL.md +250 -0
- package/templates/.agent/skills/database-design/SKILL.md +52 -0
- package/templates/.agent/skills/database-design/database-selection.md +43 -0
- package/templates/.agent/skills/database-design/indexing.md +39 -0
- package/templates/.agent/skills/database-design/migrations.md +48 -0
- package/templates/.agent/skills/database-design/optimization.md +36 -0
- package/templates/.agent/skills/database-design/orm-selection.md +30 -0
- package/templates/.agent/skills/database-design/schema-design.md +56 -0
- package/templates/.agent/skills/database-design/scripts/schema_validator.py +172 -0
- package/templates/.agent/skills/deployment-procedures/SKILL.md +241 -0
- package/templates/.agent/skills/docker-expert/SKILL.md +409 -0
- package/templates/.agent/skills/frontend-design/animation-guide.md +331 -0
- package/templates/.agent/skills/frontend-design/color-system.md +311 -0
- package/templates/.agent/skills/frontend-design/decision-trees.md +418 -0
- package/templates/.agent/skills/frontend-design/motion-graphics.md +306 -0
- package/templates/.agent/skills/frontend-design/scripts/accessibility_checker.py +183 -0
- package/templates/.agent/skills/frontend-design/scripts/ux_audit.py +722 -0
- package/templates/.agent/skills/frontend-design/typography-system.md +345 -0
- package/templates/.agent/skills/frontend-design/ux-psychology.md +541 -0
- package/templates/.agent/skills/frontend-design/visual-effects.md +383 -0
- package/templates/.agent/skills/frontend-slides/SKILL.md +92 -0
- package/templates/.agent/skills/frontend-slides/STYLE_PRESETS.md +347 -0
- package/templates/.agent/skills/frontend-slides/animation-patterns.md +110 -0
- package/templates/.agent/skills/frontend-slides/examples/n8n-jupviec-automation.html +789 -0
- package/templates/.agent/skills/frontend-slides/examples/n8n-jupviec-automation.pptx +0 -0
- package/templates/.agent/skills/frontend-slides/html-template.md +347 -0
- package/templates/.agent/skills/frontend-slides/scripts/export-pptx.py +58 -0
- package/templates/.agent/skills/frontend-slides/scripts/extract-pptx.py +96 -0
- package/templates/.agent/skills/frontend-slides/viewport-base.css +153 -0
- package/templates/.agent/skills/game-development/2d-games/SKILL.md +119 -0
- package/templates/.agent/skills/game-development/3d-games/SKILL.md +135 -0
- package/templates/.agent/skills/game-development/SKILL.md +167 -0
- package/templates/.agent/skills/game-development/game-art/SKILL.md +185 -0
- package/templates/.agent/skills/game-development/game-audio/SKILL.md +190 -0
- package/templates/.agent/skills/game-development/game-design/SKILL.md +129 -0
- package/templates/.agent/skills/game-development/mobile-games/SKILL.md +108 -0
- package/templates/.agent/skills/game-development/multiplayer/SKILL.md +132 -0
- package/templates/.agent/skills/game-development/pc-games/SKILL.md +144 -0
- package/templates/.agent/skills/game-development/vr-ar/SKILL.md +123 -0
- package/templates/.agent/skills/game-development/web-games/SKILL.md +150 -0
- package/templates/.agent/skills/geo-fundamentals/SKILL.md +156 -0
- package/templates/.agent/skills/geo-fundamentals/scripts/geo_checker.py +289 -0
- package/templates/.agent/skills/growth-engine/SKILL.md +244 -0
- package/templates/.agent/skills/i18n-localization/SKILL.md +154 -0
- package/templates/.agent/skills/i18n-localization/scripts/i18n_checker.py +241 -0
- package/templates/.agent/skills/lint-and-validate/SKILL.md +45 -0
- package/templates/.agent/skills/lint-and-validate/scripts/lint_runner.py +172 -0
- package/templates/.agent/skills/lint-and-validate/scripts/type_coverage.py +173 -0
- package/templates/.agent/skills/marketing-report-expert/SKILL.md +70 -0
- package/templates/.agent/skills/mcp-builder/SKILL.md +176 -0
- package/templates/.agent/skills/minimax-docx/LICENSE +21 -0
- package/templates/.agent/skills/minimax-docx/SKILL.md +274 -0
- package/templates/.agent/skills/minimax-docx/assets/styles/academic_styles.xml +250 -0
- package/templates/.agent/skills/minimax-docx/assets/styles/corporate_styles.xml +284 -0
- package/templates/.agent/skills/minimax-docx/assets/styles/default_styles.xml +449 -0
- package/templates/.agent/skills/minimax-docx/assets/xsd/aesthetic-rules.xsd +470 -0
- package/templates/.agent/skills/minimax-docx/assets/xsd/business-rules.xsd +130 -0
- package/templates/.agent/skills/minimax-docx/assets/xsd/common-types.xsd +159 -0
- package/templates/.agent/skills/minimax-docx/assets/xsd/wml-subset.xsd +589 -0
- package/templates/.agent/skills/minimax-docx/references/cjk_typography.md +357 -0
- package/templates/.agent/skills/minimax-docx/references/cjk_university_template_guide.md +184 -0
- package/templates/.agent/skills/minimax-docx/references/comments_guide.md +191 -0
- package/templates/.agent/skills/minimax-docx/references/design_good_bad_examples.md +829 -0
- package/templates/.agent/skills/minimax-docx/references/design_principles.md +819 -0
- package/templates/.agent/skills/minimax-docx/references/openxml_element_order.md +308 -0
- package/templates/.agent/skills/minimax-docx/references/openxml_encyclopedia_part1.md +4061 -0
- package/templates/.agent/skills/minimax-docx/references/openxml_encyclopedia_part2.md +2820 -0
- package/templates/.agent/skills/minimax-docx/references/openxml_encyclopedia_part3.md +3381 -0
- package/templates/.agent/skills/minimax-docx/references/openxml_namespaces.md +82 -0
- package/templates/.agent/skills/minimax-docx/references/openxml_units.md +72 -0
- package/templates/.agent/skills/minimax-docx/references/scenario_a_create.md +284 -0
- package/templates/.agent/skills/minimax-docx/references/scenario_b_edit_content.md +295 -0
- package/templates/.agent/skills/minimax-docx/references/scenario_c_apply_template.md +456 -0
- package/templates/.agent/skills/minimax-docx/references/track_changes_guide.md +200 -0
- package/templates/.agent/skills/minimax-docx/references/troubleshooting.md +506 -0
- package/templates/.agent/skills/minimax-docx/references/typography_guide.md +294 -0
- package/templates/.agent/skills/minimax-docx/references/xsd_validation_guide.md +158 -0
- package/templates/.agent/skills/minimax-docx/scripts/doc_to_docx.sh +40 -0
- package/templates/.agent/skills/minimax-docx/scripts/docx_preview.sh +37 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Cli/MiniMaxAIDocx.Cli.csproj +19 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Cli/Program.cs +18 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Commands/AnalyzeCommand.cs +147 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Commands/ApplyTemplateCommand.cs +322 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Commands/CreateCommand.cs +324 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Commands/DiffCommand.cs +155 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Commands/EditContentCommand.cs +487 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Commands/FixOrderCommand.cs +108 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Commands/MergeRunsCommand.cs +122 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Commands/ValidateCommand.cs +107 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/MiniMaxAIDocx.Core.csproj +15 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/OpenXml/CommentSynchronizer.cs +169 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/OpenXml/ElementOrder.cs +80 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/OpenXml/NamespaceConstants.cs +42 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/OpenXml/RunMerger.cs +81 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/OpenXml/StyleAnalyzer.cs +81 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/OpenXml/TrackChangesHelper.cs +99 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/OpenXml/UnitConverter.cs +23 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Samples/AestheticRecipeSamples.cs +1832 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Samples/AestheticRecipeSamples_Batch1.cs +910 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Samples/AestheticRecipeSamples_Batch2.cs +999 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Samples/AestheticRecipeSamples_Batch3.cs +1048 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Samples/AestheticRecipeSamples_Batch4.cs +1038 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Samples/CharacterFormattingSamples.cs +1020 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Samples/DocumentCreationSamples.cs +1121 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Samples/FieldAndTocSamples.cs +624 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Samples/FootnoteAndCommentSamples.cs +675 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Samples/HeaderFooterSamples.cs +838 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Samples/ImageSamples.cs +917 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Samples/ListAndNumberingSamples.cs +826 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Samples/ParagraphFormattingSamples.cs +1199 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Samples/StyleSystemSamples.cs +1487 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Samples/TableSamples.cs +1163 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Samples/TrackChangesSamples.cs +595 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Typography/CjkHelper.cs +39 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Typography/FontDefaults.cs +24 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Typography/PageSizes.cs +20 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Validation/BusinessRuleValidator.cs +224 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Validation/GateCheckValidator.cs +148 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Validation/ValidationResult.cs +23 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Validation/XsdValidator.cs +69 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.slnx +4 -0
- package/templates/.agent/skills/minimax-docx/scripts/env_check.sh +196 -0
- package/templates/.agent/skills/minimax-docx/scripts/setup.ps1 +274 -0
- package/templates/.agent/skills/minimax-docx/scripts/setup.sh +504 -0
- package/templates/.agent/skills/minimax-multimodal-toolkit/SKILL.md +359 -0
- package/templates/.agent/skills/minimax-pdf/README.md +222 -0
- package/templates/.agent/skills/minimax-pdf/SKILL.md +201 -0
- package/templates/.agent/skills/minimax-pdf/design/design.md +381 -0
- package/templates/.agent/skills/minimax-pdf/scripts/cover.py +1579 -0
- package/templates/.agent/skills/minimax-pdf/scripts/fill_inspect.py +200 -0
- package/templates/.agent/skills/minimax-pdf/scripts/fill_write.py +242 -0
- package/templates/.agent/skills/minimax-pdf/scripts/make.sh +491 -0
- package/templates/.agent/skills/minimax-pdf/scripts/merge.py +112 -0
- package/templates/.agent/skills/minimax-pdf/scripts/palette.py +559 -0
- package/templates/.agent/skills/minimax-pdf/scripts/reformat_parse.py +374 -0
- package/templates/.agent/skills/minimax-pdf/scripts/render_body.py +1055 -0
- package/templates/.agent/skills/minimax-pdf/scripts/render_cover.cjs +111 -0
- package/templates/.agent/skills/minimax-xlsx/SKILL.md +138 -0
- package/templates/.agent/skills/minimax-xlsx/references/create.md +691 -0
- package/templates/.agent/skills/minimax-xlsx/references/edit.md +684 -0
- package/templates/.agent/skills/minimax-xlsx/references/fix.md +37 -0
- package/templates/.agent/skills/minimax-xlsx/references/format.md +768 -0
- package/templates/.agent/skills/minimax-xlsx/references/ooxml-cheatsheet.md +231 -0
- package/templates/.agent/skills/minimax-xlsx/references/read-analyze.md +97 -0
- package/templates/.agent/skills/minimax-xlsx/references/validate.md +772 -0
- package/templates/.agent/skills/minimax-xlsx/scripts/formula_check.py +422 -0
- package/templates/.agent/skills/minimax-xlsx/scripts/libreoffice_recalc.py +248 -0
- package/templates/.agent/skills/minimax-xlsx/scripts/shared_strings_builder.py +163 -0
- package/templates/.agent/skills/minimax-xlsx/scripts/style_audit.py +575 -0
- package/templates/.agent/skills/minimax-xlsx/scripts/xlsx_add_column.py +395 -0
- package/templates/.agent/skills/minimax-xlsx/scripts/xlsx_insert_row.py +274 -0
- package/templates/.agent/skills/minimax-xlsx/scripts/xlsx_pack.py +87 -0
- package/templates/.agent/skills/minimax-xlsx/scripts/xlsx_reader.py +362 -0
- package/templates/.agent/skills/minimax-xlsx/scripts/xlsx_shift_rows.py +396 -0
- package/templates/.agent/skills/minimax-xlsx/scripts/xlsx_unpack.py +130 -0
- package/templates/.agent/skills/minimax-xlsx/templates/minimal_xlsx/[Content_Types].xml +9 -0
- package/templates/.agent/skills/minimax-xlsx/templates/minimal_xlsx/_rels/.rels +6 -0
- package/templates/.agent/skills/minimax-xlsx/templates/minimal_xlsx/xl/_rels/workbook.xml.rels +19 -0
- package/templates/.agent/skills/minimax-xlsx/templates/minimal_xlsx/xl/sharedStrings.xml +33 -0
- package/templates/.agent/skills/minimax-xlsx/templates/minimal_xlsx/xl/styles.xml +160 -0
- package/templates/.agent/skills/minimax-xlsx/templates/minimal_xlsx/xl/workbook.xml +30 -0
- package/templates/.agent/skills/minimax-xlsx/templates/minimal_xlsx/xl/worksheets/sheet1.xml +70 -0
- package/templates/.agent/skills/mobile-design/SKILL.md +394 -0
- package/templates/.agent/skills/mobile-design/decision-trees.md +516 -0
- package/templates/.agent/skills/mobile-design/mobile-backend.md +491 -0
- package/templates/.agent/skills/mobile-design/mobile-color-system.md +420 -0
- package/templates/.agent/skills/mobile-design/mobile-debugging.md +122 -0
- package/templates/.agent/skills/mobile-design/mobile-design-thinking.md +357 -0
- package/templates/.agent/skills/mobile-design/mobile-navigation.md +458 -0
- package/templates/.agent/skills/mobile-design/mobile-performance.md +767 -0
- package/templates/.agent/skills/mobile-design/mobile-testing.md +356 -0
- package/templates/.agent/skills/mobile-design/mobile-typography.md +433 -0
- package/templates/.agent/skills/mobile-design/platform-android.md +666 -0
- package/templates/.agent/skills/mobile-design/platform-ios.md +561 -0
- package/templates/.agent/skills/mobile-design/scripts/mobile_audit.py +670 -0
- package/templates/.agent/skills/mobile-design/touch-psychology.md +537 -0
- package/templates/.agent/skills/nestjs-expert/SKILL.md +552 -0
- package/templates/.agent/skills/nextjs-best-practices/SKILL.md +203 -0
- package/templates/.agent/skills/nodejs-best-practices/SKILL.md +333 -0
- package/templates/.agent/skills/parallel-agents/SKILL.md +175 -0
- package/templates/.agent/skills/performance-profiling/SKILL.md +143 -0
- package/templates/.agent/skills/performance-profiling/scripts/lighthouse_audit.py +76 -0
- package/templates/.agent/skills/plan-writing/SKILL.md +152 -0
- package/templates/.agent/skills/powershell-windows/SKILL.md +167 -0
- package/templates/.agent/skills/ppc-advertising/SKILL.md +183 -475
- package/templates/.agent/skills/pptx-generator/SKILL.md +249 -0
- package/templates/.agent/skills/pptx-generator/references/design-system.md +392 -0
- package/templates/.agent/skills/pptx-generator/references/editing.md +162 -0
- package/templates/.agent/skills/pptx-generator/references/pitfalls.md +112 -0
- package/templates/.agent/skills/pptx-generator/references/pptxgenjs.md +420 -0
- package/templates/.agent/skills/pptx-generator/references/slide-types.md +413 -0
- package/templates/.agent/skills/prisma-expert/SKILL.md +355 -0
- package/templates/.agent/skills/python-patterns/SKILL.md +441 -0
- package/templates/.agent/skills/react-patterns/SKILL.md +198 -0
- package/templates/.agent/skills/red-team-tactics/SKILL.md +199 -0
- package/templates/.agent/skills/remotion-best-practices/SKILL.md +45 -111
- package/templates/.agent/skills/remotion-best-practices/rules/3d.md +4 -4
- package/templates/.agent/skills/remotion-best-practices/rules/animations.md +5 -7
- package/templates/.agent/skills/remotion-best-practices/rules/assets/charts-bar-chart.tsx +173 -0
- package/templates/.agent/skills/remotion-best-practices/rules/assets/text-animations-typewriter.tsx +100 -0
- package/templates/.agent/skills/remotion-best-practices/rules/assets/text-animations-word-highlight.tsx +103 -0
- package/templates/.agent/skills/remotion-best-practices/rules/assets.md +78 -0
- package/templates/.agent/skills/remotion-best-practices/rules/audio-visualization.md +198 -0
- package/templates/.agent/skills/remotion-best-practices/rules/audio.md +1 -4
- package/templates/.agent/skills/remotion-best-practices/rules/calculate-metadata.md +47 -17
- package/templates/.agent/skills/remotion-best-practices/rules/can-decode.md +75 -0
- package/templates/.agent/skills/remotion-best-practices/rules/charts.md +80 -48
- package/templates/.agent/skills/remotion-best-practices/rules/compositions.md +22 -14
- package/templates/.agent/skills/remotion-best-practices/rules/display-captions.md +79 -21
- package/templates/.agent/skills/remotion-best-practices/rules/extract-frames.md +229 -0
- package/templates/.agent/skills/remotion-best-practices/rules/ffmpeg.md +38 -0
- package/templates/.agent/skills/remotion-best-practices/rules/fonts.md +96 -54
- package/templates/.agent/skills/remotion-best-practices/rules/get-audio-duration.md +58 -0
- package/templates/.agent/skills/remotion-best-practices/rules/get-video-dimensions.md +68 -0
- package/templates/.agent/skills/remotion-best-practices/rules/get-video-duration.md +60 -0
- package/templates/.agent/skills/remotion-best-practices/rules/gifs.md +21 -18
- package/templates/.agent/skills/remotion-best-practices/rules/images.md +6 -2
- package/templates/.agent/skills/remotion-best-practices/rules/import-srt-captions.md +69 -0
- package/templates/.agent/skills/remotion-best-practices/rules/light-leaks.md +73 -0
- package/templates/.agent/skills/remotion-best-practices/rules/lottie.md +10 -7
- package/templates/.agent/skills/remotion-best-practices/rules/maps.md +412 -0
- package/templates/.agent/skills/remotion-best-practices/rules/measuring-dom-nodes.md +34 -0
- package/templates/.agent/skills/remotion-best-practices/rules/measuring-text.md +140 -0
- package/templates/.agent/skills/remotion-best-practices/rules/parameters.md +109 -0
- package/templates/.agent/skills/remotion-best-practices/rules/sequencing.md +13 -1
- package/templates/.agent/skills/remotion-best-practices/rules/sfx.md +26 -0
- package/templates/.agent/skills/remotion-best-practices/rules/subtitles.md +36 -0
- package/templates/.agent/skills/remotion-best-practices/rules/tailwind.md +11 -0
- package/templates/.agent/skills/remotion-best-practices/rules/text-animations.md +4 -115
- package/templates/.agent/skills/remotion-best-practices/rules/timing.md +19 -19
- package/templates/.agent/skills/remotion-best-practices/rules/transcribe-captions.md +70 -0
- package/templates/.agent/skills/remotion-best-practices/rules/transitions.md +117 -42
- package/templates/.agent/skills/remotion-best-practices/rules/transparent-videos.md +106 -0
- package/templates/.agent/skills/remotion-best-practices/rules/trimming.md +51 -0
- package/templates/.agent/skills/remotion-best-practices/rules/voiceover.md +99 -0
- package/templates/.agent/skills/seo-fundamentals/SKILL.md +83 -441
- package/templates/.agent/skills/seo-fundamentals/scripts/seo_checker.py +219 -0
- package/templates/.agent/skills/server-management/SKILL.md +161 -0
- package/templates/.agent/skills/systematic-debugging/SKILL.md +109 -0
- package/templates/.agent/skills/tdd-workflow/SKILL.md +149 -0
- package/templates/.agent/skills/testing-patterns/SKILL.md +178 -0
- package/templates/.agent/skills/testing-patterns/scripts/test_runner.py +219 -0
- package/templates/.agent/skills/tutorial-video-expert/SKILL.md +88 -0
- package/templates/.agent/skills/typescript-expert/SKILL.md +429 -0
- package/templates/.agent/skills/ui-ux-pro-max/SKILL.md +1 -1
- package/templates/.agent/skills/ui-ux-pro-max/data/charts.csv +26 -0
- package/templates/.agent/skills/ui-ux-pro-max/data/colors.csv +97 -0
- package/templates/.agent/skills/ui-ux-pro-max/data/icons.csv +101 -0
- package/templates/.agent/skills/ui-ux-pro-max/data/landing.csv +31 -0
- package/templates/.agent/skills/ui-ux-pro-max/data/products.csv +97 -0
- package/templates/.agent/skills/ui-ux-pro-max/data/prompts.csv +24 -0
- package/templates/.agent/skills/ui-ux-pro-max/data/react-performance.csv +45 -0
- package/templates/.agent/skills/ui-ux-pro-max/data/stacks/flutter.csv +53 -0
- package/templates/.agent/skills/ui-ux-pro-max/data/stacks/html-tailwind.csv +56 -0
- package/templates/.agent/skills/ui-ux-pro-max/data/stacks/nextjs.csv +53 -0
- package/templates/.agent/skills/ui-ux-pro-max/data/stacks/nuxt-ui.csv +51 -0
- package/templates/.agent/skills/ui-ux-pro-max/data/stacks/nuxtjs.csv +59 -0
- package/templates/.agent/skills/ui-ux-pro-max/data/stacks/react-native.csv +52 -0
- package/templates/.agent/skills/ui-ux-pro-max/data/stacks/react.csv +54 -0
- package/templates/.agent/skills/ui-ux-pro-max/data/stacks/shadcn.csv +61 -0
- package/templates/.agent/skills/ui-ux-pro-max/data/stacks/svelte.csv +54 -0
- package/templates/.agent/skills/ui-ux-pro-max/data/stacks/swiftui.csv +51 -0
- package/templates/.agent/skills/ui-ux-pro-max/data/stacks/vue.csv +50 -0
- package/templates/.agent/skills/ui-ux-pro-max/data/styles.csv +59 -0
- package/templates/.agent/skills/ui-ux-pro-max/data/typography.csv +58 -0
- package/templates/.agent/skills/ui-ux-pro-max/data/ui-reasoning.csv +101 -0
- package/templates/.agent/skills/ui-ux-pro-max/data/ux-guidelines.csv +100 -0
- package/templates/.agent/skills/ui-ux-pro-max/data/web-interface.csv +31 -0
- package/templates/.agent/skills/ui-ux-pro-max/scripts/core.py +257 -0
- package/templates/.agent/skills/ui-ux-pro-max/scripts/design_system.py +487 -0
- package/templates/.agent/skills/ui-ux-pro-max/scripts/search.py +76 -0
- package/templates/.agent/skills/vision-analysis/SKILL.md +174 -0
- package/templates/.agent/skills/vue-expert/SKILL.md +374 -0
- package/templates/.agent/skills/vulnerability-scanner/SKILL.md +276 -0
- package/templates/.agent/skills/vulnerability-scanner/checklists.md +121 -0
- package/templates/.agent/skills/vulnerability-scanner/scripts/security_scan.py +458 -0
- package/templates/.agent/skills/webapp-testing/SKILL.md +187 -0
- package/templates/.agent/skills/webapp-testing/scripts/playwright_runner.py +173 -0
- package/templates/.agent/workflows/analyze.md +3 -0
- package/templates/.agent/workflows/brainstorm.md +113 -0
- package/templates/.agent/workflows/brand-report.md +44 -0
- package/templates/.agent/workflows/create.md +59 -0
- package/templates/.agent/workflows/debug.md +103 -0
- package/templates/.agent/workflows/deploy.md +176 -0
- package/templates/.agent/workflows/enhance.md +63 -0
- package/templates/.agent/workflows/orchestrate.md +237 -0
- package/templates/.agent/workflows/plan.md +89 -0
- package/templates/.agent/workflows/preview.md +80 -0
- package/templates/.agent/workflows/report.md +49 -0
- package/templates/.agent/workflows/status.md +86 -0
- package/templates/.agent/workflows/test.md +144 -0
- package/templates/.agent/workflows/ui-ux-pro-max.md +231 -0
|
@@ -0,0 +1,504 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# minimax-docx Environment Setup & Initialization Script
|
|
3
|
+
# Supports: macOS (Homebrew), Linux (apt/dnf/pacman), WSL
|
|
4
|
+
# License: MIT
|
|
5
|
+
set -euo pipefail
|
|
6
|
+
|
|
7
|
+
# Force English output for dotnet CLI
|
|
8
|
+
export DOTNET_CLI_UI_LANGUAGE=en
|
|
9
|
+
|
|
10
|
+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
11
|
+
PROJECT_DIR="$(cd "$SCRIPT_DIR/.." && pwd)"
|
|
12
|
+
DOTNET_DIR="$SCRIPT_DIR/dotnet"
|
|
13
|
+
LOG_FILE="$PROJECT_DIR/.setup.log"
|
|
14
|
+
|
|
15
|
+
# --- Colors ---
|
|
16
|
+
RED='\033[0;31m'
|
|
17
|
+
GREEN='\033[0;32m'
|
|
18
|
+
YELLOW='\033[1;33m'
|
|
19
|
+
BLUE='\033[0;34m'
|
|
20
|
+
NC='\033[0m'
|
|
21
|
+
|
|
22
|
+
log() { echo -e "${GREEN}[OK]${NC} $*"; }
|
|
23
|
+
warn() { echo -e "${YELLOW}[WARN]${NC} $*"; }
|
|
24
|
+
fail() { echo -e "${RED}[FAIL]${NC} $*"; }
|
|
25
|
+
info() { echo -e "${BLUE}[INFO]${NC} $*"; }
|
|
26
|
+
step() { echo -e "\n${BLUE}=== $* ===${NC}"; }
|
|
27
|
+
|
|
28
|
+
# --- Detect OS & Package Manager ---
|
|
29
|
+
detect_platform() {
|
|
30
|
+
OS="unknown"
|
|
31
|
+
PKG_MGR="unknown"
|
|
32
|
+
ARCH="$(uname -m)"
|
|
33
|
+
|
|
34
|
+
case "$(uname -s)" in
|
|
35
|
+
Darwin)
|
|
36
|
+
OS="macos"
|
|
37
|
+
if command -v brew &>/dev/null; then
|
|
38
|
+
PKG_MGR="brew"
|
|
39
|
+
else
|
|
40
|
+
PKG_MGR="none"
|
|
41
|
+
fi
|
|
42
|
+
;;
|
|
43
|
+
Linux)
|
|
44
|
+
OS="linux"
|
|
45
|
+
if [ -f /etc/os-release ]; then
|
|
46
|
+
. /etc/os-release
|
|
47
|
+
case "$ID" in
|
|
48
|
+
ubuntu|debian|linuxmint|pop)
|
|
49
|
+
PKG_MGR="apt"
|
|
50
|
+
;;
|
|
51
|
+
fedora|rhel|centos|rocky|alma)
|
|
52
|
+
PKG_MGR="dnf"
|
|
53
|
+
;;
|
|
54
|
+
arch|manjaro|endeavouros)
|
|
55
|
+
PKG_MGR="pacman"
|
|
56
|
+
;;
|
|
57
|
+
opensuse*|sles)
|
|
58
|
+
PKG_MGR="zypper"
|
|
59
|
+
;;
|
|
60
|
+
alpine)
|
|
61
|
+
PKG_MGR="apk"
|
|
62
|
+
;;
|
|
63
|
+
*)
|
|
64
|
+
PKG_MGR="unknown"
|
|
65
|
+
;;
|
|
66
|
+
esac
|
|
67
|
+
fi
|
|
68
|
+
# Detect WSL
|
|
69
|
+
if grep -qi microsoft /proc/version 2>/dev/null; then
|
|
70
|
+
OS="wsl"
|
|
71
|
+
fi
|
|
72
|
+
;;
|
|
73
|
+
MINGW*|MSYS*|CYGWIN*)
|
|
74
|
+
OS="windows-git-bash"
|
|
75
|
+
PKG_MGR="none"
|
|
76
|
+
;;
|
|
77
|
+
esac
|
|
78
|
+
|
|
79
|
+
echo "Platform: $OS ($ARCH), Package Manager: $PKG_MGR"
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
# --- .NET SDK Installation ---
|
|
83
|
+
install_dotnet() {
|
|
84
|
+
step "Checking .NET SDK"
|
|
85
|
+
|
|
86
|
+
if command -v dotnet &>/dev/null; then
|
|
87
|
+
local ver
|
|
88
|
+
ver=$(dotnet --version 2>/dev/null || echo "0")
|
|
89
|
+
local major="${ver%%.*}"
|
|
90
|
+
if [ "$major" -ge 8 ] 2>/dev/null; then
|
|
91
|
+
log "dotnet $ver already installed (>= 8.0 OK)"
|
|
92
|
+
return 0
|
|
93
|
+
else
|
|
94
|
+
warn "dotnet $ver found but < 8.0, upgrading..."
|
|
95
|
+
fi
|
|
96
|
+
fi
|
|
97
|
+
|
|
98
|
+
info "Installing .NET SDK..."
|
|
99
|
+
case "$PKG_MGR" in
|
|
100
|
+
brew)
|
|
101
|
+
brew install --cask dotnet-sdk
|
|
102
|
+
;;
|
|
103
|
+
apt)
|
|
104
|
+
# Microsoft package repo for Ubuntu/Debian
|
|
105
|
+
if ! dpkg -l dotnet-sdk-8.0 &>/dev/null 2>&1; then
|
|
106
|
+
info "Adding Microsoft package repository..."
|
|
107
|
+
sudo apt-get update -qq
|
|
108
|
+
sudo apt-get install -y -qq wget apt-transport-https
|
|
109
|
+
wget -q "https://dot.net/v1/dotnet-install.sh" -O /tmp/dotnet-install.sh
|
|
110
|
+
chmod +x /tmp/dotnet-install.sh
|
|
111
|
+
/tmp/dotnet-install.sh --channel 8.0 --install-dir "$HOME/.dotnet"
|
|
112
|
+
export PATH="$HOME/.dotnet:$PATH"
|
|
113
|
+
echo 'export PATH="$HOME/.dotnet:$PATH"' >> "$HOME/.bashrc"
|
|
114
|
+
fi
|
|
115
|
+
;;
|
|
116
|
+
dnf)
|
|
117
|
+
sudo dnf install -y dotnet-sdk-8.0
|
|
118
|
+
;;
|
|
119
|
+
pacman)
|
|
120
|
+
sudo pacman -S --noconfirm dotnet-sdk
|
|
121
|
+
;;
|
|
122
|
+
zypper)
|
|
123
|
+
sudo zypper install -y dotnet-sdk-8.0
|
|
124
|
+
;;
|
|
125
|
+
apk)
|
|
126
|
+
apk add --no-cache dotnet8-sdk
|
|
127
|
+
;;
|
|
128
|
+
none)
|
|
129
|
+
if [ "$OS" = "windows-git-bash" ]; then
|
|
130
|
+
fail "On Windows, install .NET SDK from: https://dotnet.microsoft.com/download"
|
|
131
|
+
fail "Then restart your terminal and re-run this script."
|
|
132
|
+
return 1
|
|
133
|
+
fi
|
|
134
|
+
# Fallback: use Microsoft install script
|
|
135
|
+
info "Using Microsoft install script..."
|
|
136
|
+
wget -q "https://dot.net/v1/dotnet-install.sh" -O /tmp/dotnet-install.sh || \
|
|
137
|
+
curl -sSL "https://dot.net/v1/dotnet-install.sh" -o /tmp/dotnet-install.sh
|
|
138
|
+
chmod +x /tmp/dotnet-install.sh
|
|
139
|
+
/tmp/dotnet-install.sh --channel 8.0 --install-dir "$HOME/.dotnet"
|
|
140
|
+
export PATH="$HOME/.dotnet:$PATH"
|
|
141
|
+
echo 'export PATH="$HOME/.dotnet:$PATH"' >> "$HOME/.bashrc"
|
|
142
|
+
;;
|
|
143
|
+
*)
|
|
144
|
+
warn "Unknown package manager. Install .NET SDK manually: https://dotnet.microsoft.com/download"
|
|
145
|
+
return 1
|
|
146
|
+
;;
|
|
147
|
+
esac
|
|
148
|
+
|
|
149
|
+
# Verify
|
|
150
|
+
if command -v dotnet &>/dev/null; then
|
|
151
|
+
log "dotnet $(dotnet --version) installed"
|
|
152
|
+
else
|
|
153
|
+
fail "dotnet installation failed. Install manually: https://dotnet.microsoft.com/download"
|
|
154
|
+
return 1
|
|
155
|
+
fi
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
# --- Pandoc Installation (Optional) ---
|
|
159
|
+
install_pandoc() {
|
|
160
|
+
step "Checking pandoc (optional: content preview)"
|
|
161
|
+
|
|
162
|
+
if command -v pandoc &>/dev/null; then
|
|
163
|
+
log "pandoc $(pandoc --version | head -1 | grep -oE '[0-9]+\.[0-9]+(\.[0-9]+)?') already installed"
|
|
164
|
+
return 0
|
|
165
|
+
fi
|
|
166
|
+
|
|
167
|
+
info "Installing pandoc..."
|
|
168
|
+
case "$PKG_MGR" in
|
|
169
|
+
brew) brew install pandoc ;;
|
|
170
|
+
apt) sudo apt-get install -y -qq pandoc ;;
|
|
171
|
+
dnf) sudo dnf install -y pandoc ;;
|
|
172
|
+
pacman) sudo pacman -S --noconfirm pandoc ;;
|
|
173
|
+
zypper) sudo zypper install -y pandoc ;;
|
|
174
|
+
apk) apk add --no-cache pandoc ;;
|
|
175
|
+
*)
|
|
176
|
+
warn "Cannot auto-install pandoc. Install manually: https://pandoc.org/installing.html"
|
|
177
|
+
return 0
|
|
178
|
+
;;
|
|
179
|
+
esac
|
|
180
|
+
|
|
181
|
+
if command -v pandoc &>/dev/null; then
|
|
182
|
+
log "pandoc installed"
|
|
183
|
+
else
|
|
184
|
+
warn "pandoc installation failed (optional, will degrade gracefully)"
|
|
185
|
+
fi
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
# --- LibreOffice Installation (Optional) ---
|
|
189
|
+
install_soffice() {
|
|
190
|
+
step "Checking LibreOffice/soffice (optional: .doc conversion)"
|
|
191
|
+
|
|
192
|
+
if command -v soffice &>/dev/null; then
|
|
193
|
+
log "soffice already installed"
|
|
194
|
+
return 0
|
|
195
|
+
fi
|
|
196
|
+
|
|
197
|
+
# Also check common install paths
|
|
198
|
+
local soffice_paths=(
|
|
199
|
+
"/usr/bin/soffice"
|
|
200
|
+
"/usr/local/bin/soffice"
|
|
201
|
+
"/opt/libreoffice/program/soffice"
|
|
202
|
+
"/snap/bin/libreoffice"
|
|
203
|
+
"/Applications/LibreOffice.app/Contents/MacOS/soffice"
|
|
204
|
+
)
|
|
205
|
+
for p in "${soffice_paths[@]}"; do
|
|
206
|
+
if [ -x "$p" ]; then
|
|
207
|
+
log "soffice found at $p"
|
|
208
|
+
if [ "$OS" = "macos" ] && [ "$p" = "/Applications/LibreOffice.app/Contents/MacOS/soffice" ]; then
|
|
209
|
+
info "Tip: Add to PATH: ln -s '$p' /usr/local/bin/soffice"
|
|
210
|
+
fi
|
|
211
|
+
return 0
|
|
212
|
+
fi
|
|
213
|
+
done
|
|
214
|
+
|
|
215
|
+
info "Installing LibreOffice (this may take a while)..."
|
|
216
|
+
case "$PKG_MGR" in
|
|
217
|
+
brew) brew install --cask libreoffice ;;
|
|
218
|
+
apt) sudo apt-get install -y -qq libreoffice-core ;;
|
|
219
|
+
dnf) sudo dnf install -y libreoffice-core ;;
|
|
220
|
+
pacman) sudo pacman -S --noconfirm libreoffice-still ;;
|
|
221
|
+
zypper) sudo zypper install -y libreoffice ;;
|
|
222
|
+
apk) apk add --no-cache libreoffice ;;
|
|
223
|
+
*)
|
|
224
|
+
warn "Cannot auto-install LibreOffice. Install manually: https://www.libreoffice.org/download/"
|
|
225
|
+
return 0
|
|
226
|
+
;;
|
|
227
|
+
esac
|
|
228
|
+
|
|
229
|
+
if command -v soffice &>/dev/null; then
|
|
230
|
+
log "soffice installed"
|
|
231
|
+
else
|
|
232
|
+
warn "soffice not found after install (optional, .doc conversion unavailable)"
|
|
233
|
+
fi
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
# --- zip/unzip ---
|
|
237
|
+
install_zip_tools() {
|
|
238
|
+
step "Checking zip/unzip"
|
|
239
|
+
|
|
240
|
+
local need_zip=false need_unzip=false
|
|
241
|
+
command -v zip &>/dev/null && log "zip already installed" || need_zip=true
|
|
242
|
+
command -v unzip &>/dev/null && log "unzip already installed" || need_unzip=true
|
|
243
|
+
|
|
244
|
+
if ! $need_zip && ! $need_unzip; then
|
|
245
|
+
return 0
|
|
246
|
+
fi
|
|
247
|
+
|
|
248
|
+
info "Installing zip/unzip..."
|
|
249
|
+
case "$PKG_MGR" in
|
|
250
|
+
brew) brew install zip unzip 2>/dev/null || true ;;
|
|
251
|
+
apt) sudo apt-get install -y -qq zip unzip ;;
|
|
252
|
+
dnf) sudo dnf install -y zip unzip ;;
|
|
253
|
+
pacman) sudo pacman -S --noconfirm zip unzip ;;
|
|
254
|
+
zypper) sudo zypper install -y zip unzip ;;
|
|
255
|
+
apk) apk add --no-cache zip unzip ;;
|
|
256
|
+
*) warn "Install zip/unzip manually (optional, .NET handles DOCX natively)" ;;
|
|
257
|
+
esac
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
# --- .NET Project Build ---
|
|
261
|
+
build_project() {
|
|
262
|
+
step "Building minimax-docx .NET project"
|
|
263
|
+
|
|
264
|
+
if [ ! -d "$DOTNET_DIR" ]; then
|
|
265
|
+
fail "Dotnet project directory not found: $DOTNET_DIR"
|
|
266
|
+
return 1
|
|
267
|
+
fi
|
|
268
|
+
|
|
269
|
+
cd "$DOTNET_DIR"
|
|
270
|
+
|
|
271
|
+
info "Restoring NuGet packages..."
|
|
272
|
+
if ! dotnet restore --verbosity quiet 2>>"$LOG_FILE"; then
|
|
273
|
+
fail "NuGet restore failed. Check network and $LOG_FILE for details."
|
|
274
|
+
fail "Common causes:"
|
|
275
|
+
fail " - No internet access (NuGet needs to download packages)"
|
|
276
|
+
fail " - Corporate proxy blocking nuget.org"
|
|
277
|
+
fail " - Disk space insufficient"
|
|
278
|
+
echo ""
|
|
279
|
+
fail "Try manually: cd $DOTNET_DIR && dotnet restore --verbosity detailed"
|
|
280
|
+
return 1
|
|
281
|
+
fi
|
|
282
|
+
log "NuGet packages restored"
|
|
283
|
+
|
|
284
|
+
info "Building project..."
|
|
285
|
+
if ! dotnet build --verbosity quiet --no-restore 2>>"$LOG_FILE"; then
|
|
286
|
+
fail "Build failed. Check $LOG_FILE for details."
|
|
287
|
+
fail "Try manually: cd $DOTNET_DIR && dotnet build --verbosity normal"
|
|
288
|
+
return 1
|
|
289
|
+
fi
|
|
290
|
+
log "Project built successfully"
|
|
291
|
+
|
|
292
|
+
cd "$PROJECT_DIR"
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
# --- Shell Script Permissions ---
|
|
296
|
+
fix_permissions() {
|
|
297
|
+
step "Setting script permissions"
|
|
298
|
+
|
|
299
|
+
local scripts=(
|
|
300
|
+
"$SCRIPT_DIR/env_check.sh"
|
|
301
|
+
"$SCRIPT_DIR/docx_preview.sh"
|
|
302
|
+
"$SCRIPT_DIR/doc_to_docx.sh"
|
|
303
|
+
"$SCRIPT_DIR/setup.sh"
|
|
304
|
+
)
|
|
305
|
+
|
|
306
|
+
for s in "${scripts[@]}"; do
|
|
307
|
+
if [ -f "$s" ]; then
|
|
308
|
+
chmod +x "$s"
|
|
309
|
+
log "chmod +x $(basename "$s")"
|
|
310
|
+
fi
|
|
311
|
+
done
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
# --- NuGet Proxy / Certificate Issues (Corporate Environments) ---
|
|
315
|
+
check_nuget_config() {
|
|
316
|
+
step "Checking NuGet configuration"
|
|
317
|
+
|
|
318
|
+
local nuget_config="$HOME/.nuget/NuGet/NuGet.Config"
|
|
319
|
+
if [ -f "$nuget_config" ]; then
|
|
320
|
+
log "NuGet config exists: $nuget_config"
|
|
321
|
+
else
|
|
322
|
+
info "No custom NuGet config found (using defaults)"
|
|
323
|
+
fi
|
|
324
|
+
|
|
325
|
+
# Test NuGet connectivity
|
|
326
|
+
if dotnet nuget list source 2>/dev/null | grep -q "nuget.org"; then
|
|
327
|
+
log "nuget.org source is configured"
|
|
328
|
+
else
|
|
329
|
+
warn "nuget.org not in sources. Adding..."
|
|
330
|
+
dotnet nuget add source "https://api.nuget.org/v3/index.json" --name "nuget.org" 2>/dev/null || true
|
|
331
|
+
fi
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
# --- Locale / Encoding Check ---
|
|
335
|
+
check_locale() {
|
|
336
|
+
step "Checking locale and encoding"
|
|
337
|
+
|
|
338
|
+
local current_lang="${LANG:-not set}"
|
|
339
|
+
local current_lc="${LC_ALL:-not set}"
|
|
340
|
+
|
|
341
|
+
if echo "$current_lang" | grep -qi "utf-8\|utf8"; then
|
|
342
|
+
log "Locale supports UTF-8: LANG=$current_lang"
|
|
343
|
+
else
|
|
344
|
+
warn "Locale may not support UTF-8: LANG=$current_lang"
|
|
345
|
+
warn "CJK document processing requires UTF-8. Set: export LANG=en_US.UTF-8"
|
|
346
|
+
if [ "$OS" = "linux" ] || [ "$OS" = "wsl" ]; then
|
|
347
|
+
info "To fix permanently: sudo locale-gen en_US.UTF-8 && sudo update-locale LANG=en_US.UTF-8"
|
|
348
|
+
fi
|
|
349
|
+
fi
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
# --- Font Check (for CJK and professional documents) ---
|
|
353
|
+
check_fonts() {
|
|
354
|
+
step "Checking fonts for document rendering"
|
|
355
|
+
|
|
356
|
+
if [ "$OS" = "macos" ]; then
|
|
357
|
+
# macOS has good CJK support built-in
|
|
358
|
+
log "macOS: built-in CJK font support (PingFang, Hiragino, Apple SD Gothic)"
|
|
359
|
+
log "macOS: built-in Western fonts (Helvetica, Times, Calibri via Office)"
|
|
360
|
+
if [ -d "/Applications/Microsoft Word.app" ] || [ -d "/Applications/Microsoft Office" ]; then
|
|
361
|
+
log "Microsoft Office fonts available (Calibri, Cambria, etc.)"
|
|
362
|
+
else
|
|
363
|
+
warn "Microsoft Office not installed — Calibri/Cambria fonts may be missing"
|
|
364
|
+
info "Documents will render with fallback fonts on this machine"
|
|
365
|
+
info "Recipients with Office installed will see correct fonts"
|
|
366
|
+
fi
|
|
367
|
+
elif [ "$OS" = "linux" ] || [ "$OS" = "wsl" ]; then
|
|
368
|
+
# Check for key font packages
|
|
369
|
+
local missing_fonts=()
|
|
370
|
+
|
|
371
|
+
if ! fc-list 2>/dev/null | grep -qi "liberation\|times new roman\|calibri"; then
|
|
372
|
+
missing_fonts+=("Western: liberation-fonts or msttcorefonts")
|
|
373
|
+
fi
|
|
374
|
+
|
|
375
|
+
if ! fc-list 2>/dev/null | grep -qi "noto.*cjk\|wqy\|simsun\|pingfang"; then
|
|
376
|
+
missing_fonts+=("CJK: noto-fonts-cjk or wqy-microhei")
|
|
377
|
+
fi
|
|
378
|
+
|
|
379
|
+
if [ ${#missing_fonts[@]} -eq 0 ]; then
|
|
380
|
+
log "Font support looks good"
|
|
381
|
+
else
|
|
382
|
+
warn "Missing fonts may affect document rendering:"
|
|
383
|
+
for f in "${missing_fonts[@]}"; do
|
|
384
|
+
warn " - $f"
|
|
385
|
+
done
|
|
386
|
+
info "Install fonts:"
|
|
387
|
+
case "$PKG_MGR" in
|
|
388
|
+
apt)
|
|
389
|
+
info " sudo apt-get install -y fonts-liberation fonts-noto-cjk"
|
|
390
|
+
info " # For MS core fonts: sudo apt-get install -y ttf-mscorefonts-installer"
|
|
391
|
+
;;
|
|
392
|
+
dnf)
|
|
393
|
+
info " sudo dnf install -y liberation-fonts google-noto-sans-cjk-fonts"
|
|
394
|
+
;;
|
|
395
|
+
pacman)
|
|
396
|
+
info " sudo pacman -S ttf-liberation noto-fonts-cjk"
|
|
397
|
+
;;
|
|
398
|
+
*)
|
|
399
|
+
info " Install Liberation Fonts and Noto CJK fonts for your distribution"
|
|
400
|
+
;;
|
|
401
|
+
esac
|
|
402
|
+
fi
|
|
403
|
+
fi
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
# --- Verification Run ---
|
|
407
|
+
verify_installation() {
|
|
408
|
+
step "Verification Test"
|
|
409
|
+
|
|
410
|
+
local test_output="/tmp/minimax-docx-setup-test-$$.docx"
|
|
411
|
+
|
|
412
|
+
info "Creating a test document..."
|
|
413
|
+
if cd "$DOTNET_DIR" && dotnet run --project MiniMaxAIDocx.Cli -- create \
|
|
414
|
+
--type report --output "$test_output" --title "Setup Test" 2>>"$LOG_FILE"; then
|
|
415
|
+
log "Test document created: $test_output"
|
|
416
|
+
|
|
417
|
+
# Try preview
|
|
418
|
+
if command -v pandoc &>/dev/null; then
|
|
419
|
+
local preview
|
|
420
|
+
preview=$(pandoc -f docx -t plain "$test_output" 2>/dev/null | head -5)
|
|
421
|
+
if [ -n "$preview" ]; then
|
|
422
|
+
log "Preview working: \"$preview\""
|
|
423
|
+
fi
|
|
424
|
+
fi
|
|
425
|
+
|
|
426
|
+
# Cleanup
|
|
427
|
+
rm -f "$test_output"
|
|
428
|
+
log "Test passed — minimax-docx is ready to use!"
|
|
429
|
+
else
|
|
430
|
+
fail "Test document creation failed. Check $LOG_FILE for details."
|
|
431
|
+
return 1
|
|
432
|
+
fi
|
|
433
|
+
|
|
434
|
+
cd "$PROJECT_DIR"
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
# --- Summary ---
|
|
438
|
+
print_summary() {
|
|
439
|
+
step "Setup Complete"
|
|
440
|
+
|
|
441
|
+
echo ""
|
|
442
|
+
echo " Environment: $OS ($ARCH)"
|
|
443
|
+
echo " .NET SDK: $(dotnet --version 2>/dev/null || echo 'NOT FOUND')"
|
|
444
|
+
echo " pandoc: $(pandoc --version 2>/dev/null | head -1 | grep -oE '[0-9]+\.[0-9]+(\.[0-9]+)?' || echo 'not installed (optional)')"
|
|
445
|
+
echo " soffice: $(soffice --version 2>/dev/null | grep -oE '[0-9]+\.[0-9]+(\.[0-9]+)?' || echo 'not installed (optional)')"
|
|
446
|
+
echo " Project: $DOTNET_DIR"
|
|
447
|
+
echo ""
|
|
448
|
+
echo " Usage:"
|
|
449
|
+
echo " dotnet run --project $DOTNET_DIR/MiniMaxAIDocx.Cli -- create --type report --output my_report.docx"
|
|
450
|
+
echo " bash $SCRIPT_DIR/env_check.sh # Quick environment check"
|
|
451
|
+
echo ""
|
|
452
|
+
echo " Log file: $LOG_FILE"
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
# --- Main ---
|
|
456
|
+
main() {
|
|
457
|
+
echo "============================================"
|
|
458
|
+
echo " minimax-docx Setup & Initialization"
|
|
459
|
+
echo " $(date '+%Y-%m-%d %H:%M:%S')"
|
|
460
|
+
echo "============================================"
|
|
461
|
+
|
|
462
|
+
: > "$LOG_FILE" # Clear log
|
|
463
|
+
|
|
464
|
+
detect_platform
|
|
465
|
+
|
|
466
|
+
# Parse arguments
|
|
467
|
+
local SKIP_OPTIONAL=false
|
|
468
|
+
local SKIP_VERIFY=false
|
|
469
|
+
for arg in "$@"; do
|
|
470
|
+
case "$arg" in
|
|
471
|
+
--minimal) SKIP_OPTIONAL=true ;;
|
|
472
|
+
--skip-verify) SKIP_VERIFY=true ;;
|
|
473
|
+
--help|-h)
|
|
474
|
+
echo "Usage: setup.sh [options]"
|
|
475
|
+
echo " --minimal Only install critical dependencies (skip pandoc, soffice, fonts)"
|
|
476
|
+
echo " --skip-verify Skip the verification test at the end"
|
|
477
|
+
echo " --help Show this help"
|
|
478
|
+
exit 0
|
|
479
|
+
;;
|
|
480
|
+
esac
|
|
481
|
+
done
|
|
482
|
+
|
|
483
|
+
install_dotnet
|
|
484
|
+
install_zip_tools
|
|
485
|
+
|
|
486
|
+
if ! $SKIP_OPTIONAL; then
|
|
487
|
+
install_pandoc
|
|
488
|
+
install_soffice
|
|
489
|
+
check_fonts
|
|
490
|
+
fi
|
|
491
|
+
|
|
492
|
+
check_locale
|
|
493
|
+
check_nuget_config
|
|
494
|
+
fix_permissions
|
|
495
|
+
build_project
|
|
496
|
+
|
|
497
|
+
if ! $SKIP_VERIFY; then
|
|
498
|
+
verify_installation
|
|
499
|
+
fi
|
|
500
|
+
|
|
501
|
+
print_summary
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
main "$@"
|