AI Sales Script Generator
Run ID: 69cc6afd3e7fb09ff16a1b342026-04-01Business
PantheraHive BOS
BOS Dashboard

Generate conversion-optimized sales scripts for cold calls, demos, follow-ups, and objection handling with industry-specific language.

AI Sales Script Generator: Comprehensive Marketing Strategy

This document outlines a comprehensive marketing strategy for the "AI Sales Script Generator," focusing on target audience analysis, channel recommendations, a robust messaging framework, and key performance indicators (KPIs) to measure success. Our goal is to position the product as an indispensable tool for sales leaders seeking to optimize conversion rates, standardize sales excellence, and empower their teams with data-driven, industry-specific scripts.


1. Target Audience Analysis

Understanding our target audience is paramount to crafting effective marketing campaigns. We've identified primary and secondary audiences, their demographics, psychographics, and key pain points.

1.1. Primary Target Audience (Decision Makers & Influencers)

  • Sales Managers/Directors:

* Role: Responsible for team performance, training, script adherence, and achieving sales quotas.

* Company Size: Mid-market to Enterprise.

* Pain Points: Inconsistent team messaging, long ramp-up times for new reps, low conversion rates on specific calls/stages, difficulty scaling best practices, time-consuming manual script creation and updates, lack of data to optimize scripts.

* Goals: Increase team efficiency, improve conversion rates, reduce training overhead, ensure message consistency, empower reps with effective communication tools.

  • Heads of Sales/VP Sales:

* Role: Strategic oversight of sales operations, revenue growth, sales technology adoption, competitive advantage.

* Company Size: Enterprise, rapidly scaling SMBs.

* Pain Points: Unpredictable revenue growth, high CAC, inability to quickly adapt messaging to market changes, lack of a scalable sales communication framework, ensuring brand voice consistency across all sales touchpoints.

* Goals: Drive predictable revenue, optimize sales ROI, reduce sales cycle, gain a competitive edge through superior sales execution.

  • Sales Enablement Professionals:

* Role: Equipping sales teams with the right content, tools, training, and processes to improve performance.

* Company Size: Mid-market to Enterprise.

* Pain Points: Difficulty in distributing and updating sales content (including scripts), lack of tools for personalized coaching, measuring script effectiveness, ensuring reps utilize approved messaging.

* Goals: Streamline content management, improve sales training efficacy, provide reps with on-demand, effective resources, measure the impact of enablement initiatives.

1.2. Secondary Target Audience (End-Users & Potential Buyers in Smaller Organizations)

  • Individual Sales Representatives (SDRs/BDRs/AEs):

* Role: Front-line sales, responsible for prospecting, qualification, demos, and closing.

* Pain Points: Fear of cold calling, struggling with objections, lack of confidence in messaging, difficulty personalizing outreach, time spent crafting emails/scripts instead of selling.

* Goals: Close more deals, increase confidence, reduce stress, save time on preparation, improve personalization.

  • Founders/CEOs of Startups & SMBs:

* Role: Often wear multiple hats, including leading initial sales efforts.

* Pain Points: Limited sales resources, need for rapid sales process development, lack of expertise in crafting high-converting sales scripts, budget constraints for large sales teams.

* Goals: Build a scalable sales process quickly, achieve early revenue targets, maximize efficiency with limited resources.

1.3. Key Psychographics Across Audiences:

  • Results-Oriented: Driven by measurable improvements in sales performance.
  • Tech-Savvy: Open to adopting innovative AI solutions to gain an advantage.
  • Efficiency-Minded: Seek tools that save time, reduce manual effort, and automate repetitive tasks.
  • Data-Driven: Value insights and analytics to inform decisions and optimize strategies.
  • Growth-Focused: Constantly looking for ways to scale operations and expand market reach.

2. Channel Recommendations

To effectively reach our target audience, a multi-channel approach combining inbound and outbound strategies is recommended.

2.1. Digital Marketing Channels

  • Search Engine Optimization (SEO) & Content Marketing:

* Strategy: Create high-value, educational content that addresses the pain points and goals of sales leaders.

* Content Types:

* Blog Posts: "How AI is Revolutionizing Cold Calling," "The Ultimate Guide to Objection Handling with AI," "5 Ways to Boost Sales Conversion Rates with Dynamic Scripts."

* Whitepapers/eBooks: "The Future of Sales Communication: An AI Perspective," "Building a High-Converting Sales Script Library."

* Case Studies: Detail success stories with quantifiable results (e.g., "Company X Increased Demo-to-Close Rate by 15% Using AI Scripts

gemini Output

AI Sales Script Generator: Your Blueprint for Sales Success

Introduction

Welcome to the AI Sales Script Generator, a cutting-edge solution designed to revolutionize your sales communication. In today's competitive landscape, generic sales pitches fall flat. Our generator leverages advanced AI to craft highly effective, conversion-optimized sales scripts tailored to your specific needs, industry, and target audience. Whether you're making initial contact, demonstrating value, nurturing leads, or navigating objections, our tool provides the strategic language necessary to engage prospects, build rapport, and close deals more efficiently.

Key Features & Benefits

Our AI Sales Script Generator is built to empower your sales team with precision-engineered communication.

1. Conversion-Optimized Language

  • Data-Driven Persuasion: Scripts are developed using insights from successful sales strategies and psychological principles, focusing on language that resonates and motivates action.
  • Clear Value Proposition: Each script emphasizes your unique selling points and articulates clear benefits, ensuring prospects understand "what's in it for them."
  • Strong Calls-to-Action (CTAs): Scripts include compelling and unambiguous CTAs designed to guide prospects seamlessly to the next stage of the sales funnel.

2. Scenario-Specific Script Generation

  • Cold Call Scripts: Crafted to grab attention quickly, qualify leads efficiently, and secure initial interest or meetings, overcoming initial resistance.
  • Demo Presentation Scripts: Structured to highlight key features, demonstrate value effectively, and address potential pain points, leading to deeper engagement.
  • Follow-Up Scripts: Designed for various stages of the sales cycle, from post-meeting thank-yous to re-engagement efforts, maintaining momentum and nurturing relationships.
  • Objection Handling Frameworks: Provides pre-vetted responses and strategic approaches to common objections (e.g., price, timing, competition, need), turning potential roadblocks into opportunities.

3. Industry-Specific Language Adaptation

  • Tailored Terminology: The AI incorporates industry-specific jargon, challenges, and solutions, ensuring your scripts sound authentic and knowledgeable to your target market.
  • Relevant Use Cases: Scripts are embedded with examples and scenarios directly relevant to your industry, making your pitch highly relatable and impactful.
  • Competitor Awareness: Optionally integrates insights about your industry landscape and competitors to position your offering strategically.

4. Customization & Personalization at Scale

  • Dynamic Placeholders: Scripts are generated with customizable sections and placeholders, allowing your sales team to easily insert prospect-specific details (name, company, specific needs) for a personalized touch.
  • Tone & Style Adjustment: You can specify the desired tone (e.g., formal, conversational, empathetic, direct) to align with your brand voice and sales strategy.
  • Audience Segmentation: Scripts can be adapted for different buyer personas or decision-makers within an organization, addressing their unique concerns and motivations.

5. Enhanced Efficiency & Scalability

  • Rapid Script Generation: Quickly produce multiple script variations for various scenarios or A/B testing, significantly reducing the time spent on manual script writing.
  • Consistent Messaging: Ensures all sales representatives deliver a consistent, high-quality message aligned with your brand, regardless of their individual experience level.
  • Training & Onboarding: Provides a valuable resource for onboarding new sales hires, equipping them with proven communication frameworks from day one.

How It Works: Your Input, Our Intelligent Output

The process is straightforward and designed for maximum impact with minimal effort on your part.

  1. Define Your Goal: Clearly state the purpose of the script (e.g., book a demo, qualify a lead, overcome a price objection).
  2. Provide Key Information:

* Your Product/Service: Key features, benefits, and unique selling proposition (USP).

* Target Audience: Buyer persona details, pain points, desired outcomes.

* Industry: Specific sector or niche (e.g., SaaS, Healthcare, Manufacturing).

* Scenario: Choose from cold call, demo, follow-up, or objection handling.

* Desired Tone: (e.g., professional, friendly, urgent, consultative).

* Specific Context: Any additional details relevant to the interaction.

  1. AI Processing: Our Gemini-powered engine analyzes your input, cross-references best practices, and intelligently synthesizes a conversion-optimized script.
  2. Receive & Refine: You receive a detailed script, ready for immediate use. You can then review, make minor tweaks, and integrate it into your sales workflow.

Deliverables: What You Receive

For each script generation request, you will receive a comprehensive output designed for immediate applicability:

  • Full Script Template: A complete, ready-to-use script structured for optimal flow and impact.
  • Key Talking Points: A summary of the most important messages and benefits to convey.
  • Strategic Opening & Closing Lines: Engaging introductions and powerful calls-to-action.
  • Anticipated Objection Handling Frameworks: Proactive responses and strategies for common objections relevant to the scenario and industry.
  • Customization Guidelines: Instructions on how to personalize the script effectively for individual prospects.
  • Recommended Tone & Delivery Tips: Suggestions for vocal inflection, pacing, and overall delivery to maximize impact.

Example Use Cases

  • SaaS Company: Generate a cold call script for IT managers, highlighting how their new cybersecurity solution reduces data breaches, followed by a demo script focusing on real-time threat detection and compliance reporting.
  • Healthcare Provider: Create a follow-up script for patients who inquired about a new service, emphasizing patient benefits and ease of scheduling, along with an objection handling framework for insurance concerns.
  • Financial Advisor: Develop a script for a second meeting with a prospective client, detailing investment strategies and addressing common objections like "I need to think about it" or "Your fees are too high."
  • Manufacturing Supplier: Produce a script for re-engaging past clients, offering new product lines and addressing potential objections related to previous service experiences.

Getting Started

Ready to elevate your sales conversations? Provide the necessary details for your specific sales scenario, and let our AI Sales Script Generator craft the compelling language that drives results. Your next successful sale is just a script away.

gemini Output

AI Sales Script Generator: Your Conversion-Optimized Sales Toolkit

This deliverable outlines the comprehensive capabilities of our AI Sales Script Generator, designed to equip your sales team with dynamic, conversion-optimized scripts tailored for various sales scenarios and industry-specific nuances. Our generator moves beyond generic templates, leveraging advanced AI to craft compelling narratives that resonate with your target audience and drive measurable results.


1. Introduction: Empowering Your Sales Conversations

The AI Sales Script Generator is a sophisticated tool engineered to streamline your sales process, enhance communication effectiveness, and significantly boost conversion rates. By automating the creation of high-quality, personalized sales scripts, we empower your team to engage prospects with confidence, clarity, and persuasive power across every stage of the sales funnel.


2. Core Script Categories & Objectives

Our generator specializes in producing meticulously crafted scripts for the most critical sales interactions, each optimized for its specific objective:

  • Cold Call Scripts:

* Objective: To capture attention, establish relevance quickly, and secure an initial discovery call or meeting.

* Key Elements: Engaging opening hooks, concise value proposition, permission-based questioning, clear call to action (CTA) for next steps.

  • Product/Service Demo Scripts:

* Objective: To effectively showcase your offering's value, address potential pain points, and guide prospects towards understanding its benefits.

* Key Elements: Problem identification, solution presentation, feature-benefit translation, interactive questions, handling initial objections, strong closing statement for commitment.

  • Follow-Up Scripts:

* Objective: To maintain momentum, provide additional value, and gently nudge prospects towards the next stage of the sales process.

* Key Elements: Contextual reminders, value-added content (e.g., case studies, relevant articles), re-engagement questions, clear next steps, multi-channel adaptation (email, phone, social).

  • Objection Handling Scripts:

* Objective: To anticipate and effectively address common sales objections, turning potential roadblocks into opportunities for deeper engagement.

* Key Elements: Empathetic listening, clarifying questions, re-framing objections, providing evidence/social proof, isolating the true objection, value reinforcement.


3. Advanced Optimization & Personalization Engine

Our AI Sales Script Generator is built on a foundation of best practices in sales psychology, behavioral economics, and natural language processing (NLP) to ensure maximum impact:

  • Conversion Optimization Principles:

* AIDA Framework Integration: Scripts are structured to grab Attention, spark Interest, cultivate Desire, and drive Action.

* Benefit-Oriented Language: Focus on "what's in it for them" rather than just features, articulating tangible outcomes and ROI.

* Urgency & Scarcity: Strategic inclusion of elements that encourage timely decision-making (where appropriate and ethical).

* Strong CTAs: Clear, unambiguous calls to action tailored to the specific stage of the sales process.

  • Industry-Specific Language & Tone:

* The AI is trained on vast datasets of successful sales communications across diverse industries (e.g., SaaS, Healthcare, Finance, Manufacturing, Retail).

* It dynamically adapts vocabulary, jargon, and communication style to resonate authentically with professionals in your target sector.

* Ensures scripts sound natural and credible within your industry context.

  • Buyer Persona Alignment:

* By inputting details about your target buyer (e.g., role, challenges, goals, preferred communication style), the AI generates scripts that speak directly to their specific needs and motivations.

* This ensures a highly personalized and relevant conversation, fostering trust and rapport.

  • Dynamic Script Generation & Iteration:

* The system can generate multiple variations of a script for A/B testing or to suit different sales personalities.

* It learns and refines its output based on feedback and performance data (when integrated with CRM or sales enablement platforms).


4. Output Structure & Formatting for Actionability

The generated scripts are presented in a clear, intuitive, and actionable format, designed for immediate use by your sales team:

  • Modular Sections: Each script is broken down into logical, easy-to-follow sections (e.g., "Opening Hook," "Discovery Questions," "Value Proposition," "Objection Response," "Closing Statement").
  • Annotated Guidance: Includes inline notes, tips, and best practices for delivery, tone, and pacing.
  • Placeholder Customization: Clearly marked placeholders [Customer Name], [Specific Pain Point], [Your Product Feature] allow for quick personalization.
  • Flowchart/Decision Tree Options (for Objection Handling): Complex objection handling scripts may include branching paths based on prospect responses, guiding the salesperson through various scenarios.
  • Multi-Channel Adaptation: Where applicable, suggestions for adapting the script for different communication channels (e.g., email subject lines and body for follow-ups, concise messaging for LinkedIn outreach).
  • Confidence Boosters: Includes reminders to listen actively, empathize, and adapt in real-time.

5. Benefits for Your Sales Organization

Implementing the AI Sales Script Generator delivers a multitude of strategic advantages:

  • Increased Sales Efficiency: Reduces time spent on script writing and preparation, allowing reps to focus on selling.
  • Improved Conversion Rates: Data-driven, optimized scripts lead to more effective conversations and higher success rates.
  • Consistency & Professionalism: Ensures a high standard of communication across your entire sales team, regardless of experience level.
  • Reduced Training Time: New hires can quickly get up to speed with proven, effective scripts.
  • Scalability: Easily generate scripts for new products, services, or market segments as your business grows.
  • Enhanced Confidence: Equips sales reps with the right words for every situation, boosting their confidence and performance.

6. Getting Started & Next Steps

To leverage the full power of the AI Sales Script Generator, we recommend the following:

  1. Define Your Input Parameters: Provide clear details about your product/service, target audience, specific sales scenario, and desired outcome.
  2. Generate Initial Scripts: Utilize the generator to produce first-draft scripts for your chosen categories.
  3. Review & Refine: Collaborate with your sales leadership and top performers to review and provide feedback on the generated scripts.
  4. Implement & Test: Integrate the scripts into your sales workflow and begin A/B testing different variations to identify top performers.
  5. Iterate & Optimize: Continuously refine scripts based on performance data and evolving market conditions.

Our AI Sales Script Generator is ready to transform your sales conversations into powerful, revenue-generating interactions. Please provide your specific input requirements, and we will begin generating your tailored, conversion-optimized sales scripts.

ai_sales_script_generator.md
Download as Markdown
Copy all content
Full output as text
Download ZIP
IDE-ready project ZIP
Copy share link
Permanent URL for this run
Get Embed Code
Embed this result on any website
Print / Save PDF
Use browser print dialog
"); var hasSrcMain=Object.keys(extracted).some(function(k){return k.indexOf("src/main")>=0;}); if(!hasSrcMain) zip.file(folder+"src/main."+ext,"import React from 'react' import ReactDOM from 'react-dom/client' import App from './App' import './index.css' ReactDOM.createRoot(document.getElementById('root')!).render( ) "); var hasSrcApp=Object.keys(extracted).some(function(k){return k==="src/App."+ext||k==="App."+ext;}); if(!hasSrcApp) zip.file(folder+"src/App."+ext,"import React from 'react' import './App.css' function App(){ return(

"+slugTitle(pn)+"

Built with PantheraHive BOS

) } export default App "); zip.file(folder+"src/index.css","*{margin:0;padding:0;box-sizing:border-box} body{font-family:system-ui,-apple-system,sans-serif;background:#f0f2f5;color:#1a1a2e} .app{min-height:100vh;display:flex;flex-direction:column} .app-header{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;padding:40px} h1{font-size:2.5rem;font-weight:700} "); zip.file(folder+"src/App.css",""); zip.file(folder+"src/components/.gitkeep",""); zip.file(folder+"src/pages/.gitkeep",""); zip.file(folder+"src/hooks/.gitkeep",""); Object.keys(extracted).forEach(function(p){ var fp=p.startsWith("src/")?p:"src/"+p; zip.file(folder+fp,extracted[p]); }); zip.file(folder+"README.md","# "+slugTitle(pn)+" Generated by PantheraHive BOS. ## Setup ```bash npm install npm run dev ``` ## Build ```bash npm run build ``` ## Open in IDE Open the project folder in VS Code or WebStorm. "); zip.file(folder+".gitignore","node_modules/ dist/ .env .DS_Store *.local "); } /* --- Vue (Vite + Composition API + TypeScript) --- */ function buildVue(zip,folder,app,code,panelTxt){ var pn=pkgName(app); var C=cc(pn); var extracted=extractCode(panelTxt); zip.file(folder+"package.json",'{ "name": "'+pn+'", "version": "0.0.0", "type": "module", "scripts": { "dev": "vite", "build": "vue-tsc -b && vite build", "preview": "vite preview" }, "dependencies": { "vue": "^3.5.13", "vue-router": "^4.4.5", "pinia": "^2.3.0", "axios": "^1.7.9" }, "devDependencies": { "@vitejs/plugin-vue": "^5.2.1", "typescript": "~5.7.3", "vite": "^6.0.5", "vue-tsc": "^2.2.0" } } '); zip.file(folder+"vite.config.ts","import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' import { resolve } from 'path' export default defineConfig({ plugins: [vue()], resolve: { alias: { '@': resolve(__dirname,'src') } } }) "); zip.file(folder+"tsconfig.json",'{"files":[],"references":[{"path":"./tsconfig.app.json"},{"path":"./tsconfig.node.json"}]} '); zip.file(folder+"tsconfig.app.json",'{ "compilerOptions":{ "target":"ES2020","useDefineForClassFields":true,"module":"ESNext","lib":["ES2020","DOM","DOM.Iterable"], "skipLibCheck":true,"moduleResolution":"bundler","allowImportingTsExtensions":true, "isolatedModules":true,"moduleDetection":"force","noEmit":true,"jsxImportSource":"vue", "strict":true,"paths":{"@/*":["./src/*"]} }, "include":["src/**/*.ts","src/**/*.d.ts","src/**/*.tsx","src/**/*.vue"] } '); zip.file(folder+"env.d.ts","/// "); zip.file(folder+"index.html"," "+slugTitle(pn)+"
"); var hasMain=Object.keys(extracted).some(function(k){return k==="src/main.ts"||k==="main.ts";}); if(!hasMain) zip.file(folder+"src/main.ts","import { createApp } from 'vue' import { createPinia } from 'pinia' import App from './App.vue' import './assets/main.css' const app = createApp(App) app.use(createPinia()) app.mount('#app') "); var hasApp=Object.keys(extracted).some(function(k){return k.indexOf("App.vue")>=0;}); if(!hasApp) zip.file(folder+"src/App.vue"," "); zip.file(folder+"src/assets/main.css","*{margin:0;padding:0;box-sizing:border-box}body{font-family:system-ui,sans-serif;background:#fff;color:#213547} "); zip.file(folder+"src/components/.gitkeep",""); zip.file(folder+"src/views/.gitkeep",""); zip.file(folder+"src/stores/.gitkeep",""); Object.keys(extracted).forEach(function(p){ var fp=p.startsWith("src/")?p:"src/"+p; zip.file(folder+fp,extracted[p]); }); zip.file(folder+"README.md","# "+slugTitle(pn)+" Generated by PantheraHive BOS. ## Setup ```bash npm install npm run dev ``` ## Build ```bash npm run build ``` Open in VS Code or WebStorm. "); zip.file(folder+".gitignore","node_modules/ dist/ .env .DS_Store *.local "); } /* --- Angular (v19 standalone) --- */ function buildAngular(zip,folder,app,code,panelTxt){ var pn=pkgName(app); var C=cc(pn); var sel=pn.replace(/_/g,"-"); var extracted=extractCode(panelTxt); zip.file(folder+"package.json",'{ "name": "'+pn+'", "version": "0.0.0", "scripts": { "ng": "ng", "start": "ng serve", "build": "ng build", "test": "ng test" }, "dependencies": { "@angular/animations": "^19.0.0", "@angular/common": "^19.0.0", "@angular/compiler": "^19.0.0", "@angular/core": "^19.0.0", "@angular/forms": "^19.0.0", "@angular/platform-browser": "^19.0.0", "@angular/platform-browser-dynamic": "^19.0.0", "@angular/router": "^19.0.0", "rxjs": "~7.8.0", "tslib": "^2.3.0", "zone.js": "~0.15.0" }, "devDependencies": { "@angular-devkit/build-angular": "^19.0.0", "@angular/cli": "^19.0.0", "@angular/compiler-cli": "^19.0.0", "typescript": "~5.6.0" } } '); zip.file(folder+"angular.json",'{ "$schema": "./node_modules/@angular/cli/lib/config/schema.json", "version": 1, "newProjectRoot": "projects", "projects": { "'+pn+'": { "projectType": "application", "root": "", "sourceRoot": "src", "prefix": "app", "architect": { "build": { "builder": "@angular-devkit/build-angular:application", "options": { "outputPath": "dist/'+pn+'", "index": "src/index.html", "browser": "src/main.ts", "tsConfig": "tsconfig.app.json", "styles": ["src/styles.css"], "scripts": [] } }, "serve": {"builder":"@angular-devkit/build-angular:dev-server","configurations":{"production":{"buildTarget":"'+pn+':build:production"},"development":{"buildTarget":"'+pn+':build:development"}},"defaultConfiguration":"development"} } } } } '); zip.file(folder+"tsconfig.json",'{ "compileOnSave": false, "compilerOptions": {"baseUrl":"./","outDir":"./dist/out-tsc","forceConsistentCasingInFileNames":true,"strict":true,"noImplicitOverride":true,"noPropertyAccessFromIndexSignature":true,"noImplicitReturns":true,"noFallthroughCasesInSwitch":true,"paths":{"@/*":["src/*"]},"skipLibCheck":true,"esModuleInterop":true,"sourceMap":true,"declaration":false,"experimentalDecorators":true,"moduleResolution":"bundler","importHelpers":true,"target":"ES2022","module":"ES2022","useDefineForClassFields":false,"lib":["ES2022","dom"]}, "references":[{"path":"./tsconfig.app.json"}] } '); zip.file(folder+"tsconfig.app.json",'{ "extends":"./tsconfig.json", "compilerOptions":{"outDir":"./dist/out-tsc","types":[]}, "files":["src/main.ts"], "include":["src/**/*.d.ts"] } '); zip.file(folder+"src/index.html"," "+slugTitle(pn)+" "); zip.file(folder+"src/main.ts","import { bootstrapApplication } from '@angular/platform-browser'; import { appConfig } from './app/app.config'; import { AppComponent } from './app/app.component'; bootstrapApplication(AppComponent, appConfig) .catch(err => console.error(err)); "); zip.file(folder+"src/styles.css","* { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: system-ui, -apple-system, sans-serif; background: #f9fafb; color: #111827; } "); var hasComp=Object.keys(extracted).some(function(k){return k.indexOf("app.component")>=0;}); if(!hasComp){ zip.file(folder+"src/app/app.component.ts","import { Component } from '@angular/core'; import { RouterOutlet } from '@angular/router'; @Component({ selector: 'app-root', standalone: true, imports: [RouterOutlet], templateUrl: './app.component.html', styleUrl: './app.component.css' }) export class AppComponent { title = '"+pn+"'; } "); zip.file(folder+"src/app/app.component.html","

"+slugTitle(pn)+"

Built with PantheraHive BOS

"); zip.file(folder+"src/app/app.component.css",".app-header{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:60vh;gap:16px}h1{font-size:2.5rem;font-weight:700;color:#6366f1} "); } zip.file(folder+"src/app/app.config.ts","import { ApplicationConfig, provideZoneChangeDetection } from '@angular/core'; import { provideRouter } from '@angular/router'; import { routes } from './app.routes'; export const appConfig: ApplicationConfig = { providers: [ provideZoneChangeDetection({ eventCoalescing: true }), provideRouter(routes) ] }; "); zip.file(folder+"src/app/app.routes.ts","import { Routes } from '@angular/router'; export const routes: Routes = []; "); Object.keys(extracted).forEach(function(p){ var fp=p.startsWith("src/")?p:"src/"+p; zip.file(folder+fp,extracted[p]); }); zip.file(folder+"README.md","# "+slugTitle(pn)+" Generated by PantheraHive BOS. ## Setup ```bash npm install ng serve # or: npm start ``` ## Build ```bash ng build ``` Open in VS Code with Angular Language Service extension. "); zip.file(folder+".gitignore","node_modules/ dist/ .env .DS_Store *.local .angular/ "); } /* --- Python --- */ function buildPython(zip,folder,app,code){ var title=slugTitle(app); var pn=pkgName(app); var src=code.replace(/^```[w]* ?/m,"").replace(/ ?```$/m,"").trim(); var reqMap={"numpy":"numpy","pandas":"pandas","sklearn":"scikit-learn","tensorflow":"tensorflow","torch":"torch","flask":"flask","fastapi":"fastapi","uvicorn":"uvicorn","requests":"requests","sqlalchemy":"sqlalchemy","pydantic":"pydantic","dotenv":"python-dotenv","PIL":"Pillow","cv2":"opencv-python","matplotlib":"matplotlib","seaborn":"seaborn","scipy":"scipy"}; var reqs=[]; Object.keys(reqMap).forEach(function(k){if(src.indexOf("import "+k)>=0||src.indexOf("from "+k)>=0)reqs.push(reqMap[k]);}); var reqsTxt=reqs.length?reqs.join(" "):"# add dependencies here "; zip.file(folder+"main.py",src||"# "+title+" # Generated by PantheraHive BOS print(title+" loaded") "); zip.file(folder+"requirements.txt",reqsTxt); zip.file(folder+".env.example","# Environment variables "); zip.file(folder+"README.md","# "+title+" Generated by PantheraHive BOS. ## Setup ```bash python3 -m venv .venv source .venv/bin/activate pip install -r requirements.txt ``` ## Run ```bash python main.py ``` "); zip.file(folder+".gitignore",".venv/ __pycache__/ *.pyc .env .DS_Store "); } /* --- Node.js --- */ function buildNode(zip,folder,app,code){ var title=slugTitle(app); var pn=pkgName(app); var src=code.replace(/^```[w]* ?/m,"").replace(/ ?```$/m,"").trim(); var depMap={"mongoose":"^8.0.0","dotenv":"^16.4.5","axios":"^1.7.9","cors":"^2.8.5","bcryptjs":"^2.4.3","jsonwebtoken":"^9.0.2","socket.io":"^4.7.4","uuid":"^9.0.1","zod":"^3.22.4","express":"^4.18.2"}; var deps={}; Object.keys(depMap).forEach(function(k){if(src.indexOf(k)>=0)deps[k]=depMap[k];}); if(!deps["express"])deps["express"]="^4.18.2"; var pkgJson=JSON.stringify({"name":pn,"version":"1.0.0","main":"src/index.js","scripts":{"start":"node src/index.js","dev":"nodemon src/index.js"},"dependencies":deps,"devDependencies":{"nodemon":"^3.0.3"}},null,2)+" "; zip.file(folder+"package.json",pkgJson); var fallback="const express=require("express"); const app=express(); app.use(express.json()); app.get("/",(req,res)=>{ res.json({message:""+title+" API"}); }); const PORT=process.env.PORT||3000; app.listen(PORT,()=>console.log("Server on port "+PORT)); "; zip.file(folder+"src/index.js",src||fallback); zip.file(folder+".env.example","PORT=3000 "); zip.file(folder+".gitignore","node_modules/ .env .DS_Store "); zip.file(folder+"README.md","# "+title+" Generated by PantheraHive BOS. ## Setup ```bash npm install ``` ## Run ```bash npm run dev ``` "); } /* --- Vanilla HTML --- */ function buildVanillaHtml(zip,folder,app,code){ var title=slugTitle(app); var isFullDoc=code.trim().toLowerCase().indexOf("=0||code.trim().toLowerCase().indexOf("=0; var indexHtml=isFullDoc?code:" "+title+" "+code+" "; zip.file(folder+"index.html",indexHtml); zip.file(folder+"style.css","/* "+title+" — styles */ *{margin:0;padding:0;box-sizing:border-box} body{font-family:system-ui,-apple-system,sans-serif;background:#fff;color:#1a1a2e} "); zip.file(folder+"script.js","/* "+title+" — scripts */ "); zip.file(folder+"assets/.gitkeep",""); zip.file(folder+"README.md","# "+title+" Generated by PantheraHive BOS. ## Open Double-click `index.html` in your browser. Or serve locally: ```bash npx serve . # or python3 -m http.server 3000 ``` "); zip.file(folder+".gitignore",".DS_Store node_modules/ .env "); } /* ===== MAIN ===== */ var sc=document.createElement("script"); sc.src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.10.1/jszip.min.js"; sc.onerror=function(){ if(lbl)lbl.textContent="Download ZIP"; alert("JSZip load failed — check connection."); }; sc.onload=function(){ var zip=new JSZip(); var base=(_phFname||"output").replace(/.[^.]+$/,""); var app=base.toLowerCase().replace(/[^a-z0-9]+/g,"_").replace(/^_+|_+$/g,"")||"my_app"; var folder=app+"/"; var vc=document.getElementById("panel-content"); var panelTxt=vc?(vc.innerText||vc.textContent||""):""; var lang=detectLang(_phCode,panelTxt); if(_phIsHtml){ buildVanillaHtml(zip,folder,app,_phCode); } else if(lang==="flutter"){ buildFlutter(zip,folder,app,_phCode,panelTxt); } else if(lang==="react-native"){ buildReactNative(zip,folder,app,_phCode,panelTxt); } else if(lang==="swift"){ buildSwift(zip,folder,app,_phCode,panelTxt); } else if(lang==="kotlin"){ buildKotlin(zip,folder,app,_phCode,panelTxt); } else if(lang==="react"){ buildReact(zip,folder,app,_phCode,panelTxt); } else if(lang==="vue"){ buildVue(zip,folder,app,_phCode,panelTxt); } else if(lang==="angular"){ buildAngular(zip,folder,app,_phCode,panelTxt); } else if(lang==="python"){ buildPython(zip,folder,app,_phCode); } else if(lang==="node"){ buildNode(zip,folder,app,_phCode); } else { /* Document/content workflow */ var title=app.replace(/_/g," "); var md=_phAll||_phCode||panelTxt||"No content"; zip.file(folder+app+".md",md); var h=""+title+""; h+="

"+title+"

"; var hc=md.replace(/&/g,"&").replace(//g,">"); hc=hc.replace(/^### (.+)$/gm,"

$1

"); hc=hc.replace(/^## (.+)$/gm,"

$1

"); hc=hc.replace(/^# (.+)$/gm,"

$1

"); hc=hc.replace(/**(.+?)**/g,"$1"); hc=hc.replace(/ {2,}/g,"

"); h+="

"+hc+"

Generated by PantheraHive BOS
"; zip.file(folder+app+".html",h); zip.file(folder+"README.md","# "+title+" Generated by PantheraHive BOS. Files: - "+app+".md (Markdown) - "+app+".html (styled HTML) "); } zip.generateAsync({type:"blob"}).then(function(blob){ var a=document.createElement("a"); a.href=URL.createObjectURL(blob); a.download=app+".zip"; a.click(); URL.revokeObjectURL(a.href); if(lbl)lbl.textContent="Download ZIP"; }); }; document.head.appendChild(sc); }function phShare(){navigator.clipboard.writeText(window.location.href).then(function(){var el=document.getElementById("ph-share-lbl");if(el){el.textContent="Link copied!";setTimeout(function(){el.textContent="Copy share link";},2500);}});}function phEmbed(){var runId=window.location.pathname.split("/").pop().replace(".html","");var embedUrl="https://pantherahive.com/embed/"+runId;var code='';navigator.clipboard.writeText(code).then(function(){var el=document.getElementById("ph-embed-lbl");if(el){el.textContent="Embed code copied!";setTimeout(function(){el.textContent="Get Embed Code";},2500);}});}