Skip to content

feat: init command #9

@mdjastrzebski

Description

@mdjastrzebski

Describe the feature

Command to facilitate initial setup (i.e. creation of ~.airc.json file.

Motivation

Easier start for users should encourage more users.

UX:

$ ai init
Welcome to AI CLI. Let's set you up quickly.

Which inference provider would you like to set up:
- [x] OpenAI
- [ ] Perplexity

Do you already have OpenAI API key? [y/n]
[If no, then point user URL where to create API key]

Paste your OpenAI key here: _

I have written your settings into '~/.airc.json` file. You can now start using AI CLI.

For one of questions ask the prompt as command params
$ ai "Tell me a joke" 

For interactive session use `-i` (or "--interactive") option. 
$ ai -i "Tell me an interesting fact about JavaScript"

Or just start 'ai' without any parameters.
$ ai

If user has not yet invoked init commend (i.e. there is no ~/.airc file) then invoking prompt (the default command), should invoke init automatically.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions