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.
🎬 How It Works
Generated Tutorial
Here's the result - a fully narrated video tutorial generated from the test above:
https://github.com/user-attachments/assets/de1d647b-527b-4c66-a46b-7b86247c345c
🚀 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.
- Stable Sync: Keeps narration aligned even when multiple narration segments map to one test step.
📋 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
For local development with
uv(from source):uv sync --extra dev
-
Install Playwright Browsers:
playwright install chromium
If you used
uv, run:uv run 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
Metadata
Release files for codevid 1.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| codevid-1.5.0.tar.gz | 3.3 MB | With provenance | Details for codevid-1.5.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| codevid-1.5.0-py3-none-any.whl | Python 3 | none | any | Details for codevid-1.5.0-py3-none-any.whl |
Total release size: 3.4 MB
Release files / codevid-1.5.0.tar.gz
| Download URL | codevid-1.5.0.tar.gz |
|---|---|
| Size | 3.3 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
480e81e0f1d719bc0d1832b4bb7ae9db8c42d055d40bafc94f704ba401971139
|
|
BLAKE2b-256 checksum How to use checksums |
459de95fff0c1160d8c39b138e8ee36c24b7aac5d3aedac3e387ee2b2eefcf07
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 21, 2026.
Transparency logRelease files / codevid-1.5.0-py3-none-any.whl
| Download URL | codevid-1.5.0-py3-none-any.whl |
|---|---|
| Size | 69.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e2999ea0feab24065bc1d68415936d571140d91dd63e5a5929d2295ec34f5b87
|
|
BLAKE2b-256 checksum How to use checksums |
e85c3f6f9913b530c1379f8736532b9b82a41b16d2224d20f4f25c27425a23e0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 21, 2026.
Transparency logSecurity for codevid 1.5.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for codevid-1.5.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 21, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.