Skip to content

Commit

Permalink
refactor: 🛠️ remove @oclif/plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
abhagsain committed Nov 15, 2022
1 parent e6494f5 commit 793edbb
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 318 deletions.
331 changes: 18 additions & 313 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,346 +1,51 @@
# GPT3 Powered CLI

Get answers from GPT3 right from your terminal.
Get answers from GPT3 right inside your terminal.

[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)
[![Version](https://img.shields.io/npm/v/oclif-hello-world.svg)](https://npmjs.org/package/oclif-hello-world)
[![CircleCI](https://circleci.com/gh/oclif/hello-world/tree/main.svg?style=shield)](https://circleci.com/gh/oclif/hello-world/tree/main)
[![Downloads/week](https://img.shields.io/npm/dw/oclif-hello-world.svg)](https://npmjs.org/package/oclif-hello-world)
[![License](https://img.shields.io/npm/l/oclif-hello-world.svg)](https://github.com/oclif/hello-world/blob/main/package.json)
[![Version](https://img.shields.io/npm/v/@abhagsain/ai-cli.svg)](https://npmjs.org/package/@abhagsain/ai-cli)
[![Downloads/week](https://img.shields.io/npm/dw/@abhagsain/ai-cli.svg)](https://npmjs.org/package/@abhagsain/ai-cli)

<!-- toc -->
* [GPT3 Powered CLI](#gpt3-powered-cli)
* [Usage](#usage)
* [Commands](#commands)

- [GPT3 Powered CLI](#gpt3-powered-cli)
- [Usage](#usage)
- [Commands](#commands)
<!-- tocstop -->

# Usage

<!-- usage -->
```sh-session

```sh
$ npm install -g @abhagsain/ai-cli
$ ai COMMAND
$ ai ask COMMAND
running command...
$ ai (--version)
@abhagsain/ai-cli/0.0.1-0 darwin-x64 node-v14.18.3

$ ai --help [COMMAND]

USAGE
$ ai COMMAND
$ ai ask "Check if the remote port is open"
nc -vz <remote_host> <remote_port>
...
```

<!-- usagestop -->

# Commands

<!-- commands -->
* [`ai ask [question]`](#ai-ask-question)
* [`ai auth`](#ai-auth)
* [`ai help [COMMAND]`](#ai-help-command)
* [`ai plugins`](#ai-plugins)
* [`ai plugins:install PLUGIN...`](#ai-pluginsinstall-plugin)
* [`ai plugins:inspect PLUGIN...`](#ai-pluginsinspect-plugin)
* [`ai plugins:install PLUGIN...`](#ai-pluginsinstall-plugin-1)
* [`ai plugins:link PLUGIN`](#ai-pluginslink-plugin)
* [`ai plugins:uninstall PLUGIN...`](#ai-pluginsuninstall-plugin)
* [`ai plugins:uninstall PLUGIN...`](#ai-pluginsuninstall-plugin-1)
* [`ai plugins:uninstall PLUGIN...`](#ai-pluginsuninstall-plugin-2)
* [`ai plugins update`](#ai-plugins-update)

## `ai ask [question]`

Get answers from GPT3 right from your terminal

```
USAGE
$ ai ask [question]
ARGUMENTS
QUESTION Your question
DESCRIPTION
Get answers from GPT3 right from your terminal
EXAMPLES
$ ai ask "Check running process on port 3000"
```

_See code: [dist/commands/ask.ts](https://github.com/abhagsain/ai-cli/blob/v0.0.1-0/dist/commands/ask.ts)_

## `ai auth`

Add existing or new OpenAI API Key

```
USAGE
$ ai auth
DESCRIPTION
Add existing or new OpenAI API Key
EXAMPLES
$ ai auth (Follow the prompt)
```

_See code: [dist/commands/auth.ts](https://github.com/abhagsain/ai-cli/blob/v0.0.1-0/dist/commands/auth.ts)_

## `ai help [COMMAND]`

Display help for ai.

```
USAGE
$ ai help [COMMAND] [-n]
ARGUMENTS
COMMAND Command to show help for.
FLAGS
-n, --nested-commands Include all nested commands in the output.
DESCRIPTION
Display help for ai.
```

_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v5.1.17/src/commands/help.ts)_

## `ai plugins`

List installed plugins.

```
USAGE
$ ai plugins [--core]
FLAGS
--core Show core plugins.
DESCRIPTION
List installed plugins.
EXAMPLES
$ ai plugins
```

_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v2.1.6/src/commands/plugins/index.ts)_

## `ai plugins:install PLUGIN...`

Installs a plugin into the CLI.

```
USAGE
$ ai plugins:install PLUGIN...
ARGUMENTS
PLUGIN Plugin to install.
FLAGS
-f, --force Run yarn install with force flag.
-h, --help Show CLI help.
-v, --verbose
DESCRIPTION
Installs a plugin into the CLI.
Can be installed from npm or a git url.
Installation of a user-installed plugin will override a core plugin.
e.g. If you have a core plugin that has a 'hello' command, installing a user-installed plugin with a 'hello' command
will override the core plugin implementation. This is useful if a user needs to update core plugin functionality in
the CLI without the need to patch and update the whole CLI.
ALIASES
$ ai plugins add
EXAMPLES
$ ai plugins:install myplugin
$ ai plugins:install https://github.com/someuser/someplugin
$ ai plugins:install someuser/someplugin
```

## `ai plugins:inspect PLUGIN...`

Displays installation properties of a plugin.

```
USAGE
$ ai plugins:inspect PLUGIN...
ARGUMENTS
PLUGIN [default: .] Plugin to inspect.
FLAGS
-h, --help Show CLI help.
-v, --verbose
DESCRIPTION
Displays installation properties of a plugin.
EXAMPLES
$ ai plugins:inspect myplugin
```

## `ai plugins:install PLUGIN...`

Installs a plugin into the CLI.

```
USAGE
$ ai plugins:install PLUGIN...
ARGUMENTS
PLUGIN Plugin to install.
FLAGS
-f, --force Run yarn install with force flag.
-h, --help Show CLI help.
-v, --verbose
DESCRIPTION
Installs a plugin into the CLI.
Can be installed from npm or a git url.
Installation of a user-installed plugin will override a core plugin.
e.g. If you have a core plugin that has a 'hello' command, installing a user-installed plugin with a 'hello' command
will override the core plugin implementation. This is useful if a user needs to update core plugin functionality in
the CLI without the need to patch and update the whole CLI.
ALIASES
$ ai plugins add
EXAMPLES
$ ai plugins:install myplugin
$ ai plugins:install https://github.com/someuser/someplugin
$ ai plugins:install someuser/someplugin
```

## `ai plugins:link PLUGIN`

Links a plugin into the CLI for development.

```
USAGE
$ ai plugins:link PLUGIN
ARGUMENTS
PATH [default: .] path to plugin
FLAGS
-h, --help Show CLI help.
-v, --verbose
DESCRIPTION
Links a plugin into the CLI for development.
Installation of a linked plugin will override a user-installed or core plugin.
e.g. If you have a user-installed or core plugin that has a 'hello' command, installing a linked plugin with a 'hello'
command will override the user-installed or core plugin implementation. This is useful for development work.
EXAMPLES
$ ai plugins:link myplugin
```

## `ai plugins:uninstall PLUGIN...`

Removes a plugin from the CLI.

```
USAGE
$ ai plugins:uninstall PLUGIN...
ARGUMENTS
PLUGIN plugin to uninstall
FLAGS
-h, --help Show CLI help.
-v, --verbose
DESCRIPTION
Removes a plugin from the CLI.
ALIASES
$ ai plugins unlink
$ ai plugins remove
```

## `ai plugins:uninstall PLUGIN...`

Removes a plugin from the CLI.

```
USAGE
$ ai plugins:uninstall PLUGIN...
ARGUMENTS
PLUGIN plugin to uninstall
FLAGS
-h, --help Show CLI help.
-v, --verbose
DESCRIPTION
Removes a plugin from the CLI.
ALIASES
$ ai plugins unlink
$ ai plugins remove
```

## `ai plugins:uninstall PLUGIN...`

Removes a plugin from the CLI.

```
USAGE
$ ai plugins:uninstall PLUGIN...
ARGUMENTS
PLUGIN plugin to uninstall
FLAGS
-h, --help Show CLI help.
-v, --verbose
DESCRIPTION
Removes a plugin from the CLI.
ALIASES
$ ai plugins unlink
$ ai plugins remove
```

## `ai plugins update`

Update installed plugins.

```
USAGE
$ ai plugins update [-h] [-v]
FLAGS
-h, --help Show CLI help.
-v, --verbose
DESCRIPTION
Update installed plugins.
```
<!-- commandsstop -->

- [`ai ask [question]`](#ai-ask-question)
- [`ai auth`](#ai-auth)
- [`ai help [COMMAND]`](#ai-help-command)

## `ai ask [question]`

Get answers from GPT3 right from your terminal
Get answers from GPT3 right inside your terminal

```
USAGE
Expand All @@ -356,7 +61,7 @@ EXAMPLES
$ ai ask "Check running process on port 3000"
```

_See code: [dist/commands/ask.ts](https://github.com/abhagsain/ai-cli/blob/v1.0.0/dist/commands/ask.ts)_
_See code: [dist/commands/ask.ts](https://github.com/abhagsain/ai-cli/blob/v0.0.1-0/dist/commands/ask.ts)_

## `ai auth`

Expand All @@ -373,7 +78,7 @@ EXAMPLES
$ ai auth (Follow the prompt)
```

_See code: [dist/commands/auth.ts](https://github.com/abhagsain/ai-cli/blob/v1.0.0/dist/commands/auth.ts)_
_See code: [dist/commands/auth.ts](https://github.com/abhagsain/ai-cli/blob/v0.0.1-0/dist/commands/auth.ts)_

## `ai help [COMMAND]`

Expand Down
Loading

0 comments on commit 793edbb

Please sign in to comment.