Skip to content

Commit 1f2c5cf

Browse files
docs: add readme.templ.md
1 parent 92ff095 commit 1f2c5cf

32 files changed

+673
-57
lines changed

.github/workflows/build-snapshot.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,6 @@ jobs:
5353
with:
5454
name: linux_arm64
5555
path: dist/*linux_arm64*.tar.gz
56-
57-
- name: Upload linux_386
58-
uses: actions/upload-artifact@v4
59-
with:
60-
name: linux_386
61-
path: dist/*linux_386*.tar.gz
6256

6357
- name: Upload checksums
6458
uses: actions/upload-artifact@v4

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
.vscode
2-
**/coverage
32
!assets/coverage
3+
modelfiles
4+
**/coverage
45
**/dist
56
**/bin
67
*~
78
.template
8-
.todo
99
TODO.md

.goreleaser.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,12 @@ builds:
55
main: ./cmd/ragx
66
binary: ragx
77
goos:
8+
- darwin
89
- linux
10+
- windows
11+
goarch:
12+
- amd64
13+
- arm64
914
ldflags:
1015
- -X main.Version={{ if .IsSnapshot }}{{ .Version }}{{ else }}{{ .Tag }}{{ end }}
1116

Makefile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,3 +64,12 @@ fix: bin/golangci-lint
6464

6565
.PHONY: check
6666
check: lint test
67+
68+
.PHONY: assets
69+
assets: build
70+
./bin/$(BIN_NAME) config generate > assets/default-config.toml
71+
./bin/$(BIN_NAME) > assets/usage.txt
72+
73+
.PHONY: readme.md
74+
readme.md: assets readme.templ.md assets/default-config.toml assets/usage.txt
75+
./scripts/readme_gen.sh readme.templ.md readme.md

assets/default-config.toml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
[llm]
2+
# Default model to use
3+
default_model = ''
4+
# LLM providers (uncomment and duplicate as needed)
5+
# [[llm.providers]]
6+
# base_url = 'http://localhost:11434'
7+
# api_key = '<KEY>' # optional
8+
# temperature = 0.7 # optional (provider default)
9+
# Optional model definitions for context length control (uncomment and duplicate as needed)
10+
# [[llm.models]]
11+
# id = 'qwen:8b' # Model identifier
12+
# context = 4096 # Maximum context length in tokens
13+
# temperature = 0.7 # optional (model override)
14+
15+
[prompt]
16+
# System prompt to override the default assistant behavior
17+
# system_prompt = ''
18+
# Go text/template for building the USER QUERY + CONTEXT block.
19+
# Supported template vars:
20+
# .Query — the user's raw query string
21+
# .Chunks — slice of retrieved chunks (may be empty). Each chunk has:
22+
# .ID — numeric identifier of the chunk
23+
# .Source — source file/path of the chunk
24+
# .Content — text content of the chunk
25+
# user_prompt_tmpl = ''
26+
27+
[embedding]
28+
# Model used for embeddings
29+
embedding_model = ''
30+
# Number of characters per chunk
31+
# chunk_size = 2000
32+
# Number of characters overlapped between chunks (must be less than chunk_size)
33+
# overlap = 200
34+
# Number of chunks to retrieve during RAG
35+
# top_k = 20
36+
37+
# [logging]
38+
# Directory where log file will be stored (default: XDG_STATE_HOME or ~/.local/state/ragx)
39+
# log_dir = '/home/gbi/.local/state/ragx'
40+
# Filename for the log file
41+
# log_filename = '.log'
42+
# log_level = 'info'

assets/screenshot_tui.png

75.5 KB
Loading

assets/usage.txt

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
ragx is a terminal-first RAG assistant.
2+
Embed data, run retrieval, and query local or remote OpenAI API-compatible LLMs.
3+
4+
Usage:
5+
ragx [command]
6+
7+
Available Commands:
8+
chat Start the interactive terminal chat UI
9+
config Show and inspect configuration
10+
help Help about any command
11+
list List available models
12+
query Embed data from paths or stdin and query the LLM
13+
version Show version
14+
15+
Flags:
16+
-h, --help help for ragx
17+
18+
Use "ragx [command] --help" for more information about a command.

chatui/model.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ import (
99
"strings"
1010
"time"
1111

12-
"github.com/ladzaretti/ragx/llm"
13-
"github.com/ladzaretti/ragx/types"
14-
"github.com/ladzaretti/ragx/vecdb"
12+
"github.com/ladzaretti/ragx-cli/llm"
13+
"github.com/ladzaretti/ragx-cli/types"
14+
"github.com/ladzaretti/ragx-cli/vecdb"
1515

1616
"github.com/charmbracelet/bubbles/list"
1717
"github.com/charmbracelet/bubbles/spinner"

chatui/stream.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ import (
66
"slices"
77

88
tea "github.com/charmbracelet/bubbletea"
9-
"github.com/ladzaretti/ragx/cli/prompt"
10-
"github.com/ladzaretti/ragx/llm"
11-
"github.com/ladzaretti/ragx/types"
9+
"github.com/ladzaretti/ragx-cli/cli/prompt"
10+
"github.com/ladzaretti/ragx-cli/llm"
11+
"github.com/ladzaretti/ragx-cli/types"
1212
)
1313

1414
type chunk = prompt.Chunk

cli/chat.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ import (
55
"errors"
66
"io"
77

8-
"github.com/ladzaretti/ragx/chatui"
9-
"github.com/ladzaretti/ragx/clierror"
10-
"github.com/ladzaretti/ragx/genericclioptions"
8+
"github.com/ladzaretti/ragx-cli/chatui"
9+
"github.com/ladzaretti/ragx-cli/clierror"
10+
"github.com/ladzaretti/ragx-cli/genericclioptions"
1111

1212
tea "github.com/charmbracelet/bubbletea"
1313
"github.com/spf13/cobra"

0 commit comments

Comments
 (0)