YouTube Script Writer is an open-source AI-agent that streamlines script generation for YouTube videos. By inputting a video title, language, and tone (e.g., "Incorporate Humor," "Present Only Facts," "Emotional," "Inspirational"), content creators can quickly generate tailored scripts.
The tool adapts to various video lengths, from short TikTok-style clips (15-30 seconds) to longer formats (10-30 minutes), handling both research and writing so creators can focus on delivering their unique content.
Example: Deepseek: Deepseek-Example
- 📝 AI-Powered Scripts – Generates structured, engaging scripts automatically.
- 🌍 Smart Research – Gathers accurate, real-time information.
- 🧠 Context-Aware Writing – Ensures logical flow and coherence.
- ⚡ Fast & Efficient – Speeds up content creation with minimal effort.
- 📈 Scalable – Suitable for solo creators and large teams.
.
├── scripts/ # Output folder for generated scripts
├── src/ # Source code directory
│ ├── agent_prompt/ # Handles AI agent prompts
│ │ ├── __init__.py
│ │ ├── get_prompt.py # Retrieves specific agent prompts
│ │ └── prompt.yaml # Stores all prompt templates
│ ├── blueprint/ # Generates initial script blueprints
│ │ ├── __init__.py
│ │ ├── create_blueprint.py # Defines the script's initial structure
│ │ └── structured_output_schema.py # Defines schema for structured output
│ ├── create_description/ # Generates video descriptions
│ │ ├── __init__.py
│ │ └── create_description.py # Creates and formats video descriptions
│ ├── internet_research/ # Conducts internet-based research
│ │ ├── __init__.py
│ │ └── researcher.py # Fetches and processes online data
│ ├── refined_blueprint/ # Refines blueprints based on research
│ │ ├── __init__.py
│ │ ├── refined_blueprint.py # Enhances the initial blueprint
│ │ └── structured_output_schema.py # Defines refined output schema
│ ├── writer/ # Handles script writing
│ │ ├── __init__.py
│ │ └── writer.py # Generates final script text
│ ├── __init__.py
│ ├── main.py # Main execution script
│ ├── datatypes.py # Defines custom data types
├── LICENSE # License information
├── README.md # Project documentation
├── cli.py # Command-line interface for running scripts
├── requirements.txt # List of dependencies
└── ui.py # User interface module
Screen.Recording.2025-03-02.at.4.mp4
Screen.Recording.2025-03-02.at.3.32.00.PM.1.mp4
YouTube Script Writer follows a structured approach to script generation:
- Create Initial Outline - Generates a rough structure of the script.
- Perform Internet Research - Collects relevant data from various sources.
- Refine Outline - Improves the initial outline based on research findings.
- Write Each Section - Generates detailed content for each section of the script.
-
Install Python 3.11 or later.
-
Clone the project and navigate to the directory:
git clone https://github.com/rahulanand1103/youtube-script-writer.git cd youtube-script-writer -
Set up API keys by exporting them or storing them in a
.envfile:export OPENAI_API_KEY={Your OpenAI API Key here} export YDC_API_KEY={Your API search key here, replacing <__> with \<_\__\> or put inside ""}
-
Install dependencies:
pip install -r requirements.txt
-
Run the CLI or UI:
-
Using the CLI:
python cli.py
-
Using the Streamlit UI:
streamlit run ui.py
-
-
Open the UI in your browser:
http://localhost:8000
You can run both the CLI and UI interfaces using Docker Compose without installing Python or dependencies directly on your system.
- Docker and Docker Compose installed on your system.
-
To run only one of the services:
Add your API keys in the command or use an.envfile.# For UI only sudo OPENAI_API_KEY="your_openai_key" YDC_API_KEY="your_ydc_key" docker-compose up ui # For CLI only sudo OPENAI_API_KEY="your_openai_key" YDC_API_KEY="your_ydc_key" docker-compose up cli