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

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

Comprehensive Marketing Strategy: AI Sales Script Generator

This document outlines a comprehensive marketing strategy for the "AI Sales Script Generator," a tool designed to generate conversion-optimized sales scripts for various scenarios (cold calls, demos, follow-ups, objection handling) with industry-specific language.


1. Target Audience Analysis

Understanding our ideal customer is paramount to tailoring our marketing efforts effectively. Our primary target audience consists of professionals and organizations focused on improving sales performance and efficiency.

Primary Target Segments:

  • Sales Leaders & Managers (Mid-Market to Enterprise):

* Pain Points: Inconsistent messaging across sales teams, long ramp-up times for new reps, low conversion rates on specific sales stages, difficulty in handling complex objections, lack of data-driven insights for script optimization, need for standardized, high-performing sales processes.

* Goals: Increase team productivity, improve conversion rates, reduce sales cycle length, enhance sales training effectiveness, ensure brand consistency in sales communications.

* Demographics: VPs of Sales, Sales Directors, Heads of Business Development, Sales Enablement Managers.

* Psychographics: Value efficiency, ROI, scalability, competitive advantage through technology, data-driven decision-making.

  • Small Business Owners & Entrepreneurs:

* Pain Points: Limited resources for sales training and script development, personal time constraints, struggle with crafting compelling sales pitches, lack of sales expertise, need for quick and effective sales materials.

* Goals: Generate more leads, close more deals, reduce personal workload, professionalize their sales approach, compete with larger businesses.

* Demographics: CEOs of startups, founders, solopreneurs, small business owners across various industries.

* Psychographics: Resourceful, growth-oriented, open to leveraging technology for operational efficiency, value ease of use and immediate impact.

  • Marketing Professionals (within B2B organizations):

* Pain Points: Disconnect between marketing messaging and sales execution, inconsistent brand voice in sales interactions, difficulty in providing sales with up-to-date, conversion-optimized content.

* Goals: Ensure alignment between marketing and sales, maintain consistent brand messaging, provide sales teams with effective tools that reflect current campaigns.

* Demographics: Marketing Directors, Content Managers, Brand Managers.

* Psychographics: Collaborative, brand-conscious, data-oriented, focused on end-to-end customer journey optimization.

Secondary Target Segments:

  • Sales Representatives (Individual Contributors):

* Pain Points: Struggle with specific objections, need quick access to effective scripts, desire to improve personal performance, fear of sounding robotic or unprepared.

* Goals: Hit quotas, improve personal conversion rates, sound more confident and professional, reduce stress associated with script creation.

  • Sales Trainers & Consultants:

* Pain Points: Need for innovative tools to enhance their training programs, desire to provide clients with actionable, cutting-edge resources.

* Goals: Offer advanced solutions to clients, differentiate their services, improve client outcomes.


2. Channel Recommendations

A multi-channel approach will be most effective, leveraging both inbound and outbound strategies to reach our diverse target audience segments.

Inbound Marketing Channels:

  • Content Marketing (Blog, Whitepapers, Case Studies):

* Focus: Thought leadership on sales enablement, AI in sales, conversion optimization, objection handling best practices.

* Examples: "How AI is Revolutionizing Sales Scripting," "10 Cold Call Scripts That Actually Convert," "The Ultimate Guide to Handling Sales Objections with AI."

* Deliverables: Long-form blog posts, downloadable guides, customer success stories showcasing ROI.

  • Search Engine Optimization (SEO):

* Focus: Ranking for high-intent keywords related to sales script generation, AI sales tools, sales coaching, and specific script types.

* Keywords: "AI sales script generator," "cold call script template," "sales objection handling scripts," "demo script builder," "sales follow-up email generator," "sales enablement AI."

* Action: Optimize website content, build high-quality backlinks, ensure technical SEO best practices.

  • Webinars & Online Events:

* Focus: Product demonstrations, expert panels on sales strategy, workshops on leveraging AI for sales.

* Examples: "Live Demo: Generate Your First AI-Powered Sales Script," "Mastering Objection Handling with AI: A Practical Workshop."

* Action: Host monthly webinars, partner with industry influencers or associations.

  • Email Marketing:

* Focus: Nurturing leads acquired through content downloads, webinar registrations, or free trials.

* Content: Product updates, success stories, sales tips, exclusive offers, invitations to events.

* Action: Segment lists based on engagement and buyer persona, implement automated drip campaigns.

  • Product-Led Growth (PLG) / Free Trial:

* Focus: Allowing users to experience the core value of the script generator firsthand.

* Action: Offer a robust free trial (e.g., generate 3-5 scripts for free, limited features) to demonstrate immediate value and drive organic adoption.

Outbound & Paid Marketing Channels:

  • Social Media Marketing (LinkedIn, Twitter):

* Focus: Professional networking, industry news, thought leadership, product feature announcements, success stories.

* LinkedIn: Target sales leaders, VPs of Sales, small business owners by job title, industry, and company size.

* Twitter: Engage with sales tech communities, share quick tips, participate in relevant hashtags.

* Action: Regular posting, sponsored content on LinkedIn, engaging with industry thought leaders.

  • Paid Advertising (Google Ads, LinkedIn Ads):

* Google Search Ads: Target high-intent commercial keywords (e.g., "buy sales script software," "best AI sales tool").

* LinkedIn Ads: Precisely target sales professionals, managers, and small business owners based on job title, industry, and company size. Use retargeting campaigns for website visitors.

* Action: A/B test ad copy, landing pages, and audience targeting continuously.

  • Partnerships & Integrations:

* Focus: Collaborating with complementary sales tech providers (CRMs like HubSpot/Salesforce, sales enablement platforms like Salesloft/Outreach, marketing automation tools).

* Action: Seek co-marketing opportunities, API integrations, and placement in partner marketplaces.

  • Direct Sales / Outbound Prospecting:

* Focus: For larger enterprise accounts or strategic partnerships.

* Action: Develop a targeted outreach strategy (email, LinkedIn InMail) for companies with significant sales teams or specific industry needs.


3. Messaging Framework

Our messaging framework will highlight the core value proposition, address specific pain points, and differentiate our "AI Sales Script Generator" from competitors.

Core Value Proposition:

"Empower your sales team to close more deals faster and more consistently by instantly generating data-driven, conversion-optimized, and industry-specific sales scripts with AI."

Key Messaging Pillars & Benefits (Addressing Pain Points):

  • For Sales Leaders/Managers:

* Headline: "Transform Your Sales Performance with AI-Powered Scripts."

* Benefit 1 (Consistency & Scalability): "Ensure every rep delivers a high-quality, on-brand message, reducing ramp-up time and standardizing excellence across your team."

* Benefit 2 (Conversion Optimization): "Leverage AI to generate scripts proven to convert, dramatically improving your team's win rates across cold calls, demos, and follow-ups."

* Benefit 3 (Effective Objection Handling): "Equip your reps with intelligent, pre-scripted responses to any objection, turning challenges into opportunities."

* Benefit 4 (Time & Resource Efficiency): "Eliminate hours spent on script writing and training, allowing your team to focus on selling."

  • For Small Business Owners/Entrepreneurs:

* Headline: "Close Deals Faster: Your AI Sales Script Expert."

* Benefit 1 (Professionalism & Impact): "Instantly craft compelling, professional sales scripts that resonate with your prospects, even without extensive sales experience."

* Benefit 2 (Time Savings): "Stop guessing and start selling. Generate optimized scripts in minutes, freeing you to focus on growing your business."

* Benefit 3 (Confidence & Clarity): "Approach every sales interaction with confidence, knowing you have a proven script tailored to your unique offering and industry."

  • For Marketing Professionals:

* Headline: "Align Marketing & Sales: Consistent Messaging, Powerful Results."

* Benefit 1 (Brand Consistency): "Bridge the gap between marketing campaigns and sales conversations, ensuring your brand voice and messaging are consistent at every touchpoint."

* Benefit 2 (Data-Driven Alignment): "Provide your sales team with dynamic, AI-optimized scripts that reflect the latest market insights and campaign strategies."

Unique Selling Proposition (USP):

  • Comprehensive Scenario Coverage: Not just cold calls, but all critical sales stages (cold calls, demos, follow-ups, objection handling) within one platform.
  • Deep Industry & Customization: AI that understands and integrates specific industry language and nuances for highly relevant and effective scripts.
  • Conversion-Focused AI: Our AI is specifically trained on high-performing sales data to optimize for conversion rates, not just generic script generation.

Tone of Voice:

Professional, Authoritative, Innovative, Results-Oriented, Empowering, and Accessible.

Call to Action (CTA) Examples:

  • "Generate Your First AI-Powered Script Free"
  • "Request a Personalized Demo"
  • "Start Your Free Trial Today"
  • "See How AI Can Transform Your Sales"
  • "Download Our Guide: AI for Sales Scripting Mastery"

4. Key Performance Indicators (KPIs)

Measuring the success of our marketing strategy is crucial for continuous optimization. We will track a mix of awareness, engagement, conversion, and retention metrics.

Awareness & Reach KPIs:

  • Website Traffic: Unique visitors, page views, traffic sources (organic, paid, social, direct).
  • Brand Mentions & Share of Voice: Tracking mentions across social media, news, and industry forums.
  • Social Media Reach & Impressions: Number of unique users who saw our content.

Engagement KPIs:

  • Content Engagement: Blog post reads, whitepaper downloads, webinar attendance rates, video views.
  • Social Media Engagement: Likes, shares, comments, click-through rates (CTR) on posts.
  • Email Engagement: Open rates, click-through rates (CTR) on email campaigns.
  • Time on Site/Page: Especially for key product and pricing pages.

Lead Generation & Conversion KPIs:

  • Marketing Qualified Leads (MQLs): Number of leads identified as having a higher propensity to become customers based on engagement (e.g., demo requests, free trial sign-ups, high-value content downloads).
  • Sales Qualified Leads (SQLs): Number of MQLs accepted by the sales team.
  • Free Trial Sign-ups: Number of users starting a free trial.
  • Free Trial to Paid Conversion Rate: Percentage of free trial users who convert to a paid subscription.
  • Demo Requests: Number of prospects requesting a product demonstration.
  • Landing Page Conversion Rates:
gemini Output

AI Sales Script Generator - Comprehensive Script Package

This document provides a comprehensive suite of conversion-optimized sales scripts designed to enhance your sales team's effectiveness across various stages of the sales cycle. These scripts are crafted based on best practices in sales communication and are structured to be highly adaptable to your specific product, service, and target industry.


Introduction

Effective sales communication is the cornerstone of successful conversions. This package offers meticulously developed scripts for critical sales interactions: cold calls, product demonstrations, follow-ups, and handling common objections. Each script is designed to be customer-centric, value-driven, and actionable, providing your team with the tools to engage prospects confidently and move them through the sales funnel.


Key Principles of High-Converting Sales Scripts

Before diving into the specific scripts, understanding these foundational principles will maximize their impact:

  • Customer-Centricity: Always focus on the prospect's needs, challenges, and desired outcomes, rather than just listing product features.
  • Value-Driven: Clearly articulate the unique benefits and return on investment (ROI) your solution provides.
  • Conciseness & Clarity: Get straight to the point, using clear, unambiguous language. Respect the prospect's time.
  • Conversational Tone: Scripts should serve as a guide, not a rigid monologue. Encourage dialogue and active listening.
gemini Output

AI Sales Script Generator: Your Personalized Conversion Engine

This document outlines the detailed capabilities and structure of the AI Sales Script Generator, designed to empower your sales team with conversion-optimized scripts tailored for every stage of the sales cycle. Leveraging advanced AI, this tool ensures your messaging is precise, persuasive, and perfectly aligned with your industry and target audience.


1. Overview and Value Proposition

The AI Sales Script Generator is an intelligent system engineered to produce high-quality, actionable sales scripts. Its core value lies in:

  • Increased Sales Efficiency: Rapidly generate scripts, reducing preparation time for your sales team.
  • Enhanced Conversion Rates: Scripts are designed with proven sales methodologies and persuasive language patterns to maximize success.
  • Consistency Across Team: Ensure a unified, professional voice and message across your entire sales organization.
  • Adaptability & Scalability: Easily generate scripts for diverse products, services, industries, and sales scenarios.
  • Overcoming Common Challenges: Provides effective strategies for objection handling and follow-ups, turning potential roadblocks into opportunities.

2. Core Script Types Generated

The generator is capable of producing comprehensive scripts for the following critical sales interactions:

  • Cold Call Scripts: Designed to capture attention, establish rapport, qualify leads, and secure initial interest or meetings.
  • Product/Service Demo Scripts: Structured to highlight key benefits, address pain points, showcase value, and guide the prospect towards understanding and desire.
  • Follow-Up Scripts: Crafted for various stages (post-call, post-demo, proposal sent, no-response) to maintain engagement, provide value, and drive the next steps.
  • Objection Handling Scripts: Provides pre-formulated, empathetic, and persuasive responses to common objections (e.g., "It's too expensive," "I'm not interested," "Send me more information").

3. Input Parameters for Script Generation (How it Works)

To generate a highly customized and effective script, the AI requires specific inputs. These inputs allow the system to tailor the language, tone, and content precisely to your needs:

  • Script Type: (e.g., Cold Call, Demo, Follow-Up, Objection Handling)
  • Target Industry: (e.g., SaaS, Healthcare, Financial Services, Manufacturing, Real Estate)
  • Product/Service Name: (e.g., "PantheraCRM," "HiveConnect AI Platform," "Quantum Analytics Suite")
  • Key Features & Benefits: (List 3-5 core features and their corresponding benefits for the customer)

Example:* Feature: "Automated Lead Scoring" -> Benefit: "Saves sales reps time and focuses on high-potential leads."

  • Target Audience/Persona: (e.g., Small Business Owner, Enterprise CTO, Marketing Director, HR Manager)
  • Primary Pain Point Solved: (What specific problem does your product/service address for the customer?)
  • Desired Outcome/Next Step: (What do you want the prospect to do after the script? e.g., "Schedule a full demo," "Agree to a discovery call," "Review proposal," "Provide feedback")
  • Company Name (Optional): To personalize branding.
  • Tone of Voice (Optional): (e.g., Professional, Friendly, Authoritative, Empathetic, Energetic)
  • Specific Objection to Handle (for Objection Scripts only): (e.g., "Your solution is too expensive," "We're happy with our current provider.")

4. Output Structure and Components of a Generated Script

Each generated script will be meticulously structured to guide the sales professional through the interaction effectively. A typical script includes the following sections:

Example: Cold Call Script Structure

1. Script Title:

* e.g., "Cold Call Script: PantheraCRM for SMBs"

2. Goal:

* e.g., "To schedule a 15-minute discovery call to explore how PantheraCRM can streamline lead management."

3. Target Persona:

* e.g., "Small Business Owner/Sales Manager"

4. Opening/Hook (15-20 seconds):

* Introduction: Clear identification (Your Name, Company).

* Permission-Based Opener: Respectful, brief check for availability.

* Value Proposition/Intrigue: State a compelling, relevant benefit or ask a provocative question related to their pain point.

Example:* "Hi [Prospect Name], this is [Your Name] from [Your Company]. I know you're busy, do you have 30 seconds for me to explain why I called?"

Example:* "We help companies like yours [solve primary pain point] by [key benefit]."

5. Discovery/Qualification Questions:

* Open-Ended Questions: To uncover needs, challenges, and priorities.

* Pain Point Confirmation: Validate the problem your solution addresses.

Example:* "How are you currently managing your customer relationships and sales pipeline?"

Example:* "What are some of the biggest challenges you face in converting leads into paying customers?"

6. Solution Pitch (Brief & Benefit-Oriented):

* Connect to Pain: Directly link your solution to their identified needs.

* Highlight 1-2 Key Benefits: Focus on impact, not just features.

Example:* "Based on what you've shared, PantheraCRM could significantly help by automating your lead scoring, which means your sales team spends more time closing deals and less time chasing cold leads."

7. Objection Handling (Pre-emptive & Reactive):

* Common Objections: Pre-written responses for typical pushbacks (e.g., "I'm not interested," "Send me an email").

* Framework: Acknowledge, Empathize, Reframe, Offer Solution/Next Step.

Example (for "Send me an email"):* "I can certainly do that, [Prospect Name]. To ensure I send you the most relevant information, could you quickly tell me what specific challenge you're hoping to address with a CRM?"

8. Call to Action (Clear & Specific):

* Propose Next Step: Direct and easy to understand.

* Time-Bound: Suggest specific times or a timeframe.

Example:* "Would you be open to a quick 15-minute online demonstration next Tuesday or Wednesday to see how PantheraCRM could directly impact your sales process?"

9. Closing:

* Confirmation: Reiterate the next step.

* Thank You: Professional closing.

Example: Objection Handling Script Structure

1. Objection:

* e.g., "Your solution is too expensive."

2. Goal:

* To understand the prospect's perceived value and cost, then reframe the investment in terms of ROI or value.

3. Recommended Response:

* Acknowledge & Empathize: "I completely understand price is a significant consideration, and you want to ensure you're getting the best value."

* Probe for Understanding: "Could you tell me a bit more about what you're comparing our pricing against, or what your budget expectations were?"

* Reframe Value/ROI: "Many of our clients initially have similar concerns, but they quickly find that the return on investment from [specific benefit, e.g., reduced operational costs, increased revenue, time savings] far outweighs the initial outlay. For instance, [Client X] saw a [Y%] increase in efficiency within [Z] months."

* Break Down Cost (if applicable): "When you look at it, the cost per user per day is actually less than a cup of coffee, for a tool that can [major impact]."

* Offer Solution/Next Step: "Perhaps we could review a custom ROI projection based on your specific needs? Or, let's focus on the features that would deliver the most immediate impact for you."


5. Conversion Optimization Strategies

The AI incorporates several strategies to ensure scripts are not just informative, but persuasive and conversion-focused:

  • Benefit-Driven Language: Emphasizes what the customer gains, rather than just listing features.
  • Problem-Solution Framework: Clearly articulates the customer's pain and positions your offering as the ideal remedy.
  • Psychological Triggers: Integrates principles like scarcity, social proof, authority, and reciprocity where appropriate.
  • Clear Calls to Action: Each script segment leads to a logical, low-friction next step.
  • Addressing WIIFM (What's In It For Me?): Every point is framed from the prospect's perspective.
  • Industry-Specific Terminology: Uses language that resonates directly with the target industry, building trust and credibility.
  • Empathetic Tone: Encourages understanding and rapport-building, especially crucial in objection handling.

6. Refinement and Customization Capabilities

While the AI generates robust initial scripts, the platform allows for further refinement to perfectly match your unique sales style and evolving market conditions:

  • Direct Editing: Sales teams can directly edit and fine-tune any generated script within the platform.
  • Feedback Loop: Mechanisms to provide feedback on script performance, which can be used to inform future AI generations (in advanced iterations).
  • Variant Generation: Ability to generate multiple versions of a script based on slightly altered inputs (e.g., different tones, different primary benefits).
  • Template Saving: Save refined scripts as templates for future use or for onboarding new sales reps.
  • A/B Testing Support: Scripts are designed to be easily adaptable for A/B testing different openers, CTAs, or objection responses to identify what performs best.

7. Benefits to Your Sales Organization

  • Empowered Sales Reps: Provide reps with confidence and a clear roadmap for every interaction.
  • Reduced Ramp-Up Time: New hires can quickly get up to speed with proven sales language.
  • Data-Driven Improvement: Lay the groundwork for tracking script effectiveness and continuously refining approaches.
  • Consistent Brand Messaging: Ensure all customer-facing communications align with your brand voice and value proposition.
  • Competitive Advantage: Leverage AI to outmaneuver competitors with superior, personalized communication.

8. Getting Started

To begin generating your conversion-optimized sales scripts, please provide the required input parameters as detailed in Section 3. Our system is ready to transform your sales outreach and engagement strategy.

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);}});}