scriptomatic


Namescriptomatic JSON
Version 1.0.3 PyPI version JSON
download
home_pagehttps://github.com/tyfiero/scriptomatic
SummaryA cli tool to generate custom Python scripts
upload_time2024-09-04 03:33:41
maintainerNone
docs_urlNone
authorTy Fiero
requires_python<4.0,>=3.11
licenseMIT
keywords script generator ai tool-use
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 🏭 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:

```bash
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:

```bash
export OPENAI_API_KEY='your-api-key-here'
```

Or, for the Windows wizards out there:

```bash
set OPENAI_API_KEY=your-api-key-here
```

## 🎭 Usage

### CLI Magic

Generate a script with a simple prompt:

```bash
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:

```bash
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.

```bash
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.

```bash
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.

```python
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!

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/tyfiero/scriptomatic",
    "name": "scriptomatic",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.11",
    "maintainer_email": null,
    "keywords": "script, generator, ai, tool-use",
    "author": "Ty Fiero",
    "author_email": "tyfierodev@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/b0/6e/99ebd774652ba4eebe80d347d98b8b488912684a8e1e54a5f2c156dcb8c2/scriptomatic-1.0.3.tar.gz",
    "platform": null,
    "description": "# \ud83c\udfed Script-O-Matic\n\nWelcome to Script-O-Matic, your friendly neighborhood Python script generator! \ud83d\udc0d\u2728\n\n## \ud83c\udfaf What is Script-O-Matic?\n\nScript-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.\n\n## \ud83d\ude80 Features\n\nGenerate custom Python scripts based on your prompts\nGet inspiration for script ideas with `--inspo`\nAutomatic package installation\nInteractive mode for script refinement\nPowered by the latest AI models\n\n## \ud83d\udee0 Installation\n\nFirst, make sure you have Python 3.11 or later installed. Then, you can install Script-O-Matic using pip:\n\n```bash\npip install scriptomatic\n```\n\n## \ud83d\udd11 Setup\n\nYeah, you're gonna need an OpenAI API key. You can get one from OpenAI's website.\n\n\"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.\n\nSet it as an environment variable:\n\n```bash\nexport OPENAI_API_KEY='your-api-key-here'\n```\n\nOr, for the Windows wizards out there:\n\n```bash\nset OPENAI_API_KEY=your-api-key-here\n```\n\n## \ud83c\udfad Usage\n\n### CLI Magic\n\nGenerate a script with a simple prompt:\n\n```bash\nscriptomatic \"Create a script that converts a jpg to a png\"\n```\n\n### Need Inspiration?\n\nGet inspired with the `--inspo` flag, which creates five script ideas from your fuzzy idea:\n\n```bash\nscriptomatic --inspo\n```\n\n### Generate and test the script in a loop\n\nScript-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.\n\n```bash\nscriptomatic \"Web scraper for cat facts\" --loop\n```\n\n### Let Script-O-Matic keep trying until it gets it right\n\nCareful with this one. It's essentially an infinite loop until it gets it right, or you kill it with ctrl+c.\n\n```bash\nscriptomatic \"Calculate prime numbers\" --autoloop\n```\n\n### Python Usage\n\nThe 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.\n\n```python\nfrom scriptomatic import Scriptomatic\n\nscriptomatic = Scriptomatic(model=\"gpt-4o-mini\", temperature=0.6)\n\nscriptomatic.generate_script(\"Create a script that builds scripts\")\n```\n\n## \ud83c\udf1f Contributing\n\nFound a bug? Have an idea for an enchanting new feature? Let me know! Open an issue or submit a pull request here on GitHub.\n\n## \ud83d\udcdc License\n\nScript-O-Matic is released under the MIT License. Do whatever you want with it!\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A cli tool to generate custom Python scripts",
    "version": "1.0.3",
    "project_urls": {
        "Homepage": "https://github.com/tyfiero/scriptomatic",
        "Repository": "https://github.com/tyfiero/scriptomatic"
    },
    "split_keywords": [
        "script",
        " generator",
        " ai",
        " tool-use"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "683c2ded26f9f2736e0d21f7596a0e4c33fb692ebef3d95a61ebc09871b4629b",
                "md5": "0cfbe963b58d15ac4518c88a64576b20",
                "sha256": "6125c32b21c0d79e44f3f7d7785ac0b9c255c7acb1fdb8569c5e013485888860"
            },
            "downloads": -1,
            "filename": "scriptomatic-1.0.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "0cfbe963b58d15ac4518c88a64576b20",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.11",
            "size": 12004,
            "upload_time": "2024-09-04T03:33:39",
            "upload_time_iso_8601": "2024-09-04T03:33:39.687291Z",
            "url": "https://files.pythonhosted.org/packages/68/3c/2ded26f9f2736e0d21f7596a0e4c33fb692ebef3d95a61ebc09871b4629b/scriptomatic-1.0.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b06e99ebd774652ba4eebe80d347d98b8b488912684a8e1e54a5f2c156dcb8c2",
                "md5": "fdeb35a5c6dcee2b325a1f693b12b6ee",
                "sha256": "9299a884c0604eb85500437c0b36fc4162716acb9c3cd8e5515cf3879a9c0f37"
            },
            "downloads": -1,
            "filename": "scriptomatic-1.0.3.tar.gz",
            "has_sig": false,
            "md5_digest": "fdeb35a5c6dcee2b325a1f693b12b6ee",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.11",
            "size": 11524,
            "upload_time": "2024-09-04T03:33:41",
            "upload_time_iso_8601": "2024-09-04T03:33:41.399675Z",
            "url": "https://files.pythonhosted.org/packages/b0/6e/99ebd774652ba4eebe80d347d98b8b488912684a8e1e54a5f2c156dcb8c2/scriptomatic-1.0.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-04 03:33:41",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "tyfiero",
    "github_project": "scriptomatic",
    "github_not_found": true,
    "lcname": "scriptomatic"
}
        
Elapsed time: 0.45432s