Skip to content

Commit

Permalink
aicmd 2.0 based on ollama
Browse files Browse the repository at this point in the history
  • Loading branch information
atinylittleshell committed Jun 9, 2024
1 parent 39f32ad commit 32305ff
Show file tree
Hide file tree
Showing 16 changed files with 553 additions and 1,449 deletions.
4 changes: 2 additions & 2 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ indent_style=space
indent_size=2
tab_width=2
end_of_line=lf
insert_final_newline=false
charset=utf-8
insert_final_newline=true
charset=utf-8
26 changes: 16 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,48 +1,54 @@
# AICMD

[![build](https://github.com/atinylittleshell/aicmd/actions/workflows/build.yml/badge.svg)](https://github.com/atinylittleshell/aicmd/actions/workflows/build.yml)

A CLI program that allows you to write shell commands using nautral language.
* Always asks for confirmation before executing.
* Supports all major OS and shells.
* Usage is free. No fees whatsoever.

- Always asks for confirmation before executing.
- Supports all major OS and shells.
- Powered by Ollama and your local LLM.

![screenshot](./doc/screenshot.png)

## Prerequisites

AICMD is based on Node.js. [Install Node.js](https://nodejs.org/en) before proceeding. Minimum required version is Node.js 16.

[Ollama](https://ollama.com) is required for hosting local LLM.

## Usage

Run it directly using npx:

```bash
npx aicmd create a javascript code file that prints hello world, and run it
```

Alternatively, install aicmd globally:

```bash
npm i -g aicmd
```

And then run it more easily each time:

```bash
aicmd create a javascript code file that prints hello world, and run it
```

Output:

```bash
echo console.log("Hello World!") > hello.js && node hello.js
Execute the command above? [y/N]
```

## Disclaimers

* Your command requests to aicmd are processed by a backend service hosted on [Vercel](https://vercel.com), not locally
on your computer. The source code of this backend service is also fully available in this repo.
* Behind the scenes, we call [OpenAI's API](https://platform.openai.com/docs) to generate the commands. Please see
[OpenAI's data usage policies](https://openai.com/policies/api-data-usage-policies) for how OpenAI handles the data.
* You are responsible for the consequence of executing the commands. Same as most AI-based tools, please be aware that
AI can make mistakes and in this case it can give you commands that don't do what you expect. Please make sure you
- You are responsible for the consequence of executing the commands. Same as most AI-based tools, please be aware that
AI can make mistakes and in this case it can give you commands that don't do what you expect. Please make sure you
understand and have confidence in the commands being suggested before executing them.

## Support me
[Buy me a coffee](https://www.buymeacoffee.com/onelittleshell)

[Buy me a coffee](https://www.buymeacoffee.com/onelittleshell)
Loading

0 comments on commit 32305ff

Please sign in to comment.