GithubHelp home page GithubHelp logo

nooqta / kodyfire Goto Github PK

View Code? Open in Web Editor NEW
31.0 6.0 7.0 17.56 MB

AI-powered code generator and automation tool

License: MIT License

TypeScript 90.94% JavaScript 7.63% CSS 1.02% Shell 0.42%
low-code no-code automation boilerplate generator scaffold template typescript yeoman openai

kodyfire's Introduction

lerna

Kody is a command-line tool for generating artifact files, powered by both classic and AI code generation techniques. It can be used by both technical and non-technical users to generate files across a wide range of technologies and programming languages.

The code generation feature in Kody relies on OpenAI GPT, a language model that uses deep learning to generate human-like text, and ChatGPT to provide natural language processing capabilities.

Table of Contents

Installation

Prerequisites

To install kody, use npm with the following command:

npm install -g kodyfire-cli

or

yarn global add kodyfire-cli

You can check the documentation with

kody --help

Usage

kody [options] [command]

Options

  • -v, --version: Output the current version
  • -h, --help: Display help for command

Commands

  • prompt|ai [options] [prompt...]: AI powered prompt assistant to quickly generate an artifact
  • batch [options]: Generate multiple digital artifact
  • create [options] <name> <technology>: Generate a new blank kody project
  • generate|g [options] [kody] [concept]: Prompt assistant to quickly generate an artifact
  • import|in [options] <kody> <concepts>: Mass create artifacts from a source.
  • init: Initialize a new kodyfire project
  • install|i [kody]: Prompt user to choose to install
  • list|ls [options] [kodyName]: List installed kodies within your current project.
  • publish <kody> [template]: Publish the templates of the kody along with the assets.json and schema.ts files
  • ride|โ†ป: Prompt assistant to help build your kody.json file
  • run [options]: Generate a digital artifact based on the selected technology
  • run-script|rs: Run scripts
  • search|s [keywords...]: Search kodyfire packages from npm registry
  • watch|w [options]: Watch for file changes and run kody
  • help [command]: Display help for command

Getting Started

Open the project you are willing to work on using vscode or your prefered editor.

Generate artifacts using AI

In case you want to exclusivly rely on AI to generate your artifacts. You don't need to install any additional kodies. Run the kody ai [prompt] command and follow the prompts. For example, to create a Laravel Controller named SampleController under API/V1 and add a comment on top saying Hello Kodyfire, run the following command

kody ai create a Laravel Controller named SampleController under API/V1. Add a comment on top saying Hello Kodyfire!

You can use the experimental Speech-to-Text option to pass your prompt using your voice.

kody ai -r

The transcription relies on Whisper and requires SoX installed and available in your $PATH. for the audio recording.

For Linux

sudo apt-get install sox libsox-fmt-all

For MacOS

brew install sox

For Windows

Download the binaries

Generate your artifact using the classical method

Search and install a kody

Based on your project, search availables kodies and select the one that fits your need..

To search availables kodies by keyword runthe following command. if you don't specify a keyword all available kodies will be listed.

kody search [keyword]

Install your kody of choice. For example, if you want to install the react kody

kody install react

or

npm install -s react-kodyfire

Please note you can install as many kodies in the same project as you wish.

Generate your artifact

There are 2 methods you can generate your artifacts with:

  • The generate command
  • The run command
Method 1: Generator mode kody generate

The recommended way of using kody is using the generate command. The command will assist you creating your artifact based on the chosen concept. For example, a react component is considered a concept. In order to generate your artifacts, run the generate command. The syntax is kody g|generate [kody] [concept]. the assistant will prompt you to select the missing arguments. As an example, run the following command from your terminal:

kody generate react component
Method 2: Runner mode kody run

The run command is similar to the generate command. The run requires a definition file which is simply a json file containing all the concept definitions you have created using the ride command. The generate command on the other hand creates one or more concept definition on the run and process them on one run. Every command has its use cases.

Initialize kody

In order to start using kody, you need to initialize your project.

kody init

This will add the definition files required for kody runs. Important: Please run the command only once. The command will override existing definition files. We will disable overriding in a future version.

Ride your kody

In order to update your definition, use the kody ride command to assist you populate the required fields

kody ride
Launch a kody run

Once you are satisified with your definition file, execute the run command to generate your artifacts.

kody run -s laravel-kody.json

To run all kodies defined within your project, run the following command:

kody batch

Create your own kody

In most cases you might need a custom kody to suit your needs

Scaffold a new kody

Create a basic kody using the scaffold command. Follow the prompts to setup your kody

kody scaffold

This will create a folder containing the basic structure for a kody. You can start using right away within your project.

Setup your kody

Install npm dependencies
npm i
Build your kody
npm run build

Add your concepts and related templates

//TODO This will build your kody and export the basic templates files.

Add your kody as an NPM dependency to a test project

In order to be able to use it within your test project run the following command

npm i -s ./yourkody-kodyfire

Publish your kody

Please remember that Kody is still in exploration phase and things will change frequently. Contribution is always highly requested.

Prepare your kody

Add the required kodyfire metadata to your package.json

{
  // A command for handling this part will be added in a future version
  "kodyfire": {
    "id": "your-id", // must be unique.
    "type": "kodyfire", // Example of valid technology names: laravel, express, react, angular, flutter, html, css. Default: kodyfire
    "version": "0.0.1"
  }
}

Publish to Github

Intialize your project as a git repository and push to a public Github repo

To do so, kindly follow these steps:-

  1. Intitialize a new Github repository and make it public.
  2. Open your project root folder locally from terminal and run the following commands:-
git init
git add .
git commit -m "Initial Commit!"
  1. Link your project to your Github repository.
git remote add origin <copied URL>
git push origin main

Publish to npm

Once you are satisfied with your kody and you would to like to share it with the community. Run the following command.

npm Publish

Note: You'll need an NPM account

Share with community

Congratulation publishing your first kody. Don't forget to share your kody repo link by opening an issue on Kody's github repository.

Terminology

  • Kody: Refers to the code generation command-line tool that generates digital artifacts.
  • Artifacts: Refers to the various digital products generated by Kody based on the input provided.

Note: Kody uses classical code generation techniques in addition to AI-powered code generation using OpenAI Codex and ChatGPT.

Available kodies

Name Description
basic-kodyfire A general purpose code generator that should handle most of the generation use cases
typescript-kodyfire Generate typescript related artifacts
tsconfig-kodyfire Generate tsconfig files for your typescript projects
nextjs-kodyfire Generate nextJs components and related artifacts
react-kodyfire Generate react components
laravel-kodyfire Laravel artifacts generation
uml-kodyfire Uml diagrams generation using plantuml
readme-kodyfire Readme file generation
word-kodyfire Generate ms word document based on a template
pdf-kodyfire Generate PDF document from HTML templates
social-image-kodyfire Generate dynamic images for social sharing based on HTML templates
social-gif-kodyfire Generate dynamic gif images for social sharing based on HTML templates
linkedin-quizzes-kodyfire Practice Linkedin skill assessement tests from your terminal
chatgpt-kodyfire Use chatgpt from the terminal. Allows you provide additional data from various sources (not implemented yet) and export to serveral outputs (markdown only now).

Contributing

If you encounter any issues while using Kody or have suggestions for new features, feel free to open an issue or submit a pull request.

Please read our contributing guidelines before making contributions.

License

Kody is MIT licensed.

kodyfire's People

Contributors

akremsalhi avatar anis-marrouchi avatar chandak-keshav avatar dependabot[bot] avatar selmi5 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

kodyfire's Issues

Install and run kody

For first time contributors and hacktoberfest issues hunter
You are invited to follow the readme documentation and test out if the description is working as it is suppose too. If you find an issue feel free to file an issue. If your finding requires changes to the code, fork the repo, commit and push your changes after testing locally and do your Pull Request.

Review the readme

The readme file needs to be reviewed concerning the installation guide. We need to confirm kodyfire is working on all major OS as per the instructions in the readme. All suggestions are welcome. Please share theme here to discuss. Upon agreeing on what changes should be applied, you can fork the project add the changes and request PR.

Update the template package dependencies before running the npm publish

Whenever any core packages gets updated and before publishing, the kodyfire depencencies for the simple template found at


  1. should be updated.
    This same applies for the basic template.
    A script shall be used. the script shall execute before npm run publish

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.