Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

leximaven

drawnepicenter65MIT4.0.0

A command line tool for searching word-related APIs.

lyracyst, lyricist, leximaven, cli, word, search, api, scraper, rest, anagram, acronym, define, dictionary, thesaurus, slang, rhyme, pronunciation

readme

leximaven

Build Status Dependency Status npm version Standard - JavaScript Style Guide

Introduction

leximaven is a powerful tool for searching word-related APIs from the command line. It can fetch acronyms, anagrams, bi-gram phrases, definitions, etymologies, example uses, hyphenation, offensive word flags, portmanteaus, pronunciations (Arpabet & IPA), related words, rhymes, slang, syllable stress and count, and more. See the wiki for more info.

Platform

Looking for testers on OSX. Developed and tested on Linux. Works on Windows, see Windows below. Supported Node.js versions:

  • 8.x
  • 7.x
  • 6.x

Install

Linux installation

To initialize the config file and load themes, your NODE_PATH environment variable must point to the node_modules directory of the Node.js installation. You can set this path automatically like this:

export NP=$(which node)
export BP=${NP%bin/node} #this replaces the string '/bin/node'
export LP="${BP}lib/node_modules"
export NODE_PATH="$LP"

Provided these lines are towards the end of the shell initialization file (at least after any NVM stuff) this should work for a system installation of Node.js and nvm.

Add all of this to .bashrc, .zshrc, etc. then:

npm install -g leximaven
leximaven config init

Windows installation

I highly recommend using nodist to install Node.js on Windows. It automatically sets %NODE_PATH% for you, though you may have to edit it to make sure it doesn't contain itself (i.e. C:......\node_modules;%NODE_PATH%). If you install Node.js manually, npm install --global leximaven will install the package in C:\Users\username\AppData\Roaming\npm\node_modules. And if you just do npm install leximaven then it will install the package to a subfolder of the Node.js installation, but that won't be the NODE_PATH folder unless you manually set it. Either way, you're going to have to mess around with Windows environment variables to get it to work. And don't forget to put your Wordnik API key into an environment variable WORDNIK

As for getting the ANSI color escape codes to work, Cmder seems to be the easiest way. It doesn't install a full linux environment like Cygwin, but you can still use some linux commands like which, cat, and ls.

Usage

leximaven has a built-in help system for CLI parameters and options. Access it with leximaven -h|--help [command] [subcommand]. There is also the wiki.

Here are some examples:

// Get definitions for 'catharsis'
leximaven wordnik define catharsis

// Get antonyms for 'noise'
leximaven wordnik relate --canon --type antonym noises

// Pronounce 'quixotic'
leximaven wordnik pronounce quixotic

// Get etymology for 'special'
leximaven wordnik origin special

// Get words that sound like 'blue'
leximaven datamuse get sl=blue

// Get slang/colloquialisms for 'diesel'
leximaven urban diesel

// Get anagrams with at least 2 letters in each word and a maximum of 3 words
// per anagram using short form flags and exporting to JSON
leximaven anagram -n2 -w3 -o anagrams.json toomanysecrets

// Get a wordmap for 'ubiquity'
leximaven wordmap ubiquity

Resources

The following links can help you use leximaven or perform related tasks.

Contributing

See CONTRIBUTING.

License

MIT :copyright: 2017 Andrew Prentice

Powered by

Acronym Server, Datamuse, Onelook, Rhymebrain, Urban Dictionary, Wordnik, and Wordsmith

Extras

Prose

For fun, read some of my prose...

Take Command

See take-command.

changelog

Change Log

All notable changes to this project will be documented in this file. See standard-version for commit guidelines.

4.0.0 (2019-01-04)

Features

BREAKING CHANGES

  • project: Right now anagrams are disabled. I'm effectively removing this feature for now

3.0.0 (2017-08-30)

Features

  • project: BREAKING_CHANGES:remove tests (0113744)

BREAKING CHANGES

  • project: remove tests

2.3.4 (2017-02-05)

Bug Fixes

2.3.3 (2017-01-29)

Bug Fixes

  • configuration: missing command aliases (d368b8d)

2.3.2 (2017-01-29)

Bug Fixes

  • wordmap: mapping doesn't work in other directories as a package (17b01e1)

2.3.1 (2017-01-25)

Bug Fixes

  • project: config init error (8b0bfa1)
  • themes: control fallback msg with verbose (9e3de72), closes #16

2.3.0 (2017-01-23)

Features

  • project: add random word command (4d782be), closes #14

2.2.0 (2017-01-21)

Features

  • project: add command aliases (4597a8c)

2.1.0 (2017-01-09)

Bug Fixes

  • tools: move fs-extra to runtime deps (95067ab)

Features

  • tools: add functions from iloa (35ceabd)

2.0.0 (2016-09-15)

Bug Fixes

  • project: proper HTTP error msg (9eef640)

Features

  • project: rename build dir to bin, simplify gulpfile, simplify command file and dir names (208250e)

BREAKING CHANGES

  • project: See items listed in #12

1.2.0 (2016-08-26)

Bug Fixes

  • wordnik: remove url from outfile (2dac4dc), closes #8

Features

  • wordnik: check for API key (bbf9dab)

1.1.0 (2016-08-26)

Bug Fixes

  • rbrain: Add timestamp expired msg to usage info (422df3c)

Features

  • dmuse: cached response won't decrement usage (3973511)
  • onelook: cached response won't decrement usage (01bd9f0)
  • rbrain: cached response won't decrement usage (613be73)
  • wordnik: cached response won't decrement usage (9783ea8)

1.0.2 (2016-08-19)

Bug Fixes

  • CI: remove strip-ansi require (48efa39)
  • cli-tests: stringify error (9c9932d)
  • config-init: no more JSON stringify creating problems with babel-polyfill (8a9dca8), closes #6

1.0.1 (2016-08-17)

1.0.0 (2016-08-17)

Bug Fixes

  • CI: don't test on 4.x or iojs (7380d8c)
  • CI: theme dir gets set correctly (194e123)
  • onelook: extract strings from arrays (9e504d1), closes #4
  • themes: undefined/connector printing with label (af53971)
  • urban: addtl args don't include 'urban' (ac11277)
  • urban-hyphen: incorrect labelling (9388081)

Features

  • tools: arrToStr function (1f5ea44)

BREAKING CHANGES

  • CI: All changes listed in #5

0.1.4 (2016-08-03)

Bug Fixes

  • project: use repo dir or pkg dir (f13cdd1)

0.1.3 (2016-08-02)

Bug Fixes

  • project: package directory access (2d60a1c)

0.1.2 (2016-08-02)

Bug Fixes

0.1.1 (2016-08-01)

Bug Fixes

  • make glob a runtime dep (c3b5afb)

0.1.0 (2016-08-01)

Bug Fixes

  • combine: fix tofile (df453fa)
  • config: init timestamps and verbose output (85f86ec)
  • config-init: Save remain for rate-limiting (290986a)
  • config-init: Saves remaing requests for rate-limiting (7714a4f)
  • datamuse: fix arg parsing (5b153f3)
  • list-themes: filepath str replace (5180a76)
  • origin: fix output (b656aaf)
  • origin: fix tofile (5b93352)
  • project: fix rate-limiting (c13907a)
  • project: fix tests (c9517e5)
  • project: init before CI (41e66f8)
  • project: yargs install (4402f7e)
  • rbrain-info: remove maxResults (d9736d4)
  • rbrain-rhyme: parsing values (2b342b0)
  • rhymebrain: rate limiting output (2a13efe)
  • rhymebrain: rate-limiting and result output (5b98c47)
  • rhymebrain: remove debug console.log (c82c8a0)
  • urban: fix args (59877f8)
  • wordmap: change bin to build (6b0ed9c)

Features

  • dmuse: add metrics, pull into subcmds (e0b2483)
  • project: datamuse subcmds and add rate-limiting (94cb7f6)
  • project: url in serialized output file (2fc81d8)
  • add api usage option (67ff191)