Skip to content

Commit

Permalink
docs: structure readme
Browse files Browse the repository at this point in the history
  • Loading branch information
plmercereau committed Apr 19, 2023
1 parent 6a224e8 commit 88ca39e
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 33 deletions.
96 changes: 63 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,43 +1,43 @@
# Chat-DBT

## MVP
## Usage

- [ ] Implement the options into the web interface
- [ ] confirm
- [ ] automatic corrections
- [ ] keep-context
- [ ] Use `inquirer` instead of `prompts` (has an editor prompt, a yes/no/other prompt, and seems easier to tweak to implement history)
- [ ] Arrow up/down to get the previous queries
- [ ] CLI
- [ ] Web UI: https://mantine.dev/core/autocomplete/
- [ ] Editable SQL query before confirmation (and keep the modifications in the history)
- [ ] Editable SQL query after an error (and keep the modifications in the history)
- [ ] Changesets + publish
- [ ] Complete this readme
```sh
npx chat-dbt [options]
npx chat-dbt --help
```

### Command-line interface

```sh
npx chat-dbt --database postgres://user:password@localhost:5432/postgres --key [your-openai-key] --org [your-openai-org]
```

## Post-release
### Web interface

Library
Stats eg time per request, tokens used, etc
```sh
npx chat-dbt web --database postgres://user:password@localhost:5432/postgres --key [your-openai-key] --org [your-openai-org]
```

- [ ] Web interface in dark/light mode
- [ ] Add CI tests for both the CLI and the web interface
- [ ] Nice to have (but complicated): when the context is preserved, allow queries from previous data e.g. "translate the previous result into french"
- [ ] `--hide-sql`
- [ ] `--hide-result`
- [ ] Input from stdin/output to stdout (combined with the above)
- [ ] Output sql (on success) to file
- [ ] Output result to file
- [ ] Verbose level, timestamps etc
- [ ] Comment the code
### Use a `.env` file

<!-- TODO -->

### Use another OpenAI model

## Done
<!-- TODO -->

- [x] Change the terminology "retries" to "ask-corrections"
- [x] Add a `--confirm` option to prompt the user before executing the query
- [x] Add a `--model` option to choose the OpenAI model
- [x] Spinner
- [x] Manual requests for corrections
### Ask for confirmation before executing the SQL query

<!-- TODO -->

### Keep context between queries

<!-- TODO -->

### Change the format of the result

<!-- TODO -->

## Development

Expand Down Expand Up @@ -66,4 +66,34 @@ pnpm run dev:web

### Use the CLI

TODO nodemon
<!-- TODO nodemon -->

## Roadmap

- [ ] Implement the options into the web interface
- [ ] confirm
- [ ] automatic corrections
- [ ] keep-context
- [ ] Use `inquirer` instead of `prompts` (has an editor prompt, a yes/no/other prompt, and seems easier to tweak to implement history)
- [ ] Arrow up/down to get the previous queries
- [ ] CLI
- [ ] Web UI: https://mantine.dev/core/autocomplete/
- [ ] Editable SQL query before confirmation (and keep the modifications in the history)
- [ ] Editable SQL query after an error (and keep the modifications in the history)
- [ ] Changesets + publish
- [ ] Complete this readme

### Post-release

- [ ] Use the npm package as a library
- [ ] Statistics e.g. time per request, tokens used, etc
- [ ] Web interface in dark/light mode
- [ ] Add CI tests for both the CLI and the web interface
- [ ] Nice to have (but complicated): when the context is preserved, allow queries from previous data e.g. "translate the previous result into french"
- [ ] `--hide-sql`
- [ ] `--hide-result`
- [ ] Input from stdin/output to stdout (combined with the above)
- [ ] Output sql (on success) to file
- [ ] Output result to file
- [ ] Verbose level, timestamps etc
- [ ] Comment the code
3 changes: 3 additions & 0 deletions shared/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Shared code

Code used by both the CLI and the Web interface

0 comments on commit 88ca39e

Please # to comment.