AI Sales Script Generator
Run ID: 69cae84ec8ebe3066ba6f5172026-03-30Business
PantheraHive BOS
BOS Dashboard

This deliverable provides comprehensive, conversion-optimized sales script frameworks designed to elevate your sales interactions across the entire customer journey. These scripts are structured to be adaptable to various industries, integrating industry-specific language through dedicated placeholders and principles.


1. Introduction: Your AI-Powered Sales Script Toolkit

Welcome to your refined and formatted AI Sales Script Generator output. This toolkit provides meticulously crafted frameworks for critical sales touchpoints: cold calls, product demos, follow-ups, and objection handling. Each script is built on conversion optimization principles to maximize engagement, build rapport, and drive your prospects towards a positive outcome.

Our goal is to equip your sales team with flexible, powerful communication tools that resonate with your target audience and reflect the unique value proposition of your offerings within your specific industry context.

2. Core Principles of Conversion Optimization in Sales Scripts

The following scripts are engineered with these foundational principles to ensure maximum effectiveness:

3. Detailed Sales Script Frameworks

3.1. Cold Call Script Framework: Securing the Next Step

Goal: To pique interest, identify a potential fit, and secure a brief follow-up meeting or demo.

Key Elements: Brevity, respect for time, immediate value proposition.

text • 3,225 chars
**[Your Company Name] Demo Script**

**(1) Introduction & Agenda Setting (5-10 minutes)**
*   **You:** "Hi [Prospect Name], thanks for joining. To ensure we make the most of our time today, I'd love to quickly confirm what you're hoping to get out of this session. From our previous conversation, I understand your key challenges are [Challenge 1] and [Challenge 2]."
*   **You:** "My goal today is to show you how [Your Solution] specifically addresses those challenges and helps you achieve [Desired Outcome]. We'll cover [Key Feature 1] and [Key Feature 2], then leave time for your questions and discuss next steps."
*   **You:** "Does that sound good? Is there anything else critical you'd like to ensure we cover?"

**(2) Deep Dive Discovery & Confirmation (10-15 minutes)**
*   **You:** "Before we jump into the platform, could you elaborate a bit on [Challenge 1]? What impact is it currently having on your team/business?"
*   **You:** "And regarding [Challenge 2], what have you tried so far to overcome it, and what were the results?"
*   **You:** "What does success look like for you in addressing these areas?"
*   *(Listen intently, ask follow-up questions, take detailed notes. This validates their needs and tailors your demo.)*

**(3) Tailored Solution Presentation & Demonstration (20-30 minutes)**
*   **You:** "Based on what you've shared about [Challenge 1], let me show you how [Your Solution's Feature A] directly helps. As you can see here, [describe how feature works, relating it to their specific problem]."
*   **You:** "The real benefit here is [Benefit A, e.g., 'it eliminates manual data entry, saving your team X hours per week'], leading to [Impact A, e.g., 'a 20% reduction in operational costs']."
*   **You:** "Does that make sense? Can you see how that would address [Challenge 1]?"
*   *(Repeat for other key features, always linking back to their pain points and desired outcomes. Encourage interaction: "What are your initial thoughts on this?", "How might your team use this?").*
*   *(Address potential future challenges/opportunities with your solution.)*

**(4) Q&A and Addressing Concerns (5-10 minutes)**
*   **You:** "We've covered quite a bit. What questions have come up for you?"
*   *(Address questions thoroughly. If you don't know, promise to find out and follow up.)*

**(5) Summary & Next Steps (5 minutes)**
*   **You:** "To recap, we discussed how [Your Solution] can help you [reiterate key benefits tied to their challenges, e.g., 'streamline X, improve Y, and achieve Z']."
*   **You:** "Given what we've seen today, do you feel this could be a viable solution for [Prospect Company Name]?"
*   **You:** "Our typical next step from here is to [propose clear next action, e.g., 'prepare a customized proposal based on your specific requirements', 'schedule a technical deep-dive with your IT team', 'set up a pilot program']."
*   **You:** "Which of these makes the most sense for you at this stage? Or, what would you like to do next?"
*   *(Confirm the agreed-upon next step and schedule it immediately if possible.)*
*   **You:** "Great, I'll send a summary email with what we discussed and the confirmed next steps. Thanks again for your time, [Prospect Name]."
Sandboxed live preview

Marketing Strategy: AI Sales Script Generator

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.


1. Target Audience Analysis

Understanding our ideal customer is paramount to tailoring effective marketing efforts. We will target decision-makers and influencers within sales organizations who are actively seeking solutions to improve sales efficiency and conversion rates.

1.1. Primary Target Audience

  • Job Titles:

* VP of Sales, Head of Sales, Sales Director

* Sales Manager, Team Lead

* Head of Business Development (BDR/SDR)

* Sales Enablement Manager

* Chief Revenue Officer (CRO)

  • Company Profile:

* Industry: B2B SaaS, Technology, Financial Services, Healthcare, Real Estate, Consulting, Manufacturing, Professional Services. Any industry with a complex sales cycle or high volume of outbound interactions.

* Size: Mid-market to Enterprise companies (50+ sales reps), or fast-growing startups scaling their sales teams.

* Pain Points:

* Inconsistent messaging across the sales team, leading to varied brand perception and lower conversion rates.

* Long ramp-up times for new sales representatives due to extensive script training and memorization.

* Difficulty in handling complex or unique objections effectively, resulting in lost opportunities.

* Lack of personalization at scale, making cold outreach feel generic and less effective.

* High churn rates among sales reps due to frustration with script generation and performance.

* Inefficient use of sales leaders' time in manually reviewing and refining scripts.

* Desire to leverage AI and automation for competitive advantage in sales.

* Goals:

* Increase sales team efficiency and productivity.

* Improve conversion rates across all sales stages (cold call to close).

* Ensure consistent, on-brand messaging.

* Reduce sales rep ramp-up time and training costs.

* Empower sales reps with confidence and effective communication tools.

* Gain data-driven insights into script performance.

1.2. Secondary Target Audience

  • Job Titles:

Individual Sales Representatives (SDRs, BDRs, Account Executives) - Users of the tool, not primary buyers.*

* Small Business Owners/Entrepreneurs (who handle sales personally or with a small team).

* Marketing Directors/CMOs (interested in sales-marketing alignment and consistent messaging).

  • Pain Points:

* Sales Reps: Feeling unprepared, struggling with objections, spending too much time crafting personalized messages, lack of confidence in certain scenarios.

* Small Business Owners: Limited resources for sales training, need for quick and effective sales materials without dedicated sales enablement staff.


2. Channel Recommendations

To effectively reach our target audience, a multi-channel approach leveraging both inbound and outbound strategies will be employed.

2.1. Digital Marketing & Inbound Channels

  • Content Marketing:

* Blog Posts: High-value content addressing pain points (e.g., "How AI is Revolutionizing Cold Calling," "7 Ways to Improve Your Sales Demo Conversion," "Mastering Objection Handling with AI").

* Whitepapers/E-books: In-depth guides on sales enablement, AI in sales, script optimization.

* Case Studies: Demonstrating tangible ROI and success stories from early adopters.

* Webinars & Online Workshops: Live sessions showcasing the product, best practices for using AI in sales, Q&A with sales experts.

* Templates & Checklists: Offer downloadable resources like "AI-Powered Cold Call Script Template" or "Objection Handling Playbook."

  • Search Engine Optimization (SEO):

* Keyword Targeting: Focus on high-intent keywords such as "AI sales script generator," "sales script automation," "cold call AI," "objection handling software," "sales enablement AI."

* Technical SEO: Ensure website speed, mobile responsiveness, and structured data for optimal search visibility.

  • Paid Advertising (PPC/SEM):

* Google Ads: Target specific keywords with high commercial intent.

* LinkedIn Ads: Highly targeted campaigns based on job title, industry, company size, and professional interests. Utilize retargeting for website visitors.

* Industry-Specific Platforms: Explore advertising on sales enablement blogs, forums, or review sites (e.g., G2, Capterra).

  • Social Media Marketing:

* LinkedIn: The primary platform for professional engagement. Share thought leadership, product updates, customer success stories, and engage in relevant sales groups.

* Twitter: Share quick insights, industry news, and engage with sales thought leaders.

* YouTube: Create product demos, "how-to" videos, and expert interviews.

  • Email Marketing:

* Nurture Sequences: For leads generated through content downloads or webinar registrations.

* Product Updates & Newsletters: Keep existing leads and customers informed.

* Personalized Outreach: Targeted emails to specific job titles after initial engagement.

2.2. Outbound & Partnership Channels

  • Direct Sales & Business Development:

* Cold Outreach: Highly personalized email and LinkedIn InMail campaigns targeting decision-makers identified in the primary audience.

* Conferences & Trade Shows: Exhibit or speak at relevant industry events (e.g., Dreamforce, Sales Leadership Summits, AI/Tech conferences).

* Partnerships:

* CRM Integrations: Partner with major CRM providers (Salesforce, HubSpot) for marketplace listings and co-marketing.

* Sales Enablement Platforms: Integrate with existing sales enablement tools.

* Industry Associations: Sponsor or collaborate with sales professional organizations.

* Affiliate Programs: Partner with sales consultants, trainers, and agencies.

2.3. Public Relations (PR)

  • Media Outreach: Pitch to leading tech, business, and sales-specific publications (e.g., TechCrunch, Forbes, Sales Hacker, Inc.).
  • Thought Leadership: Position key team members as experts in AI and sales, securing speaking engagements and contributed articles.

3. Messaging Framework

Our messaging will consistently highlight the core value proposition, address specific pain points, and differentiate our solution.

3.1. Core Value Proposition

"Empower your sales team with the confidence and precision of AI-driven, conversion-optimized scripts for every sales interaction, accelerating revenue growth and ensuring consistent brand messaging."

3.2. Key Benefits & Problem-Solving

  • For Sales Leaders (Strategic Value):

* Problem Solved: Inconsistent messaging, low conversion rates, long ramp-up times.

* Benefit: "Achieve predictable, higher conversion rates and drastically reduce new rep ramp-up time by standardizing and optimizing your sales communication with AI."

* Benefit: "Gain unprecedented visibility into script performance and continuously optimize your sales strategy with data-driven insights."

  • For Sales Managers (Operational Value):

* Problem Solved: Time-consuming script creation/review, reps struggling with objections.

* Benefit: "Streamline script generation and review processes, freeing up valuable management time while equipping your team with instant, effective responses to any objection."

  • For Sales Representatives (User Value):

* Problem Solved: Lack of confidence, generic outreach, difficulty personalizing.

Benefit: "Boost your confidence and close more deals with dynamically generated, personalized scripts that adapt to any prospect and every* scenario."

* Benefit: "Save hours on preparation and focus on building relationships, knowing you have the perfect response for cold calls, demos, follow-ups, and objection handling."

3.3. Unique Selling Points (USPs)

  • Advanced Generative AI: Beyond templates, our AI understands context, industry nuances, and prospect profiles to generate truly personalized and effective scripts.
  • Comprehensive Scenario Coverage: From initial cold outreach to complex objection handling and closing statements, our tool covers the entire sales journey.
  • Industry-Specific Language Integration: Tailors scripts with precise terminology relevant to finance, healthcare, tech, etc., ensuring credibility and resonance.
  • Real-time Adaptability: Offers dynamic suggestions for objection handling and follow-ups based on live conversation flow (future feature, can be hinted).
  • Seamless Integration: Designed to integrate with existing CRM and sales enablement platforms for a cohesive workflow.
  • Performance Analytics (Future): Track script effectiveness, identify winning phrases, and continuously refine strategies.

3.4. Call to Action (CTAs)

  • "Request a Personalized Demo"
  • "Start Your Free Trial Today"
  • "Download Our Guide: The Future of Sales Scripting with AI"
  • "See How [Your Product Name] Can Transform Your Sales Team"
  • "Get Your Custom Script Generated Now"

3.5. Tone & Voice

  • Professional & Authoritative: Position ourselves as industry experts.
  • Innovative & Forward-Thinking: Highlight the cutting-edge AI technology.
  • Empathetic & Problem-Solving: Address pain points directly and offer clear solutions.
  • Results-Oriented: Focus on the tangible benefits and ROI for our customers.

4. Key Performance Indicators (KPIs)

Measuring the effectiveness of our marketing efforts is crucial for continuous optimization.

4.1. Lead Generation & Funnel Metrics

  • Website Traffic:

* Unique Visitors (Overall, Organic, Paid, Referral)

* Traffic Sources (Channel performance)

* Bounce Rate, Time on Page

  • Lead Volume:

* Marketing Qualified Leads (MQLs) - e.g., content downloads, webinar registrations.

* Sales Qualified Leads (SQLs) - e.g., demo requests, free trial sign-ups.

  • Conversion Rates:

* Website Visitor to Lead (MQL) Conversion Rate.

* MQL to SQL Conversion Rate.

* SQL to Opportunity Conversion Rate.

* Opportunity to Win Rate.

  • Cost Per Lead (CPL): Across different channels.
  • Cost Per Acquisition (CPA): Overall cost to acquire a new paying customer.

4.2. Engagement Metrics

  • Email Marketing:

* Open Rates, Click-Through Rates (CTR).

* Conversion Rates from email campaigns.

  • Content Marketing:

* Content Downloads/Views.

* Engagement on blog posts (comments, shares).

* Webinar attendance and engagement.

  • Social Media:

* Reach, Impressions, Engagement Rate (likes, shares, comments).

* Click-Through Rate to website/landing pages.

4.3. Brand Awareness & SEO Metrics

  • Search Engine Rankings: For target keywords.
  • Organic Search Traffic: Volume and growth.
  • Brand Mentions: Across social media, news, and review sites.
  • Direct Traffic: Indicating brand recognition.
  • Domain Authority/Rating.

4.4. Sales & Revenue Metrics (Post-Marketing Handoff)

  • Sales Cycle Length: Average time from first contact to close.
  • Average Deal Size: For customers acquired through marketing channels.
  • Customer Lifetime Value (CLTV): Long-term value of customers.
  • Customer Churn Rate: Particularly relevant for SaaS.
  • Revenue Growth: Directly attributable to marketing efforts.

This comprehensive strategy provides a robust framework for launching and scaling the AI Sales Script Generator, ensuring targeted outreach, compelling messaging, and measurable results.

gemini Output

AI Sales Script Generator: Your Guide to Conversion-Optimized Sales Communication

This document outlines the capabilities and usage of the AI Sales Script Generator, a powerful tool designed to equip your sales team with highly effective, conversion-optimized communication. Our generator leverages advanced AI to create tailored scripts for various sales scenarios, infused with industry-specific language to resonate deeply with your target audience.


1. Introduction & Overview

The AI Sales Script Generator is a sophisticated solution engineered to streamline and enhance your sales communication strategy. Its core function is to produce dynamic, persuasive sales scripts that are not only ready for immediate use but are also optimized for maximum impact and conversion. By automating the script creation process, we empower your sales professionals to focus on building relationships and closing deals, armed with consistently high-quality messaging.


2. Core Capabilities & Script Types Generated

Our AI system specializes in crafting a diverse range of scripts, each designed with specific sales objectives in mind:

  • Cold Call Scripts:

* Objective: To capture attention, qualify prospects, and secure initial interest or a follow-up meeting.

* Key Elements: Engaging openers, concise value propositions, effective qualification questions, and clear calls to action.

  • Demo Presentation Scripts:

* Objective: To guide prospects through product/service demonstrations, highlighting key benefits and addressing potential pain points.

* Key Elements: Structured flow from introduction to benefits showcase, objection pre-emption, and strong closing statements.

  • Follow-Up Scripts (Multi-Channel):

* Objective: To maintain engagement post-interaction (call, demo, meeting), reinforce value, and drive the prospect towards the next stage.

* Key Elements: Personalized references to previous interactions, re-emphasis of core benefits, and clear next steps for email, phone, or social media touchpoints.

  • Objection Handling Playbooks:

* Objective: To provide sales representatives with structured, persuasive responses to common sales objections.

* Key Elements: Acknowledgment of the objection, empathetic framing, re-education on value, and strategies to re-engage the prospect.

Conversion-Optimized Design:

Every script is meticulously crafted to incorporate proven sales psychology principles, including:

  • Benefit-driven language focusing on customer outcomes.
  • Clear, concise, and compelling Calls to Action (CTAs).
  • Problem-solution framing to resonate with prospect needs.
  • Urgency and scarcity principles where appropriate.

Industry-Specific Language Integration:

The AI analyzes your provided industry context to embed relevant terminology, common challenges, and specific value propositions that speak directly to your target market. This ensures your scripts sound authentic and knowledgeable, building immediate credibility.


3. Key Benefits for Your Sales Team

Implementing the AI Sales Script Generator brings a multitude of advantages:

  • Increased Conversion Rates: Scripts are designed with conversion best practices, leading to more successful outcomes.
  • Significant Time Savings: Automate script development, freeing up sales managers and reps from manual writing.
  • Consistent & High-Quality Messaging: Ensure all sales team members deliver a unified, professional, and effective message.
  • Enhanced Sales Confidence: Equip your team with well-researched and battle-tested communication frameworks.
  • Faster Onboarding for New Hires: Quickly train new sales representatives with a repository of effective, ready-to-use scripts.
  • Adaptability & Scalability: Easily generate new scripts for evolving products, services, or market conditions.

4. How to Generate Your Custom Sales Scripts

The process for generating your conversion-optimized sales scripts is straightforward and intuitive:

Step 1: Define Your Script Goal

  • Specify the type of script you need (e.g., Cold Call, Demo, Follow-Up Email, Objection Handling).

Step 2: Provide Essential Context

  • Your Company & Product/Service: Name, brief description, unique selling propositions (USPs), key features, and primary benefits.
  • Your Industry: Clearly state your industry (e.g., SaaS, Healthcare IT, Financial Services, Manufacturing). This is crucial for industry-specific language.
  • Target Audience/Persona: Describe your ideal customer, their typical pain points, challenges, and goals.
  • Specific Scenario Details:

For Cold Calls:* What is the primary pain point you're addressing? What is the desired next step (e.g., book a 15-min discovery call)?

For Demos:* Which specific features or solutions should be highlighted? What problem does this demo solve?

For Follow-Ups:* What was the previous interaction? What value needs to be reinforced? What is the desired next action?

For Objection Handling:* State the specific objection (e.g., "It's too expensive," "We're happy with our current provider," "Send me an email").

  • Desired Tone: (e.g., Professional, Friendly, Urgent, Empathetic, Authoritative).

Step 3: Generate & Review

  • Submit your input. The AI will process the information and generate a comprehensive draft script within moments.
  • Review the generated script for accuracy, relevance, and alignment with your objectives.

Step 4: Refine & Customize

  • Utilize the editing interface to make any necessary adjustments, add specific company jargon, or personalize elements further to perfectly match your brand voice and specific campaign needs.
  • You can iterate by providing feedback or additional instructions to the AI for further refinement.

5. Structure of a Generated Sales Script (Example Components)

Each generated script will follow a logical, conversion-focused structure, typically including:

Example: Cold Call Script Structure

  • Script Type: Cold Call Script
  • Target Audience: [e.g., IT Directors in Mid-Market SaaS Companies]
  • Goal: Book a 15-minute discovery call to discuss [Specific Solution]

1. Opening Hook & Introduction (15-20 seconds)

* "Hi [Prospect Name], this is [Your Name] from [Your Company]. Hope you're having a productive [Day of Week]."

* "The reason for my call is brief. We work with IT Directors like yourself in the [Industry] sector, who often struggle with [Common Pain Point, e.g., managing complex cloud infrastructure costs] without clear visibility."

2. Problem Identification & Empathy (20-30 seconds)

* "Many find that [Current Situation/Challenge, e.g., disparate billing systems lead to unexpected overages and wasted budget]. Does that resonate with any challenges you might be facing at [Prospect's Company]?"

3. Value Proposition & Benefit Statement (30-45 seconds)

* "We've developed [Your Product/Service], a [Concise Description, e.g., AI-powered cloud cost optimization platform], that helps companies like yours to [Key Benefit 1, e.g., achieve 20-30% cost savings] and [Key Benefit 2, e.g., gain real-time visibility into cloud spend across all departments]."

* "For instance, we recently helped [Similar Company Name] reduce their AWS spend by 25% in just three months."

4. Qualification Question (Optional / If applicable)

* "Just curious, how are you currently managing your cloud infrastructure costs and visibility today?"

5. Clear Call to Action (CTA) (15-20 seconds)

* "I'm not looking to sell you anything on this call, but I'd love to schedule a quick 15-minute discovery call next week to understand your specific needs and explore if there's a potential fit for [Your Company] to help. Would [Day] at [Time] or [Day] at [Time] work for you?"

6. Objection Handling (Pre-empted or Reactive)

* Common Objection: "I'm not interested / We're all set."

* Response Strategy: "I understand, [Prospect Name]. Most of our clients felt the same way until they realized the potential for significant savings and improved operational efficiency. If nothing else, a brief conversation could provide some valuable insights into industry best practices for cost management. Would you be open to a quick 15 minutes to explore this further?"

7. Professional Closing

* "Great, I'll send over a calendar invite shortly. Looking forward to speaking then. Thanks for your time, [Prospect Name]."


6. Industry-Specific Language & Customization

The AI is trained on vast datasets, enabling it to understand and integrate industry-specific jargon, common challenges, regulatory nuances, and unique value propositions. When you specify your industry, the generator prioritizes language and examples that resonate with professionals in that field.

Your Role in Customization:

You retain full control to further customize the generated scripts. This includes:

  • Adding proprietary company terms or product names.
  • Integrating specific client success stories relevant to your conversation.
  • Adjusting the tone for individual prospects or campaign requirements.
  • Providing feedback to the AI for continuous learning and improvement on future script generations.

7. Next Steps & Maximizing Your Scripts

To unlock the full potential of your AI-generated sales scripts:

  1. Review & Adapt: Always review the generated scripts and personalize them with your unique insights and specific customer knowledge.
  2. Practice & Role-Play: Encourage your sales team to practice delivering the scripts through role-playing exercises to ensure natural and confident communication.
  3. Test & Iterate: Implement A/B testing where feasible to compare script performance. Gather feedback from your sales team on what works best and what could be improved.
  4. Integrate into Workflow: Incorporate these scripts directly into your CRM or sales enablement platforms for easy access and consistent usage.
  5. Provide Feedback: Share your experiences and suggestions with us. Your feedback is invaluable for enhancing the AI's capabilities and ensuring it continues to meet your evolving sales needs.

We are confident that the AI Sales Script Generator will become an indispensable asset in driving your sales success.

[Your Company Name] Objection Handling Framework (The 'LAFCR' Method)

(1) Listen Actively: Let the prospect fully express their objection without interruption.

(2) Acknowledge & Empathize: Show you understand and respect their perspective.

(3) Clarify: Ask questions to ensure you fully grasp the root of the objection.

ai_sales_script_generator.txt
Download source file
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
\n\n\n"); 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'\nimport ReactDOM from 'react-dom/client'\nimport App from './App'\nimport './index.css'\n\nReactDOM.createRoot(document.getElementById('root')!).render(\n \n \n \n)\n"); 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'\nimport './App.css'\n\nfunction App(){\n return(\n
\n
\n

"+slugTitle(pn)+"

\n

Built with PantheraHive BOS

\n
\n
\n )\n}\nexport default App\n"); zip.file(folder+"src/index.css","*{margin:0;padding:0;box-sizing:border-box}\nbody{font-family:system-ui,-apple-system,sans-serif;background:#f0f2f5;color:#1a1a2e}\n.app{min-height:100vh;display:flex;flex-direction:column}\n.app-header{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;padding:40px}\nh1{font-size:2.5rem;font-weight:700}\n"); 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)+"\n\nGenerated by PantheraHive BOS.\n\n## Setup\n\`\`\`bash\nnpm install\nnpm run dev\n\`\`\`\n\n## Build\n\`\`\`bash\nnpm run build\n\`\`\`\n\n## Open in IDE\nOpen the project folder in VS Code or WebStorm.\n"); zip.file(folder+".gitignore","node_modules/\ndist/\n.env\n.DS_Store\n*.local\n"); } /* --- 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",'{\n "name": "'+pn+'",\n "version": "0.0.0",\n "type": "module",\n "scripts": {\n "dev": "vite",\n "build": "vue-tsc -b && vite build",\n "preview": "vite preview"\n },\n "dependencies": {\n "vue": "^3.5.13",\n "vue-router": "^4.4.5",\n "pinia": "^2.3.0",\n "axios": "^1.7.9"\n },\n "devDependencies": {\n "@vitejs/plugin-vue": "^5.2.1",\n "typescript": "~5.7.3",\n "vite": "^6.0.5",\n "vue-tsc": "^2.2.0"\n }\n}\n'); zip.file(folder+"vite.config.ts","import { defineConfig } from 'vite'\nimport vue from '@vitejs/plugin-vue'\nimport { resolve } from 'path'\n\nexport default defineConfig({\n plugins: [vue()],\n resolve: { alias: { '@': resolve(__dirname,'src') } }\n})\n"); zip.file(folder+"tsconfig.json",'{"files":[],"references":[{"path":"./tsconfig.app.json"},{"path":"./tsconfig.node.json"}]}\n'); zip.file(folder+"tsconfig.app.json",'{\n "compilerOptions":{\n "target":"ES2020","useDefineForClassFields":true,"module":"ESNext","lib":["ES2020","DOM","DOM.Iterable"],\n "skipLibCheck":true,"moduleResolution":"bundler","allowImportingTsExtensions":true,\n "isolatedModules":true,"moduleDetection":"force","noEmit":true,"jsxImportSource":"vue",\n "strict":true,"paths":{"@/*":["./src/*"]}\n },\n "include":["src/**/*.ts","src/**/*.d.ts","src/**/*.tsx","src/**/*.vue"]\n}\n'); zip.file(folder+"env.d.ts","/// \n"); zip.file(folder+"index.html","\n\n\n \n \n "+slugTitle(pn)+"\n\n\n
\n \n\n\n"); 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'\nimport { createPinia } from 'pinia'\nimport App from './App.vue'\nimport './assets/main.css'\n\nconst app = createApp(App)\napp.use(createPinia())\napp.mount('#app')\n"); var hasApp=Object.keys(extracted).some(function(k){return k.indexOf("App.vue")>=0;}); if(!hasApp) zip.file(folder+"src/App.vue","\n\n\n\n\n"); 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}\n"); 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)+"\n\nGenerated by PantheraHive BOS.\n\n## Setup\n\`\`\`bash\nnpm install\nnpm run dev\n\`\`\`\n\n## Build\n\`\`\`bash\nnpm run build\n\`\`\`\n\nOpen in VS Code or WebStorm.\n"); zip.file(folder+".gitignore","node_modules/\ndist/\n.env\n.DS_Store\n*.local\n"); } /* --- 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",'{\n "name": "'+pn+'",\n "version": "0.0.0",\n "scripts": {\n "ng": "ng",\n "start": "ng serve",\n "build": "ng build",\n "test": "ng test"\n },\n "dependencies": {\n "@angular/animations": "^19.0.0",\n "@angular/common": "^19.0.0",\n "@angular/compiler": "^19.0.0",\n "@angular/core": "^19.0.0",\n "@angular/forms": "^19.0.0",\n "@angular/platform-browser": "^19.0.0",\n "@angular/platform-browser-dynamic": "^19.0.0",\n "@angular/router": "^19.0.0",\n "rxjs": "~7.8.0",\n "tslib": "^2.3.0",\n "zone.js": "~0.15.0"\n },\n "devDependencies": {\n "@angular-devkit/build-angular": "^19.0.0",\n "@angular/cli": "^19.0.0",\n "@angular/compiler-cli": "^19.0.0",\n "typescript": "~5.6.0"\n }\n}\n'); zip.file(folder+"angular.json",'{\n "$schema": "./node_modules/@angular/cli/lib/config/schema.json",\n "version": 1,\n "newProjectRoot": "projects",\n "projects": {\n "'+pn+'": {\n "projectType": "application",\n "root": "",\n "sourceRoot": "src",\n "prefix": "app",\n "architect": {\n "build": {\n "builder": "@angular-devkit/build-angular:application",\n "options": {\n "outputPath": "dist/'+pn+'",\n "index": "src/index.html",\n "browser": "src/main.ts",\n "tsConfig": "tsconfig.app.json",\n "styles": ["src/styles.css"],\n "scripts": []\n }\n },\n "serve": {"builder":"@angular-devkit/build-angular:dev-server","configurations":{"production":{"buildTarget":"'+pn+':build:production"},"development":{"buildTarget":"'+pn+':build:development"}},"defaultConfiguration":"development"}\n }\n }\n }\n}\n'); zip.file(folder+"tsconfig.json",'{\n "compileOnSave": false,\n "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"]},\n "references":[{"path":"./tsconfig.app.json"}]\n}\n'); zip.file(folder+"tsconfig.app.json",'{\n "extends":"./tsconfig.json",\n "compilerOptions":{"outDir":"./dist/out-tsc","types":[]},\n "files":["src/main.ts"],\n "include":["src/**/*.d.ts"]\n}\n'); zip.file(folder+"src/index.html","\n\n\n \n "+slugTitle(pn)+"\n \n \n \n\n\n \n\n\n"); zip.file(folder+"src/main.ts","import { bootstrapApplication } from '@angular/platform-browser';\nimport { appConfig } from './app/app.config';\nimport { AppComponent } from './app/app.component';\n\nbootstrapApplication(AppComponent, appConfig)\n .catch(err => console.error(err));\n"); zip.file(folder+"src/styles.css","* { margin: 0; padding: 0; box-sizing: border-box; }\nbody { font-family: system-ui, -apple-system, sans-serif; background: #f9fafb; color: #111827; }\n"); 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';\nimport { RouterOutlet } from '@angular/router';\n\n@Component({\n selector: 'app-root',\n standalone: true,\n imports: [RouterOutlet],\n templateUrl: './app.component.html',\n styleUrl: './app.component.css'\n})\nexport class AppComponent {\n title = '"+pn+"';\n}\n"); zip.file(folder+"src/app/app.component.html","
\n
\n

"+slugTitle(pn)+"

\n

Built with PantheraHive BOS

\n
\n \n
\n"); 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}\n"); } zip.file(folder+"src/app/app.config.ts","import { ApplicationConfig, provideZoneChangeDetection } from '@angular/core';\nimport { provideRouter } from '@angular/router';\nimport { routes } from './app.routes';\n\nexport const appConfig: ApplicationConfig = {\n providers: [\n provideZoneChangeDetection({ eventCoalescing: true }),\n provideRouter(routes)\n ]\n};\n"); zip.file(folder+"src/app/app.routes.ts","import { Routes } from '@angular/router';\n\nexport const routes: Routes = [];\n"); 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)+"\n\nGenerated by PantheraHive BOS.\n\n## Setup\n\`\`\`bash\nnpm install\nng serve\n# or: npm start\n\`\`\`\n\n## Build\n\`\`\`bash\nng build\n\`\`\`\n\nOpen in VS Code with Angular Language Service extension.\n"); zip.file(folder+".gitignore","node_modules/\ndist/\n.env\n.DS_Store\n*.local\n.angular/\n"); } /* --- Python --- */ function buildPython(zip,folder,app,code){ var title=slugTitle(app); var pn=pkgName(app); var src=code.replace(/^\`\`\`[\w]*\n?/m,"").replace(/\n?\`\`\`$/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("\n"):"# add dependencies here\n"; zip.file(folder+"main.py",src||"# "+title+"\n# Generated by PantheraHive BOS\n\nprint(title+\" loaded\")\n"); zip.file(folder+"requirements.txt",reqsTxt); zip.file(folder+".env.example","# Environment variables\n"); zip.file(folder+"README.md","# "+title+"\n\nGenerated by PantheraHive BOS.\n\n## Setup\n\`\`\`bash\npython3 -m venv .venv\nsource .venv/bin/activate\npip install -r requirements.txt\n\`\`\`\n\n## Run\n\`\`\`bash\npython main.py\n\`\`\`\n"); zip.file(folder+".gitignore",".venv/\n__pycache__/\n*.pyc\n.env\n.DS_Store\n"); } /* --- Node.js --- */ function buildNode(zip,folder,app,code){ var title=slugTitle(app); var pn=pkgName(app); var src=code.replace(/^\`\`\`[\w]*\n?/m,"").replace(/\n?\`\`\`$/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)+"\n"; zip.file(folder+"package.json",pkgJson); var fallback="const express=require(\"express\");\nconst app=express();\napp.use(express.json());\n\napp.get(\"/\",(req,res)=>{\n res.json({message:\""+title+" API\"});\n});\n\nconst PORT=process.env.PORT||3000;\napp.listen(PORT,()=>console.log(\"Server on port \"+PORT));\n"; zip.file(folder+"src/index.js",src||fallback); zip.file(folder+".env.example","PORT=3000\n"); zip.file(folder+".gitignore","node_modules/\n.env\n.DS_Store\n"); zip.file(folder+"README.md","# "+title+"\n\nGenerated by PantheraHive BOS.\n\n## Setup\n\`\`\`bash\nnpm install\n\`\`\`\n\n## Run\n\`\`\`bash\nnpm run dev\n\`\`\`\n"); } /* --- 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:"\n\n\n\n\n"+title+"\n\n\n\n"+code+"\n\n\n\n"; zip.file(folder+"index.html",indexHtml); zip.file(folder+"style.css","/* "+title+" — styles */\n*{margin:0;padding:0;box-sizing:border-box}\nbody{font-family:system-ui,-apple-system,sans-serif;background:#fff;color:#1a1a2e}\n"); zip.file(folder+"script.js","/* "+title+" — scripts */\n"); zip.file(folder+"assets/.gitkeep",""); zip.file(folder+"README.md","# "+title+"\n\nGenerated by PantheraHive BOS.\n\n## Open\nDouble-click \`index.html\` in your browser.\n\nOr serve locally:\n\`\`\`bash\nnpx serve .\n# or\npython3 -m http.server 3000\n\`\`\`\n"); zip.file(folder+".gitignore",".DS_Store\nnode_modules/\n.env\n"); } /* ===== 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(/\n{2,}/g,"

"); h+="

"+hc+"

Generated by PantheraHive BOS
"; zip.file(folder+app+".html",h); zip.file(folder+"README.md","# "+title+"\n\nGenerated by PantheraHive BOS.\n\nFiles:\n- "+app+".md (Markdown)\n- "+app+".html (styled HTML)\n"); } 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);}});}