Generated Scripts
The doctai saves all generated scripts to disk for inspection and debugging.
Table of contents
- Naming Convention
- Git Integration
- Location
- When Testing Documentation
- Output Example
- Benefits
- Cleanup
- E2E Testing
Naming Convention
Generated scripts follow this naming pattern:
_gen-<source-path>-<random>.<ext>
Examples:
_gen-tests_fixtures_mock-projects_flask-api_README.md-9owq87.sh_gen-README.md-abc123.py_gen-https___example.com_docs_setup.md-xyz789.sh
Components:
- Prefix:
_gen-(for easy identification and gitignore) - Source: Sanitized path/URL of the documentation source
- Random: 6-character random suffix (lowercase letters + digits)
- Extension:
.shfor bash,.pyfor python, etc.
Git Integration
All generated scripts are automatically ignored by git:
# Generated scripts from doctai
_gen-*
This means you can inspect the scripts locally without committing them.
Location
Scripts are saved in the current working directory where you run the command:
# Run doctai
doctai --docs README.md
# Scripts will be saved in current directory
ls _gen-*
# _gen-README.md-abc123.sh
# _gen-README.md-def456.py
When Testing Documentation
When you run:
doctai --docs path/to/docs.md
The tool will:
- ✅ Generate test scripts from the documentation
- ✅ Save each script with the
_gen-naming pattern - ✅ Execute the scripts
- ✅ Show you where the scripts were saved
- ✅ Keep the scripts after execution (not deleted)
Output Example
================================================================================
STEP 3: Executing Test Scripts
================================================================================
============================================================
Executing bash script: _gen-README.md-abc123.sh
Saved to: /path/to/project/_gen-README.md-abc123.sh
============================================================
...
============================================================
Generated scripts saved to:
- /path/to/project/_gen-README.md-abc123.sh
- /path/to/project/_gen-README.md-def456.py
============================================================
Benefits
- Debugging: Inspect generated scripts to understand what the AI created
- Learning: See how the AI interprets documentation
- Iteration: Modify and re-run scripts manually if needed
- Troubleshooting: Share scripts when reporting issues
- Testing: Verify script quality in E2E tests
Cleanup
To remove all generated scripts:
rm -f _gen-*
Or clean scripts from a specific source:
rm -f _gen-README.md-*
E2E Testing
When running E2E tests, the generated scripts are also saved:
pytest tests/e2e/ -v -m requires_api
# Check generated scripts
ls _gen-*
# _gen-s_tests_fixtures_mock-projects_flask-api_README.md-xyz789.sh
# _gen-s_tests_fixtures_mock-projects_nodejs-cli_README.md-abc123.sh
This allows you to inspect what scripts the AI generated during testing.