Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: tweak init output and docs #43

Merged
merged 1 commit into from
Apr 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,12 @@ Learn about AI CLI config file [here](https://callstack.github.io/ai-cli/config-

## Usage

Run `ai [query]` to start a conversation with AI assistant. You can put the question in the params.
Run `ai` to start a chat with an AI assistant. You can put the question in the params.

```shell-session
$ ai "Tell me a joke"
me: Tell me a joke
ai: Why don’t skeletons fight each other? They don’t have the guts.
me: _
```

## CLI options
Expand All @@ -53,7 +52,7 @@ CLI options are passed when invoking the `ai` commend:
- `--model [name]` (or `-m [name]`): select a model to use. This should be a model available for selected provider.
- `--creative`: respond in a creative way
- `--precise`: respond in a more accurate way
- `--verbose` (or `-V`): enable verbose
- `--verbose` (or `-V`): enable verbose output

## CLI commands

Expand Down
2 changes: 1 addition & 1 deletion src/commands/chat/prompt-options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,6 @@ export const promptOptions: Record<keyof PromptOptions, Options> = {
'verbose': {
alias: 'V',
type: 'boolean',
describe: 'Verbose output',
describe: 'Enable verbose output',
},
};
2 changes: 1 addition & 1 deletion src/commands/chat/ui/HelpOutput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export function HelpOutput() {
<Newline /> - /info: Show current provider, model, and system prompt
<Newline /> - /forget: AI will forget previous messages
<Newline /> - /save: Save in a text file in {CHATS_SAVE_DIRECTORY}
<Newline /> - /verbose: Toggle verbose-level output
<Newline /> - /verbose: Toggle verbose output
</Text>
</Box>
);
Expand Down
11 changes: 3 additions & 8 deletions src/commands/init/ui/InitUi.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export function InitUi({ hasConfig }: InitUiProps) {
return (
<Box flexDirection="column">
<Text color={colors.initPrompt} key="welcome">
Welcome to AI CLI.
Welcome to AI CLI!
{!hasConfig ? " Let's set you up quickly." : null}
<Newline />
</Text>
Expand Down Expand Up @@ -108,16 +108,11 @@ export function InitUi({ hasConfig }: InitUiProps) {
</Text>
<Newline count={2} />
<Text color={colors.initPrompt}>
For a single question and answer just pass a prompt as a param:
Run "ai" to start a chat with an AI assistant. You can put the initial question in the
params.
</Text>
<Newline />
<Text>$ ai "Tell me a useful productivity hack"</Text>
<Newline count={2} />
<Text color={colors.initPrompt}>
For interactive session use "-i" (or "--interactive") option:
</Text>
<Newline />
<Text>$ ai -i "Tell me an interesting fact about JavaScript"</Text>
<Newline />
<ExitApp />
</Text>
Expand Down
5 changes: 2 additions & 3 deletions website/docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,12 @@ Read more about the [configuration file](config-file) format and available optio

## Usage

Run `ai [query]` to start a conversation with AI assistant. You can put the question in the params.
Run `ai [query]` to start a chat with an AI assistant. You can put the question in the params.

```shell-session
$ ai "Tell me a joke"
me: Tell me a joke
ai: Why don’t skeletons fight each other? They don’t have the guts.
me: _
```

## CLI options
Expand All @@ -58,7 +57,7 @@ CLI options are passed when invoking the `ai` commend:
- `--model [name]` (or `-m [name]`): select a model to use. This should be a model available for selected provider.
- `--creative`: respond in a creative way
- `--precise`: respond in a more accurate way
- `--verbose` (or `-V`): enable verbose
- `--verbose` (or `-V`): enable verbose output

## CLI commands

Expand Down