carta
sdcv(1)

sdcv1

Console version of stardict program

Usage

sdcv [options] [list of words]

Overview

sdcv is a simple, cross-platform text-based utility for working with dictionaries in StarDict format. Each word from "list of words" may be a string with a leading '/' for using a Fuzzy search algorithm, with a leading '|' for using full-text search, and the string may contain '?' and '*' for regexp search. It works in interactive and non-interactive mode. To exit from interactive mode press Ctrl+D. In interactive mode, if sdcv was compiled with readline library support, you can use the UP and DOWN keys to cycle through history.

Options

-h --help

Display help message and exit

-v --version

Display version and exit

-l --list-dicts

Display list of available dictionaries and exit

-u --use-dict filename

For search use only dictionary with this bookname

-n --non-interactive

For use in scripts

-x --only-data-dir

For use in scripts: only use the dictionaries in data-dir, do not search in user and system directories

-e --exact-search

Do not fuzzy-search for similar words, only return exact matches

-j --json

Print the results of list-dicts and searches as json, not as plain text. For use in automatically processing the results of a dictionary lookup.

--utf8-output

Force sdcv to not convert to locale charset, output in utf8

--utf8-input

Force sdcv to not convert from locale charset, assume that input is in utf8

--data-dir path/to/directory

Use this directory as the path to the stardict data directory. This means that sdcv searches for dictionaries in data-dir/dic directory.

--color

Use ANSI escape codes for colorizing sdcv output (does not work with json output).

Files

/usr/share/stardict/dic
$(XDG_DATA_HOME)/stardict/dic

Place where sdcv expects to find dictionaries. Instead of /usr/share/stardict/dic you can use any directory you want, just set the STARDICT_DATA_DIR environment variable. For example, if you have dictionaries in /mnt/data/stardict-dicts/dic, set STARDICT_DATA_DIR to /mnt/data/stardict-dicts.

$(XDG_DATA_HOME)/sdcv_history

This file includes the last $(SDCV_HISTSIZE) words, which you sought with sdcv. SDCV uses this file only if it was compiled with readline library support.

$(XDG_CONFIG_HOME)/sdcv_ordering

This is a text file containing one dictionary bookname per line. It specifies in which order the results of a search should be shown.

Environment

Environment Variables Used By sdcv:

STARDICT_DATA_DIR

If set, sdcv uses this variable as the data directory, this means that sdcv searches dictionaries in $STARDICT_DATA_DIR/dic

SDCV_HISTSIZE

If set, sdcv writes in $(XDG_DATA_HOME)/sdcv_history (or $(SDCV_HISTFILE)) the last $(SDCV_HISTSIZE) words, which you look up using sdcv. If it is not set, then the last 2000 words are saved in $(XDG_DATA_HOME)/sdcv_history.

SDCV_HISTFILE

If set, sdcv writes it's history to $(SDCV_HISTFILE). If it is not set, then the default $(XDG_DATA_HOME)/sdcv_history path will be used.

SDCV_PAGER

If SDCV_PAGER is set, its value is used as the name of the program to use to display the dictionary article.

History

  • Arch Linux 2026-11-01 to Debian 13 (Trixie): the text shown here
  • Debian 12 (Bookworm) to Debian 10 (Buster)
  • Debian 9 (Stretch)
  • Debian 8 (Jessie)
  • Debian 7 (Wheezy) to Debian 6.0 (Squeeze)
  • Debian 5.0 (Lenny) to Debian 4.0 (Etch)
  • Debian 3.1 (Sarge)

--color since Debian 8 (Jessie); --exact-search since Debian 10 (Buster); --json since Debian 10 (Buster); --only-data-dir since Debian 10 (Buster); --version since Debian 13 (Trixie); -e since Debian 10 (Buster); -j since Debian 10 (Buster); -x since Debian 10 (Buster).

--verbose until Debian 12 (Bookworm).

Bugs

Email bug reports to dushistov at mail dot ru. Be sure to include the word "sdcv" somewhere in the "Subject:" field.

Authors

Evgeniy A. Dushistov, Hu Zheng

From sdcv 0.5.5-2 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.