Skip to content

Commit

Permalink
docs: update assistance guide and cli reference
Browse files Browse the repository at this point in the history
  • Loading branch information
luisfuturist committed Apr 16, 2024
1 parent 04b2eda commit 2a94fbf
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 6 deletions.
15 changes: 15 additions & 0 deletions docs/guide/getting-assistance.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,18 @@ Understanding existing commands is another area where Strigi can be helpful:
```

2. **Press Enter:** Strigi will analyze your request and provide a clear explanation of the command's purpose, usage, and options.

## Asking for Revision

Strigi allows you to easily review and modify commands for accuracy and customization. Follow these steps to request a revision:

1. **Open your terminal:** Ensure you're in the terminal where you interact with Strigi.
2. **Type your request:** For example, to revise the command `git log`, type:

```bash
$ s revise "git log"
```

3. **Press Enter:** Strigi will process your request and prompt you to enter the desired adjustments.
4. **Modify as needed:** Describe your adjustments in natural language for accuracy and precision.
5. **Choose your action:** Once you have the revised command, proceed with your desired action as usual.
57 changes: 51 additions & 6 deletions docs/reference/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,13 @@ Get CLI command assistance based on a prompt.

- Options
- **-e, --explain**: (optional) Get an explanation for a command directly.
- **-r, --revise**: (optional) Revise a command directly.
- **-v, --version**: (optional) Get the Strigi version.
- **-h, --help**: (optional) Get help.

- Details

The `main` command is a versatile shortcut that combines the functionality of `s run` and `s explain` commands with the -e flag. It allows you to execute a shell command directly or obtain an explanation for a specific command in natural language.
The `main` command is a versatile shortcut that combines the functionality of `s generate`, `s explain` with the `-e` flag, and `s revise` with the `-r` flag. It allows you to execute a shell command directly, obtain an explanation or revise a specific command in natural language.

- Examples

Expand Down Expand Up @@ -64,32 +65,36 @@ Log out and remove Gemini API key.

The `logout` command securely removes the Gemini API key from the configuration, enhancing access control and security measures.

## `run` <Badge type="info" text="subcommand" />
## `generate` <Badge type="info" text="subcommand" />

Generate and execute commands from natural language prompts.

- Usage

```bash
$ s run <prompt> ...
$ s generate <prompt> ...
```

```bash
$ s g <prompt> ...
```

- Details

The `s run` command is designed to interpret natural language prompts and generate corresponding CLI commands. It then offers the option to revise the generated command before execution.
The `s generate` command is designed to interpret natural language prompts and generate corresponding CLI commands. It then offers the option to revise the generated command before execution.

- Examples

Generate and execute a command to list files:

```bash
$ s run "list files in current directory"
$ s generate "list files in current directory"
```

Get an explanation for the `git status` command:

```bash
$ s run "update all packages"
$ s generate "update all packages"
```

## `explain` <Badge type="info" text="subcommand" />
Expand All @@ -102,6 +107,10 @@ Get an explanation for a command.
$ s explain <command>
```

```bash
$ s e <command>
```

- Details

The `s explain` command is designed to provide comprehensive explanations for specific CLI commands, aiding users in understanding their usage and functionalities in-depth.
Expand All @@ -120,6 +129,38 @@ Get an explanation for a command.
$ s explain "git status"
```

## `revise` <Badge type="info" text="subcommand" />

Start a command revision.

- Usage

```bash
$ s revise <command>
```

```bash
$ s r <command>
```

- Details

The `s revise` command is designed to start directly a revision for a command. This enables you to tailor the command to your specific needs before execution.

- Examples

Start a revision for the `ls` command:

```bash
$ s revise "ls"
```

Start a revision for the `git log` command:

```bash
$ s revise "git log"
```

## `instruct` <Badge type="info" text="subcommand" />

Add custom instructions for tailored responses.
Expand All @@ -130,6 +171,10 @@ Add custom instructions for tailored responses.
$ s instruct
```

```bash
$ s i
```

- Details

The `s instruct` command empowers you to provide specific guidelines or preferences to the model for more tailored and accurate responses. Your custom instructions will be integrated into future interactions with the model.

0 comments on commit 2a94fbf

Please sign in to comment.