Generate video tutorials from automated tests using LLMs
Project description
Codevid
Turn your automated tests into professional video tutorials.
Codevid is a CLI tool that uses AI to convert your existing Python Playwright tests into narrated, captioned video tutorials. It analyzes your test code, generates a natural language script, records the execution, and automatically edits everything into a polished video.
🚀 Features
- Automated Scriptwriting: Uses LLMs (OpenAI/Anthropic) to explain why an action is happening, not just what is happening.
- Real Execution: Records your actual app in a browser to ensure the video matches reality.
- AI Voiceovers: Integrated Text-to-Speech (OpenAI/Edge TTS) for professional narration.
- Smart Editing: Automatically synchronizes video speed with audio narration and adds captions.
📋 Prerequisites
- Python 3.11+
- OpenAI API Key: Codevid requires access to an LLM to generate the narration script.
🛠️ Installation
-
Install Codevid (assuming it is available via pip or from source):
pip install codevid
-
Install Playwright Browsers:
playwright install chromium
🔑 Configuration
You must provide your OpenAI API key for the tool to function.
export OPENAI_API_KEY="sk-..."
(Alternatively, you can configure Anthropic/Claude keys if you prefer that provider in the config).
⚡ Quick Start
-
Initialize a project (optional, creates a
codevid.yamlconfig file):codevid init -
Generate a video: Pass your Playwright test file to the
generatecommand.codevid generate examples/test_login.py -o login_tutorial.mp4
📖 Usage Examples
Basic Generation
Uses default settings (Anthropic/Edge TTS if not configured otherwise) to generate a video.
codevid generate tests/my_test.py
Using OpenAI for Everything
Specify the LLM and TTS provider explicitly via CLI flags.
codevid generate tests/my_test.py \
--llm openai \
--tts openai \
--voice alloy \
--output tutorial.mp4
Preview Script Only
Want to see what the AI will say before recording? Use preview mode.
codevid preview tests/my_test.py
List Available Voices
See which voices are available for your chosen provider.
codevid list-voices openai
⚠️ Current Limitations
- Framework Support: Currently, Codevid only supports Python Playwright tests.
- Structure: Tests must be written as standard functions or Pytest functions (e.g.,
def test_example(page):).
📄 License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file codevid-1.0.6.tar.gz.
File metadata
- Download URL: codevid-1.0.6.tar.gz
- Upload date:
- Size: 210.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
81466034d9ab25eecd2ff8baeb947b275f6766231caccac961fecce062049847
|
|
| MD5 |
ae9df1a7d5f3d45e6b1e5e161e7f019d
|
|
| BLAKE2b-256 |
ae6a4555bf7aa66b3398394434b9d198fc3003f51770313665326c79ae444626
|
Provenance
The following attestation bundles were made for codevid-1.0.6.tar.gz:
Publisher:
release.yml on MStaniaszek1998/codevid
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
codevid-1.0.6.tar.gz -
Subject digest:
81466034d9ab25eecd2ff8baeb947b275f6766231caccac961fecce062049847 - Sigstore transparency entry: 768633135
- Sigstore integration time:
-
Permalink:
MStaniaszek1998/codevid@ad9afcee36b9a1117359d15f9fe4756f6d13057b -
Branch / Tag:
refs/heads/main - Owner: https://github.com/MStaniaszek1998
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@ad9afcee36b9a1117359d15f9fe4756f6d13057b -
Trigger Event:
push
-
Statement type:
File details
Details for the file codevid-1.0.6-py3-none-any.whl.
File metadata
- Download URL: codevid-1.0.6-py3-none-any.whl
- Upload date:
- Size: 53.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a23593ab59b62b5e48cd7d3f4fe9d5dd77ef96a7e7788b19cd125e08979d11aa
|
|
| MD5 |
3b98ef712bfd392caa8bcf17d634561b
|
|
| BLAKE2b-256 |
b0a7c128eff4e1863d15674b90ca5910b218a678efd3dce816eedd3bec8c52cd
|
Provenance
The following attestation bundles were made for codevid-1.0.6-py3-none-any.whl:
Publisher:
release.yml on MStaniaszek1998/codevid
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
codevid-1.0.6-py3-none-any.whl -
Subject digest:
a23593ab59b62b5e48cd7d3f4fe9d5dd77ef96a7e7788b19cd125e08979d11aa - Sigstore transparency entry: 768633144
- Sigstore integration time:
-
Permalink:
MStaniaszek1998/codevid@ad9afcee36b9a1117359d15f9fe4756f6d13057b -
Branch / Tag:
refs/heads/main - Owner: https://github.com/MStaniaszek1998
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@ad9afcee36b9a1117359d15f9fe4756f6d13057b -
Trigger Event:
push
-
Statement type: