{"_id":"@abhishekwl/dict_cli","_rev":"2-981a23354324211b39bec8e51b37a733","name":"@abhishekwl/dict_cli","dist-tags":{"latest":"1.0.2"},"versions":{"1.0.1":{"name":"@abhishekwl/dict_cli","version":"1.0.1","main":"index.js","author":{"name":"x86q"},"license":"MIT","dependencies":{"chalk":"^4.1.0","commander":"^7.2.0","node-fetch":"^2.6.1","prompt-sync":"^4.2.0"},"bin":{"dict":"index.js"},"gitHead":"cb5aee915e1d737ba673af3bdfc7fbf225b07267","description":"Robust CLI based thesaurus to play with. Focused on code structure and file organisation. Built using `commander` (CLI operations) and `chalk` (console coloring). Makes API calls to [dictionaryapi.com](https://dictionaryapi.com/products/api-intermediate-t","_id":"@abhishekwl/dict_cli@1.0.1","_nodeVersion":"15.11.0","_npmVersion":"7.6.0","dist":{"integrity":"sha512-E3RVXynMcpZfq1K6X9aiogq1TSziZfDf1hwp0yftWgPn1qGbdyOHlHAGc2LvBr35PQawuD35cK+8kTk1Gsl/Cw==","shasum":"b6fe2ade5185d77c6ee60649ea59c008e79ddd0d","tarball":"https://registry.npmjs.org/@abhishekwl/dict_cli/-/dict_cli-1.0.1.tgz","fileCount":16,"unpackedSize":19832,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJga1ZpCRA9TVsSAnZWagAArfYP/jx23ogJWfwisahRkeOa\n+KToKiVGNKesTXslRK8kRlU2O4/v3CRFHa0Yp5gpPTLZcEBk0gv2ucDPLyTZ\nv0SwNEL+oC9AQbqp6Vb26NjakfpCpqA3YvtFl9uaswDfq5bmL/5n7Lojr2Dw\n0TyTIs+Wi+vSZMQ9gn+WCZ74gN3P2uDlE3kaavwJmW2h8G6RYoj1smWtt9pt\ngTw8d5OZh0hgEvKcNmAWxkryhiiBpyhCfTVuEFryTXT53mwYHjN9Pjb6odEN\nT6FugoUmIhTCLa0y9sWoM96UxcrLrU0r9NSHMnFPL1IIHtt6PbAYSxs8on8x\njxFuC44Mlj2LNoV7F7qK4PUcP1GxSNGKytlV2vDfxgL4iqFil2GHvxOONYYk\nVs/llZs0ee6uSwdpWe9BxR/Gn9B5hGuaqQngcfESgvrLqNHgDOjGXRMXviS1\nwYxbgKx9xgxWdd2lQpl4rdBDm9idp57toMdoMwlxaskgRqTyoCpRmp+Y3Xja\n4XZBJDdMehB39JlHuBxWDwtQDBlhnEVzCGdWW3uLSqwD1VeCm2ARHQfPFEMv\nCiCHQJdQ+aaJZtUj2SfDN9mb2treaNjEZcrgaBu9RbTPfLcpAd+Ev5hwP6/x\nodMrf3fe8yrLHYpC7ZoQ9tUz2kHOtVje2OUKURG+YLHgcB6nzj3JfIO1GAI0\npR1F\r\n=Nz0k\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCpmNRJ9SwUZsTb7iGy/L1Ck34JNBrtTO1ZNOJGLCATfAIgIup9A5YbKmken8zFCJor+wMu2La8BoxZDkTGEAkkfl0="}]},"_npmUser":{"name":"abhishekwl","email":"nateriver210@gmail.com"},"directories":{},"maintainers":[{"name":"abhishekwl","email":"nateriver210@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/dict_cli_1.0.1_1617647209512_0.6031418902360437"},"_hasShrinkwrap":false},"1.0.2":{"name":"@abhishekwl/dict_cli","version":"1.0.2","main":"index.js","author":{"name":"x86q"},"license":"MIT","dependencies":{"chalk":"^4.1.0","commander":"^7.2.0","node-fetch":"^2.6.1","prompt-sync":"^4.2.0"},"bin":{"dict":"index.js"},"keywords":["dictionary","cli","thesaurus"],"gitHead":"c9a81fbc1ebecc73aec6731aceb485f5820b754f","description":"Robust CLI based thesaurus to play with. Focused on code structure and file organisation. Built using `commander` (CLI operations) and `chalk` (console coloring). Makes API calls to [dictionaryapi.com](https://dictionaryapi.com/products/api-intermediate-t","_id":"@abhishekwl/dict_cli@1.0.2","_nodeVersion":"15.11.0","_npmVersion":"7.6.0","dist":{"integrity":"sha512-iWhNabjd9t8gMT7ThpjOwVEDXr5TJcFsjbE/Qb20vXH+4eexlczj+bpVcNbRX2xPzDNnxZe4XIstu0uwqmIbMg==","shasum":"04eade0509af97a34fbe72c02c16c40245aea5ac","tarball":"https://registry.npmjs.org/@abhishekwl/dict_cli/-/dict_cli-1.0.2.tgz","fileCount":16,"unpackedSize":19898,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJga1beCRA9TVsSAnZWagAAV8MQAJxMV6Ufiis+OVSVz4bW\n+4NsgfTXZU7nRvC3gZsThcZOF4IBiViXpMKnx/8bssM3rpQ6r0hMnHzXy9CM\ncXuYGgedDTRRyOFO2a6v8biRTkI3fVq4S+WavY9tLhRXBRiVBsxcVH1Jvcfw\ndXf4uyZxuki2/amnwlhqasZ5J226T6Q1WKB9zeoiUVykT9UFKUYLrx8fnNOh\nzKyyeZEohM/QbQk07WYBnAE5HIZmmL9ocynN2SAVj7InEHCw+kfMaq6gkQHJ\naxfrYJrwUP1dEakY0kBggvH3/v22rFJZ0HJ3z5MxQ56Ys/PPTWdjd9mOmjlk\nYpZMIDbuL4kW4XqsFfqfelNjO3IGlHEW+VuDD6FEeKnP8xCRATP/Y4k1i12A\n7MaGHW/6zS/2owXtPvRw6x4DJy1eSTG//a7txsBJj4Q8F6EH66QqO4C4Mk27\niOFFse8ed4FxHwsl6+GTkFzZq5vuwFY08D+zjYTtvA7MfOZTZ6WjjAHwNmvd\n8Ew6YcuvLh/nTfmgVWB7zY3j40OejjLw7ujjiRy/+CYFcl1ENMFRauxYXJQ7\nGckWuZRB/9VJ5USAPQn4erx66gtkJ89UF+qxVkRPjql6O4+hti5Kvy3GItEU\nwOYIx9MCnvuzBngAtunJFkaCzO8Km9gvpnuypviRr16J4Qu3FMfZVivXluEh\nO33X\r\n=sgry\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA2EwldDrbS4//Q8Mt21m20zJpXQ5EQNOEvHfILjD/xQAiBTE00eLMK4f6gPeEwSONIVIRPCT0qZPG7aHxS1RZHsCA=="}]},"_npmUser":{"name":"abhishekwl","email":"nateriver210@gmail.com"},"directories":{},"maintainers":[{"name":"abhishekwl","email":"nateriver210@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/dict_cli_1.0.2_1617647325967_0.7788834880720232"},"_hasShrinkwrap":false}},"time":{"created":"2021-04-05T18:26:49.340Z","1.0.1":"2021-04-05T18:26:49.635Z","modified":"2022-04-04T10:59:25.312Z","1.0.2":"2021-04-05T18:28:46.090Z"},"maintainers":[{"name":"abhishekwl","email":"nateriver210@gmail.com"}],"description":"Robust CLI based thesaurus to play with. Focused on code structure and file organisation. Built using `commander` (CLI operations) and `chalk` (console coloring). Makes API calls to [dictionaryapi.com](https://dictionaryapi.com/products/api-intermediate-t","author":{"name":"x86q"},"license":"MIT","readme":"# 🔨 dict (Stack Finance Task)\n\nRobust CLI based thesaurus to play with. Focused on code structure and file organisation.\nBuilt using `commander` (CLI operations) and `chalk` (console coloring). Makes API calls to [dictionaryapi.com](https://dictionaryapi.com/products/api-intermediate-thesaurus) to fetch definitions, synonyms, antonyms and usage examples of a given word.\n\n## 🏗 Usage\n```\nUsage: dict [options] [command]\n\nOptions:\n  -v, --version   Displays the current version of the CLI\n  -h, --help      display help for command\n\nCommands:\n  def <word>      Display definitions of a word\n  syn <word>      Display synonyms of a word\n  ant <word>      Display antonyms of a word\n  ex <word>       Display examples of a word\n  play            Let's play a game\n  help [command]  display help for command\n```\n\n## 📚 Directory Structure\n```\n.\n├── README.md\n├── index.js\n├── package.json\n├── src\n│   ├── shared\n│   │   ├── commands.metadata.json\n│   │   ├── constants.js\n│   │   └── random.words.txt\n│   ├── thesaurus\n│   │   ├── controller\n│   │   │   ├── antonym.controller.js\n│   │   │   ├── definition.controller.js\n│   │   │   ├── example.controller.js\n│   │   │   ├── full-dict.controller.js\n│   │   │   ├── play.controller.js\n│   │   │   └── synonym.controller.js\n│   │   ├── enums\n│   │   │   └── command.enum.js\n│   │   ├── helpers\n│   │   │   └── play.helper.js\n│   │   └── services\n│   │       └── thesaurus.service.js\n│   └── util\n│       └── index.js\n└── yarn.lock\n```\n\n## 🚀  Done so far\n- Implemented `enums` for command names.\n- Separation of concerns, `service` layer deals with API calls, `controller` deals with CLI interaction, `helpers` aid controllers with functions specific to the module.\n- `shared` directory contains globally shared resources such as constants and command information.\n- Utility functions are stored in `util` directory.\n- Error management at every stage with `try/catch` being implemented with various error types at the service level as well as the controller level.\n- Minimalist `index.js` entrypoint with necessary imports only.\n\n## 📣 Possible Enhancements\n- Fetch API key from environment variables, storing it in code to make testing easier.\n- Use jsconfig `paths` to make relative imports easier.\n- Implements typescript to ensure types.\n- Improve CLI interface (`prettify`).\n- Display a friendly `did you mean` message if a command is not found.\n- Add autoupdate support to the CLI.\n- Add `bash`/`zsh` autocomplete.\n\n## 🌈 Screenshots\n\n1. Definition\n\n![Definition](https://i.ibb.co/186dpSz/Screenshot-2021-04-05-at-11-02-18-PM.png)\n\n2. Synonym\n\n![Synonym](https://i.ibb.co/cY37NWn/Screenshot-2021-04-05-at-11-09-58-PM.png)\n\n3. Antonym\n\n![Antonym](https://i.ibb.co/7SQLvjN/Screenshot-2021-04-05-at-11-12-36-PM.png)\n\n4. Example\n\n![Example](https://i.ibb.co/kQck0t7/Screenshot-2021-04-05-at-11-13-55-PM.png)\n\n5. Full Dictionary\n\n![Full Dict](https://i.ibb.co/TB8mnvK/Screenshot-2021-04-05-at-11-17-23-PM.png)\n\n6. Word of the day\n\n![Word of the day](https://i.ibb.co/kBXyt2B/Screenshot-2021-04-05-at-11-15-46-PM.png)\n\n7. Game\n\n![Play](https://i.ibb.co/rdnhPMf/Screenshot-2021-04-05-at-11-19-37-PM.png)\n","readmeFilename":"README.md","keywords":["dictionary","cli","thesaurus"]}