|
1 | 1 | # nlc — Natural Language → Command |
2 | 2 |
|
3 | | -`nlc` is a tiny command-line helper that turns natural language instructions |
| 3 | +`nlc` is a command-line helper that turns natural language instructions |
4 | 4 | into executable shell commands using [OpenAI] |
5 | 5 | (https://platform.openai.com/) models, or any model available through |
6 | 6 | [Groq](https://groq.com/). |
7 | 7 |
|
8 | | -It’s designed to be minimal and intuitive: |
9 | | - |
10 | 8 | - You type what you want in plain English. |
11 | 9 | - It shows you the generated command inline with a `$` prompt. |
12 | 10 | - Press **Enter** to execute, or anything else to cancel. |
13 | 11 |
|
| 12 | +## Usage |
| 13 | + |
| 14 | +`nlc` is built with [Bashly](https://bashly.dev) and includes utility |
| 15 | +subcommands. Use `nlc --help` to see top-level commands, then |
| 16 | +`nlc COMMAND --help` for details. |
| 17 | + |
| 18 | +At a high level: |
| 19 | + |
| 20 | +- `run` (default) turns a natural language message into a shell command. |
| 21 | +- `config` lets you create, edit, show, or clear the config file. |
| 22 | +- `prompt` lets you view or customize the system and user prompts. |
| 23 | + |
14 | 24 | ## Installation |
15 | 25 |
|
16 | | -1. Download the nlc file and place it in your path |
17 | | -2. Install `openai` |
18 | | - ```console |
19 | | - pip install openai |
20 | | - # or |
21 | | - uv tool install openai |
22 | | - ``` |
23 | | - |
24 | | -## Setup |
25 | | - |
26 | | -1. Export your OpenAI API key: |
27 | | - ```console |
28 | | - export OPENAI_API_KEY=sk-... |
29 | | - ``` |
30 | | - |
31 | | -2. (Optional) Pick a default model: |
32 | | - ```console |
33 | | - export OPENAI_MODEL=gpt-4o-mini |
34 | | - ``` |
| 26 | +**Manual**: |
| 27 | +Download the nlc file from the [releases] page, or straight from the master |
| 28 | +branch if you want the unreleased version. Place it in your path. |
| 29 | + |
| 30 | +**With eget**: |
| 31 | +```shell |
| 32 | +sudo eget dannyben/nlc --to /usr/local/bin |
| 33 | +``` |
| 34 | + |
| 35 | +[releases]: https://github.com/DannyBen/nlc/releases |
0 commit comments