Metadata-Version: 2.4
Name: wut-dictionary-cli
Version: 0.1.2
Summary: A modern CLI dictionary with pronunciation and bookmarking
Project-URL: Homepage, https://github.com/devadathanmb/wut
Project-URL: Repository, https://github.com/devadathanmb/wut.git
Project-URL: Issues, https://github.com/devadathanmb/wut/issues
Author-email: Devadathan M B <devadathanmb@gmail.com>
License-Expression: AGPL-3.0-or-later
License-File: LICENSE
Keywords: bookmarks,cli,dictionary,pronunciation,vocabulary
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: End Users/Desktop
Classifier: License :: OSI Approved :: GNU Affero General Public License v3
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Education
Classifier: Topic :: Text Processing :: Linguistic
Classifier: Typing :: Typed
Requires-Python: >=3.11
Requires-Dist: click>=8.1.0
Requires-Dist: gtts>=2.5.0
Requires-Dist: httpx>=0.27.0
Requires-Dist: platformdirs>=4.0.0
Requires-Dist: rich>=13.0.0
Provides-Extra: dev
Requires-Dist: mypy>=1.8.0; extra == 'dev'
Requires-Dist: pytest-cov>=4.1.0; extra == 'dev'
Requires-Dist: pytest-mock>=3.12.0; extra == 'dev'
Requires-Dist: pytest>=8.0.0; extra == 'dev'
Requires-Dist: respx>=0.21.0; extra == 'dev'
Requires-Dist: ruff>=0.2.0; extra == 'dev'
Description-Content-Type: text/markdown

# Wut?

Wut? is a command-line dictionary for quick lookups, pronunciation, and personal word bookmarks.

Originally built as my CS50P final project, this repo carries a lot of my early development memories.

> The name came from those moments while reading where you hit a word and think, "wut?"

## Why This Exists

While reading articles, documentation, or even chats, you often run into words you half-know or do not know at all.

Most of the time, the flow is the same: switch tabs, open a search engine or dictionary, type the word, then come back. Wut? exists to reduce that context switching. You stay in the terminal, get the meaning fast, hear pronunciation when needed, and bookmark words you want to revisit later.

## What It Does

- Looks up definitions, examples, synonyms, and antonyms
- Plays pronunciation for words
- Saves and manages bookmarks locally

## Installation

### From PyPI (Recommended)

```bash
pipx install wut-dictionary-cli
```

Then run:

```bash
wut --help
```

If `pipx` is not installed:

```bash
python -m pip install --user pipx
python -m pipx ensurepath
```

### From Source

```bash
git clone https://github.com/devadathanmb/wut.git
cd wut
pipx install . --force
```

## Usage

### Quick Lookup

```bash
# Simplest form
wut hello

# Lookup + pronunciation
wut hello -p

# Lookup + bookmark
wut hello -b

# Interactive prompts
wut hello -i

# Explicit lookup command
wut lookup hello -p -b
```

### Bookmarks

```bash
# Add
wut bookmark add hello

# List
wut bookmark list

# List with search
wut bookmark list -s hel

# Show one
wut bookmark show hello

# Delete one
wut bookmark delete hello

# Clear all
wut bookmark clear
```

### Pronunciation

```bash
# Normal speed
wut pronounce hello

# Slow speed
wut pronounce hello -s
```

### Info

```bash
# Database path + bookmark count
wut info
```

## Development

This project uses [uv](https://docs.astral.sh/uv/) for dependency and environment management.

1. Install prerequisites.

```bash
python --version
uv --version
```

2. Clone the repository.

```bash
git clone https://github.com/devadathanmb/wut.git
cd wut
```

3. Create the local dev environment and install dependencies.

```bash
uv sync --extra dev
```

4. Run the CLI locally.

```bash
uv run wut --help
uv run wut hello
```

5. Run tests.

```bash
uv run pytest tests/ -v
```

6. Run lint and type checks.

```bash
uv run ruff check src/ tests/
uv run mypy src/ tests/
uv run --with pyright pyright
```

7. Optional: activate `.venv` if you prefer direct commands.

```bash
source .venv/bin/activate
pytest tests/ -v
ruff check src/ tests/
```

## Credits

- [Free Dictionary API](https://dictionaryapi.dev/) for the dictionary data used by this project.

## License

GNU Affero General Public License v3.0 (AGPL-3.0)

## Known Limitations

Dictionary results depend on the Free Dictionary API. If a word is missing there, or the service is temporarily down, Wut? will fail to fetch results.
