🏭 Script-O-Matic
Welcome to Script-O-Matic, your friendly neighborhood Python script generator! 🐍✨
🎯 What is Script-O-Matic?
Script-O-Matic is a CLI tool that turns your ideas into fully-functional Python scripts. It uses structured output from the OpenAI API to generate scripts that are both creative and functional, as well as DSPy to refine your query to make it more specific and actionable. Check out the /example-scripts folder for some examples of what Script-O-Matic can make, feel free to add to it.
🚀 Features
Generate custom Python scripts based on your prompts
Get inspiration for script ideas with --inspo
Automatic package installation
Interactive mode for script refinement
Powered by the latest AI models
🛠 Installation
First, make sure you have Python 3.11 or later installed. Then, you can install Script-O-Matic using pip:
pip install scriptomatic
🔑 Setup
Yeah, you're gonna need an OpenAI API key. You can get one from OpenAI's website.
"But Ty, I don't want to use OpenAI, Claude is better at coding!" I agree with you. But Claude doesn't support structured outputs yet. When it does make a PR plz.
Set it as an environment variable:
export OPENAI_API_KEY='your-api-key-here'
Or, for the Windows wizards out there:
set OPENAI_API_KEY=your-api-key-here
🎭 Usage
CLI Magic
Generate a script with a simple prompt:
scriptomatic "Create a script that converts a jpg to a png"
Need Inspiration?
Get inspired with the --inspo flag, which creates five script ideas from your fuzzy idea:
scriptomatic --inspo
Generate and test the script in a loop
Script-O-Matic will keep trying to run the script until it gets it right, with a human-in-the-loop to help refine the script.
scriptomatic "Web scraper for cat facts" --loop
Let Script-O-Matic keep trying until it gets it right
Careful with this one. It's essentially an infinite loop until it gets it right, or you kill it with ctrl+c.
scriptomatic "Calculate prime numbers" --autoloop
Python Usage
The Scriptomatic class can be imported and used in your Python scripts, and has a whole host of methods for generating scripts and getting inspiration. Everything in the project is modular and extensible, so you can customize Script-O-Matic to your heart's content.
from scriptomatic import Scriptomatic
scriptomatic = Scriptomatic(model="gpt-4o-mini", temperature=0.6)
scriptomatic.generate_script("Create a script that builds scripts")
🌟 Contributing
Found a bug? Have an idea for an enchanting new feature? Let me know! Open an issue or submit a pull request here on GitHub.
📜 License
Script-O-Matic is released under the MIT License. Do whatever you want with it!
Metadata
Release files for scriptomatic 1.0.3
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 |
|---|---|---|---|---|
| scriptomatic-1.0.3.tar.gz | 11.5 kB | Without provenance | Details for scriptomatic-1.0.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| scriptomatic-1.0.3-py3-none-any.whl | Python 3 | none | any | Details for scriptomatic-1.0.3-py3-none-any.whl |
Total release size: 23.5 kB
Release files / scriptomatic-1.0.3.tar.gz
| Download URL | scriptomatic-1.0.3.tar.gz |
|---|---|
| Size | 11.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9299a884c0604eb85500437c0b36fc4162716acb9c3cd8e5515cf3879a9c0f37
|
|
BLAKE2b-256 checksum How to use checksums |
b06e99ebd774652ba4eebe80d347d98b8b488912684a8e1e54a5f2c156dcb8c2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.3 CPython/3.11.9 Darwin/23.5.0
|
Release files / scriptomatic-1.0.3-py3-none-any.whl
| Download URL | scriptomatic-1.0.3-py3-none-any.whl |
|---|---|
| Size | 12.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6125c32b21c0d79e44f3f7d7785ac0b9c255c7acb1fdb8569c5e013485888860
|
|
BLAKE2b-256 checksum How to use checksums |
683c2ded26f9f2736e0d21f7596a0e4c33fb692ebef3d95a61ebc09871b4629b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.3 CPython/3.11.9 Darwin/23.5.0
|
Security for scriptomatic 1.0.3
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A 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.