<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Jemin Huh</title>
    <description>The latest articles on Forem by Jemin Huh (@jmlab).</description>
    <link>https://forem.com/jmlab</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1038976%2Fcf78bde7-b3e4-4ad5-8a90-6dbcb63f2d20.jpeg</url>
      <title>Forem: Jemin Huh</title>
      <link>https://forem.com/jmlab</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/jmlab"/>
    <language>en</language>
    <item>
      <title>CLI Genie: Revolutionizing Command Line Workflow with Native Language Input and OpenAI's GPT-3 API</title>
      <dc:creator>Jemin Huh</dc:creator>
      <pubDate>Sun, 05 Mar 2023 14:46:21 +0000</pubDate>
      <link>https://forem.com/jmlab/how-cli-genie-uses-openais-gpt-3-api-to-help-users-write-cli-commands-in-their-native-language-4fib</link>
      <guid>https://forem.com/jmlab/how-cli-genie-uses-openais-gpt-3-api-to-help-users-write-cli-commands-in-their-native-language-4fib</guid>
      <description>&lt;p&gt;project - &lt;a href="https://github.com/JM-Lab/cli-genie"&gt;https://github.com/JM-Lab/cli-genie&lt;/a&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--TyFmXvaj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://raw.githubusercontent.com/JM-Lab/cli-genie/main/screenshot.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--TyFmXvaj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://raw.githubusercontent.com/JM-Lab/cli-genie/main/screenshot.gif" alt="Screenshot" width="800" height="483"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h1&gt;
  
  
  CLI Genie
&lt;/h1&gt;

&lt;p&gt;CLI Genie is a tool that assists users in writing CLI commands using their native language through OpenAI's GPT-3 API.&lt;/p&gt;

&lt;p&gt;To put it simply, CLI Genie helps users who are not comfortable with writing commands in English to do so using their preferred language. By utilizing OpenAI's GPT-3 API, CLI Genie can provide accurate and relevant commands based on the user's request. It is important to note, however, that as with any software that uses machine learning or AI, there may be limitations and potential errors.&lt;/p&gt;

&lt;p&gt;The CLI Genie is powered by OpenAI's advanced language model called gpt-3.5-turbo. It performs similarly to text-davinci-003 but is 10% cheaper per token.&lt;/p&gt;
&lt;h2&gt;
  
  
  The Key Features
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Support for native language input&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;User input in their native language is understood and processed.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;OS and version awareness&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Appropriate CLI commands are suggested based on the user's operating system and version.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Similar command recommendations&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If no appropriate command is found, similar commands with the same intent are recommended.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;
  
  
  Installation
&lt;/h2&gt;
&lt;h3&gt;
  
  
  Requirements
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;git&lt;/li&gt;
&lt;li&gt;Java 11 or higher&lt;/li&gt;
&lt;li&gt;OpenAI API key&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  Linux and Mac
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git clone https://github.com/JM-Lab/cli-genie.git
cd cli-genie
./gradlew install
sudo cp bin/cg /usr/local/bin
export OPENAI_API_KEY=[your key]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h3&gt;
  
  
  Windows
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git clone https://github.com/JM-Lab/cli-genie.git
cd cli-genie
.\gradlew.bat install
copy bin\cg.bat C:\Windows\System32
set OPENAI_API_KEY=[your key]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h4&gt;
  
  
  OpenAI API key
&lt;/h4&gt;

&lt;p&gt;To use CLI Genie, you need to obtain the OPENAI_API_KEY from &lt;a href="https://platform.openai.com"&gt;https://platform.openai.com&lt;/a&gt; and set it as an environment variable before the first run. The key will be stored in [USER HOME]/.cg/openai-api-key and used for subsequent runs.&lt;/p&gt;
&lt;h2&gt;
  
  
  Usage
&lt;/h2&gt;

&lt;p&gt;You can run CLI Genie by using the &lt;code&gt;cg&lt;/code&gt; (short for CLI Genie). Available commands can be input in the user's mother &lt;br&gt;
tongue. &lt;br&gt;
The usage of the cg command is as follows:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cg [instructions in mother tongue]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Examples
&lt;/h2&gt;

&lt;p&gt;Here's examples of the usage of CLI Genie in various languages&lt;/p&gt;

&lt;h3&gt;
  
  
  Korean
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cg test.txt 파일에서 "abc"를 "cba"로 바꿔주세요
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  English
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cg replace the letters "abc" with "cba" in the file test.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Mandarin Chinese
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cg 在test.txt文件中用"cba"替换"abc"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Hindi
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cg test.txt फ़ाइल में "abc" को "cba" से बदलें
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Spanish
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cg reemplazar las letras "abc" por "cba" en el archivo test.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Arabic
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cg استبدل الحروف "abc" بـ "cba" في الملف test.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Bengali
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cg test.txt ফাইলের "abc" অক্ষরগুলি "cba" দিয়ে পরিবর্তন করুন
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  French
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cg remplacer les lettres "abc" par "cba" dans le fichier test.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Russian
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cg заменить буквы "abc" на "cba" в файле test.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Portuguese
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cg substituir as letras "abc" por "cba" no arquivo test.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Urdu
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cg test.txt فائل میں حروف "abc" کو "cba" سے تبدیل کریں
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Japanese
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cg test.txt ファイル内の文字列 "abc" を "cba" に置き換える
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Vietnamese
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cg thay thế các chữ cái "abc" bằng "cba" trong tệp test.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>gpt3</category>
      <category>cli</category>
      <category>chatgpt</category>
      <category>openai</category>
    </item>
  </channel>
</rss>
