feat: bootstrap goaichat CLI and config system
This commit is contained in:
71
README.md
71
README.md
@@ -1,3 +1,70 @@
|
||||
# goaichat
|
||||
# Goaichat
|
||||
|
||||
A terminal based AI chat written in Go
|
||||
Goaichat is a terminal-based AI chat client written in Go. It connects to OpenAI-compatible APIs using configuration supplied via `config.yaml` and environment variables.
|
||||
|
||||
## Features
|
||||
|
||||
- **Config-driven startup**: Loads defaults from `config.yaml` with environment overrides.
|
||||
- **Interactive chat loop**: (In progress) command-driven conversation with persistent history.
|
||||
- **Extensible architecture**: Structured packages under `internal/` for config, app wiring, chat, storage, OpenAI client, UI, and telemetry.
|
||||
|
||||
## Getting Started
|
||||
|
||||
### Prerequisites
|
||||
|
||||
- Go 1.23 or later
|
||||
- Access to an OpenAI-compatible API endpoint
|
||||
|
||||
### Installation
|
||||
|
||||
```bash
|
||||
go install github.com/stig/goaichat/cmd/goaichat@latest
|
||||
```
|
||||
|
||||
Alternatively, clone the repository and build locally:
|
||||
|
||||
```bash
|
||||
git clone https://github.com/stig/goaichat.git
|
||||
cd goaichat
|
||||
go build ./cmd/goaichat
|
||||
```
|
||||
|
||||
### Configuration
|
||||
|
||||
Create `config.yaml` in the project root or pass `--config` to specify a path. A minimal configuration looks like:
|
||||
|
||||
```yaml
|
||||
api:
|
||||
url: "https://api.openai.com/v1"
|
||||
key: "${GOAICHAT_API_KEY}"
|
||||
model:
|
||||
name: "gpt-4o-mini"
|
||||
temperature: 0.7
|
||||
stream: true
|
||||
ui:
|
||||
show_timestamps: true
|
||||
logging:
|
||||
level: "info"
|
||||
```
|
||||
|
||||
Environment variables override several fields:
|
||||
|
||||
- `GOAICHAT_API_URL`
|
||||
- `GOAICHAT_API_KEY`
|
||||
|
||||
### Running
|
||||
|
||||
```bash
|
||||
go run ./cmd/goaichat --config path/to/config.yaml
|
||||
```
|
||||
|
||||
The current build logs startup/shutdown messages while core services are implemented. Upcoming milestones include the chat loop, persistence, OpenAI integration, and Bubble Tea UI.
|
||||
|
||||
## Development
|
||||
|
||||
- Run tests with `go test ./...`.
|
||||
- Follow the roadmap in `dev-plan.md` for milestone progression.
|
||||
|
||||
## License
|
||||
|
||||
TBD
|
||||
|
Reference in New Issue
Block a user