Step 1: Download Kitty Cli from

https://drive.google.com/drive/folders/1ukh8ZDrD_QbmvfhjI-SAIsxms_dAb9-A

Step 2: Extract and put this into your projects root folder

image.png

Step 3: Add the script into your packgae json (optional), you can direcly run from

node cli/kitty-cli.mjs

  "generate": "node cli/kitty-cli.mjs",

image.png

QUICK DEMO (optional)

npm run generate Demo

This will generate a few files and folders inside the src/features folder with the template that I have defined delete this folder as your might need other template

Step 4: Add this propt to chat gpt along with your code to generate a json template for your code

{
  "content": "import { useCreate{moduleName}, useUpdate{moduleName} } from \\"./action/{moduleName.toLowerCase()}.action\\";\\n\\nexport interface CreateEdit{moduleName}Props {\\n  editMode?: boolean;\\n}\\n\\ntype {moduleName}Data = {\\n  id: number;\\n  {moduleName.toLowerCase()}_name: string;\\n  address: string;\\n  city: {\\n    id: number;\\n    city_name: string;\\n  };\\n  city_id: number;\\n  state: {\\n    id: number;\\n    state_name: string;\\n  };\\n  state_id: number;\\n  registration_number: string;\\n  created_at: string;\\n  updated_at: string;\\n};\\n\\nexport type {moduleName}ApiResponse = {\\n  currentPage: number;\\n  list: {moduleName}Data[];\\n  totalCount: number;\\n  totalPages: number;\\n};\\n\\nexport interface {moduleName}Payload {\\n  {moduleName.toLowerCase()}_name: string;\\n  address: string;\\n  city_id: number;\\n  state_id: number;\\n  registration_number: string;\\n}\\n\\nexport type MutationApi =\\n  | ReturnType<typeof useCreate{moduleName}>\\n  | ReturnType<typeof useUpdate{moduleName}>;\\n"
}

convert the below code to a json format as mentioned above use moduleName variable where nessacary

// ADD YOUR CODE HERE