1.0.0 • Published 5 months ago

inlinai v1.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
5 months ago

logo AI based cli to run commands generated by human text prompt.

Features

  • Prompt-based Command Generation: The tool asks for a prompt and generates shell commands based on that prompt.
  • Run Commands: After generating the commands, the tool asks if you want to execute them in your terminal.
  • Hugging Face Integration: The tool uses the Hugging Face API and the mistralai/Mistral-7B-Instruct-v0.3 model to generate relevant shell commands.

Installation

  1. Clone this repository:

    git clone https://github.com/UsboKirishima/inlinai
    cd inlinai
  2. Install dependencies:

    npm install
  3. Create a .env file with your Hugging Face API key:

    HF_API_KEY=<your-hugging-face-api-key>

    Note: The other entries (OPENAI_KEY, OPENAI_ENDPOINT, OPENAI_MODEL, DEEPSEEK_API_KEY) are experiments and can be ignored for this tool.

Usage

  1. Run using npm/pnpm/yarn:

    npm run start gen "read file README.md"
    pnpm start gen "read file README.md"
    yarn start gen "read file README.md"
  2. Run by installing global package:

    npm i --global @333revenge/inlineai
    yarn global add @333revenge/inlineai
    pnpm add -g @333revenge/inlineai

    after installing run command:

    inlineai gen "read file README.md"

Screenshots

  1. Get kernel version: kernel_ver

  2. Print "pizza" ten times: pizza