umijs / ai

Repository from Github https://github.comumijs/aiRepository from Github https://github.comumijs/ai

@umijs/ai

Usage

$ npx @umijs/ai [options]

Options

  • --model: The model to use.
  • --message: The message to use.

Examples

$ npx @umijs/ai --message "Create a new tnf project"
$ npx @umijs/ai --message "Write tests for src/foo.ts"
$ npx @umijs/ai --message "Add prettier"
$ npx @umijs/ai --message "Add page foo"
$ npx @umijs/ai --message "Install missing dependencies for src/foo.ts"

API

import { chat } from '@umijs/ai';
import * as p from '@umijs/clack-prompts';

p.intro(`Welcome!`);
chat({
  message: 'Create a new tnf project',
  model: 'gpt-4o',
  verbose: true,
})
  .then(() => {
    p.outro(pc.gray('Bye!'));
  })
  .catch((error) => {
    p.cancel(error.message);
  });

CREDITS

This project is inspired by:

  • cali, inspired the first version of the project.

LICENSE

MIT

About

License:MIT License


Languages

Language:TypeScript 88.0%Language:JavaScript 12.0%