npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

scriptgpt

v0.1.1

Published

<p align="center"> <img src="https://github.com/ukanwat/ScriptGPT/blob/master/docs/images/SG.png" width="200" alt="Project Logo"> </p>

Downloads

14

Readme

Dependencies License Release PRs Welcome

Why ScriptGPT? 🚀

  • Hand off feature development to an AI agent: Let it excel in what it does best while you focus on managing how everything works together.

  • Control assistance: Specify how much help you need. If a task is beyond the AI agents capability, you can take control and handle it yourself.

  • Built for TS/JS: Tailored to automatically install required libraries, test code, add comments, and more.

  • Overcome limitations of current AI-powered Coding tools:

    • Tools like copilot struggles with effective code integration and lacks planning capabilities. You can use both tools together, copilot can help with writing code and you can offload specific project features to ScriptGPT
    • GPT-Engineer and similar tools aren't yet suitable for large, complex projects, facing difficulties in accessing language-specific tools and bug fixing.

How ScriptGPT works?

  • CLI Interaction: Command-line code generation with automated testing.
  • API Interaction: Currenty it utilizes OpenAI's API to generate code with plans to integrate additional AI providers.
  • Code Crafting: Transforms natural language into TS/JS code with provided specification.
  • File Output: Generated code is automatically saved within your project

Prerequisites

  • An OpenAI API key

Installation

To use scriptgpt in your project, install the package using npm:

npm install scriptgpt -d

Configuration

Create a .env file in your project root and add your OpenAI API key:

OPENAI_API_KEY=your_api_key_here

Usage

  1. Create the Configuration File

    Create a file named scriptgpt.config.json in the root directory of your project.

    Define an array of functions within this file, specifying the following properties for each function:

    • name: The name of the function to be generated (string).
    • description: A brief description of the function's purpose (string).
    • parameters: An array of objects describing the function's input parameters, where each object has:
      • name: The name of the parameter (string).
      • type: The data type of the parameter (e.g., "number", "string", "array", "object") (string).
    • return: An object describing the function's output value, with:
      • type: The data type of the output value (string).

    Example scriptgpt.config.json:

    {
        "functions": [
            {
                "name": "add",
                "description": "Adds two integers together and returns values",
                "parameters": [
                    {
                        "name": "a",
                        "type": "int"
                    },
                    {
                        "name": "b",
                        "type": "int"
                    }
                ],
                "return": "int"
            }
        ]
    }
  2. Generate the Functions

    Run the following command in your terminal:

    scriptgpt generate

    This command will generate the JavaScript functions based on your gpt.json configuration and place them in the root/generated/functions.js file.

Project Roadmap

Completed Features

  • [x] Automatic Library Install Functionality:

    • Users can automatically install required libraries for generated code.
  • [x] Agent Planning Before Writing Code:

    • The agent plans its approach before generating code for improved organization.

Future Considerations

  • [ ] RAG System Integration:

    • Implement a RAG (Read, Ask, Generate) system for better library documentation utilization.
    • Enable the agent to ask clarifying questions about the documentation.
  • [ ] Return Class in Generated Code:

    • Modify code generation to include class information, not just functions.
  • [ ] User Feedback Mechanism:

    • Implement a user feedback mechanism for code improvements.

Contributing

Fork the repository and create a new branch for your contributions. Submit a pull request detailing changes and their purpose.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Acknowledgements

  • The contributors to the eslint-config-airbnb-base project for their code style guide.