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

create-ai-toolkit-test

v1.0.0

Published

<div style="text-align: center;"> <img src="https://raw.githubusercontent.com/xun082/md/main/blogs.images20240624204003.png" alt="Current version"> <h1 align="center">create-ai-toolkit</h1> <p>create-ai-toolkit is an AI-driven frontend development t

Downloads

10

Readme

Features

1. Automatic Component Generation

create-ai-toolkit can automatically generate standardized frontend components based on user-provided requirements, reducing repetitive work and allowing developers to focus on core business logic.

Features:

  • Supports multiple frontend frameworks (such as React, Vue).
  • Automatically generates TypeScript type definitions.
  • Optional integration with CSS preprocessors (such as SASS, LESS, Stylus, Tailwind CSS), etc.
  • Automatically generates TypeDoc comments, quickly grasping usage methods.

2. Custom Hook Generation

This tool can generate custom hooks based on requirement descriptions, improving code reusability and maintainability.

Features:

  • Supports multiple frontend frameworks (such as React, Vue).
  • Supports complex state management and side effects.
  • Automatically generates TypeDoc comments, quickly grasping usage methods.
  • Seamlessly integrates with existing components.

3. Intelligent Commit Message Generation

create-ai-toolkit can automatically generate commit messages based on the content of the staging area, ensuring a clear and standardized commit history.

Features:

  • Generates commit messages based on code changes.
  • Supports multiple commit message formats (such as Conventional Commits).
  • Increases commit efficiency and reduces human error.

4. Code Review and Optimization

This tool can perform static analysis and reviews of the code, providing optimization suggestions to help developers improve code quality.

Features:

  • Identifies potential issues and anti-patterns in the code.
  • Provides code optimization suggestions and best practices.
  • Supports multiple programming languages and frameworks.

Usage Guide

1. Installation

Ensure your Node.js version is v18 or above, and globally install create-ai-toolkit:

npm install -g create-ai-toolkit-test
# or using pnpm
pnpm add -g create-ai-toolkit-test

2. Add API Key

If you don't have a GPT key, you can purchase one from the OpenAI Official Website.

3. Set API Key

To use create-ai-toolkit, first execute the following command to globally set the API Key:

ai set OPENAI_KEY your-key

This command will create a toolkit.config.json file in the root directory of your operating system.

4. View Help

Execute the following command in the terminal:

ai --help

You will see the following result:

Help Command Result

Feature Demonstrations

1. Automatic Component Generation

Execute the following command to automatically generate a component:

ai component <name> [path]

Where name is the component name, and path is an optional parameter specifying the path to generate the file, defaulting to the src/components directory.

Execute the command and select based on your needs, the final result is shown below:

Component Generation Result

2. Custom Hook Generation

Execute the following command to generate custom hooks:

ai hooks <name>

Where name is the name of the hooks file, defaulting to the src/hooks directory.

Execute the command and select based on your needs, the final result is shown below:

Hook Generation Result

3. Automatic Commit Message Generation

To generate commit messages, first ensure there is content in your git staging area. Execute the following command to add modified files to the staging area:

git add .

After ensuring there is content in the staging area, execute the following command:

ai commit

The terminal will return appropriate commit messages for you to choose from:

Commit Message Generation Result

If you select a satisfactory commit message, the tool will automatically execute git commit -m 'generated commit message'.

4. Automatic Code Review

Based on the content of the staging area, AI will automatically perform a code review and provide modification suggestions. Execute the following command:

ai review

After executing the command, AI will automatically generate a moment.md file containing AI's evaluation and modification suggestions:

Code Review Generation Result

Configuration

Change API Key

If you need to change the API Key, you can execute the following command:

ai set OPENAI_KEY your-key

Get Current API Key

Execute the following command to get the currently set API Key:

ai get OPENAI_KEY

Change API Endpoint

If you are using a different intermediary API Key or running a large model on your machine, you can execute the following command to change the API endpoint:

ai set END_POINT http://127.0.0.1:8000

Change API Endpoint Result

Get Current API Endpoint

Execute the following command to get the currently set API endpoint:

ai get END_POINT

Contributors

Thank you to all the contributors to this project!

Contributors

How to Contribute

Contact Us