Youtube: https://github.com/rahulanand1103
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
.
βββ 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
https://github.com/user-attachments/assets/b215ad58-58f9-42d7-922e-ec7fcfe916a5
https://github.com/user-attachments/assets/53ab03ca-0d0d-4c83-9303-f2a74f13c85b
YouTube Script Writer follows a structured approach to script generation:
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 .env file:
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.
To run only one of the services:
Add your API keys in the command or use an .env file.
# 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