freedictionary-cli

module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 14, 2026 License: Apache-2.0

README

freedictionary

A command line for the Free Dictionary API. No API key required. Supports English and 11 other languages.

freedictionary define hello
freedictionary define hello -o json
freedictionary define bonjour --lang fr
freedictionary define hello -o jsonl | jq .synonyms

Built on any-cli/kit: one operation is a CLI command, an HTTP route, an MCP tool, and a resource-URI dereference.

Install

go install github.com/tamnd/freedictionary-cli/cmd/freedictionary@latest

Or download a prebuilt binary from the releases page.

Usage

freedictionary define <word> [--lang <code>]

Returns one record per meaning. Each record has: word, phonetic, audio URL, part of speech, definition, example, synonyms, antonyms, language, source URL.

Supported language codes: en (default), hi, es, fr, ja, ru, de, it, ko, pt-BR, ar, tr.

Output

freedictionary define hello                          # table on terminal, JSONL in pipe
freedictionary define hello -o json                  # JSON array
freedictionary define hello --fields word,definition # keep two columns
freedictionary define hello --template '{{.PartOfSpeech}}: {{.Definition}}'

As an HTTP server or MCP tool

freedictionary serve --addr :7777
curl -s 'localhost:7777/v1/define/hello'

freedictionary mcp    # MCP over stdio

As a resource-URI driver

import _ "github.com/tamnd/freedictionary-cli/freedictionary"

Registers the freedictionary scheme so a host (like ant) can address words as freedictionary://word/hello.

License

Apache 2.0

Directories

Path Synopsis
Package cli assembles the freedictionary command tree from the freedictionary domain on top of the any-cli/kit framework.
Package cli assembles the freedictionary command tree from the freedictionary domain on top of the any-cli/kit framework.
cmd
freedictionary command
Command freedictionary is a single-binary command line for the Free Dictionary API.
Command freedictionary is a single-binary command line for the Free Dictionary API.
Package freedictionary is the library behind the freedictionary command line: the HTTP client, request shaping, and the typed data models for the Free Dictionary API (api.dictionaryapi.dev).
Package freedictionary is the library behind the freedictionary command line: the HTTP client, request shaping, and the typed data models for the Free Dictionary API (api.dictionaryapi.dev).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL