Skip to content

addison-ch/vibesort

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vibesort

A very serious Go sorting library that sorts by vibe, not outdated comparisons mechanisms

It sends your list to OpenAI, asks for a vibe ranking, and returns the reordered slice.

Install

go get vibesort

Library Usage

package main

import (
	"context"
	"fmt"
	"log"
	"os"

	"vibesort"
)

func main() {
	client, err := vibesort.NewClient(os.Getenv("OPENAI_API_KEY"))
	if err != nil {
		log.Fatal(err)
	}

	items := []string{"golang", "rust", "python", "javascript"}
	sorted, err := client.SortStrings(context.Background(), items, "most likely to start a startup this weekend")
	if err != nil {
		log.Fatal(err)
	}

	fmt.Println(sorted)
}

CLI Usage

go run ./cmd/vibesort -vibe "would win in a dance battle" compiler linker debugger profiler

Optional model override:

go run ./cmd/vibesort -model gpt-4.1 -vibe "chaotic neutral energy" alpha beta gamma

Notes

  • Default endpoint is OpenAI Chat Completions (/v1/chat/completions), but you can override with WithBaseURL.

About

very advanced sorting algorithm

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages