Generate all the anagrams.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

anagrammit-go -- Anagram Generation in Go

A pure Go anagram generation library. Useful for building command line tools or web services. Bring your own word lists.

An example.

// A basic command line anagram generator.

package main

import (


var p = flag.Parse

func main() {
	wordLen := flag.Int("wordlength", 3, "minimum word length")
	limit := flag.Int("limit", 10, "result limit, use 0 for unlimited")
	shuffle := flag.Bool("shuffle", false, "shuffle lexicon")
	inpt := flag.Arg(0)

	args := &anagrammit.GeneratorArgs{
		WordLength:  *wordLen,
		ResultLimit: *limit,
		Shuffle:     *shuffle,
		WordsFile:   "tmp/dictionary.txt",

	// Base
	generator := anagrammit.NewGenerator(args)

	output := make(chan string)
	generator.Generate(inpt, output)

	for msg := range output {

Or, download and build the examples:

$ make generator
$ ./anagram-generator -limit=0 "pure soap union"