Giter Club home page Giter Club logo

emma-cli's Introduction

Emma ๐Ÿ“ฆ

CircleCI npm version npm Backers on Open Collective Sponsors on Open Collective

Install the package you are looking for.

Powered by Algolia search API.

Overview

Emma is a command line assistant which helps you search and install packages more efficiently from your CLI.

Features

  • ๐Ÿ”Peek definitions: Use right arrow keys to get description of the packages or peek README.
  • โณScroll infinitely: Search all the packages from NPM and Yarn using your terminal.
  • ๐Ÿ“šBuild the stack: Search for multiple packages and install them with one keystroke.
  • ๐Ÿ‘ทโ€โ™€๏ธDiscover starters for your next project: Select from numerous starters that you can use to scaffold your project.

To start a new project

yarn create emma

Install

npx emma-cli

or

yarn global add emma-cli

Exposes two global commands, ema and emma.

Example

โฏ emma-cli ~ emma
Search packages on Yarn: @types/rea
โ—‰ 16.6m  @types/react                  DefinitelyTyped
  7.3m   @types/react-dom              DefinitelyTyped
  4m     @types/react-router           DefinitelyTyped
  3.9m   @types/react-transition-group DefinitelyTyped
  2.8m   @types/react-router-dom       DefinitelyTyped
Overview
dependencies
 - react
 - react-dom
devDependencies
 - @types/react
Installation
Successfully installed dependencies!
Search powered by Algolia.

API

Usage
  $ emma

Controls:
  - space: toggle dependencies
  - up/down: scroll the list
  - right/left: hide or show details
  - double right: show repo

All flags after emma are forwarded to installer.

Contributors

This project exists thanks to all the people who contribute.

Backers

Thank you to all our backers! ๐Ÿ™ [Become a backer]

Sponsors

Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [Become a sponsor]

Related

  • ibrew - Interactive CLI to find and install homebrew packages.

License

MIT ยฉ Matic Zavadlal

emma-cli's People

Contributors

aulisius avatar fnky avatar fregante avatar haroenv avatar j-f1 avatar jamesgeorge007 avatar juresotosek avatar maticzav avatar mischah avatar monkeywithacupcake avatar pantharshit00 avatar renovate-bot avatar renovate[bot] avatar vvo avatar xjohn600 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

emma-cli's Issues

FYI: new tink/npm search probably being derived from this

Heya! I'm Kat, the architect for the npm CLI and tink. I just wanted to let you know that your project is super cool and I think is a fantastic candidate for replacing the current npm search (starting off as the new tink search). I've made a post about it asking for community collaborators to contribute it, and I'm expecting a variation on your project!

This isn't me writing asking for you to contribute it, by the way. I just wanted to make sure you knew and hopefully were happy to have inspired this improvement. Thanks for the cool project!

Use npm if there is an `package-lock.json` file

Hi,

First of all, great project!

I'm using yarn in some projects and npm in other. emma is however defaulting to yarn due to these lines:

emma-cli/src/emma.js

Lines 20 to 27 in dfef9ef

const shouldUseYarn = () => {
try {
execSync(`yarnpkg --version`, { stdio: `ignore` })
return true
} catch (e) {
return false
}
}

What do you think of checking if package-lock.json exist first? Something like

const canAccessFile = promisify(fs.access)
const exec = promisify(child_process.exec)

const isYarnInstalled = () => exec(`yarnpkg --version`, { stdio: `ignore` }).then(() => true).catch(() => false)

const shouldUseYarn = () => {
  return canAccessFile('package-lock.json')
    .then(() => false)
    .catch(isYarnInstalled)
}

And then:

- const yarn = shouldUseYarn()
+ const yarn = await shouldUseYarn()

I can create a pull request if you want.

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Rate-Limited

These updates are currently rate-limited. Click on a checkbox below to force their creation now.

  • Update dependency @prisma/photon to v2.0.0-preview019
  • Update dependency @types/object-hash to v1.3.4
  • Update dependency @types/supertest to v2.0.16
  • Update dependency creato to v1.1.4
  • Update dependency ink-testing-library to v1.0.3 (ink-testing-library, @types/ink-testing-library)
  • Update dependency multilines to v1.0.3
  • Update dependency multilines to v1.0.3
  • Update dependency pretty-quick to v2.0.2
  • Update dependency prisma2 to v2.0.0-preview025
  • Update dependency prisma2 to v2.0.0-preview025
  • Update dependency rimraf to v3.0.2
  • Update dependency string-width to v4.2.3
  • Update dependency @types/jest to v24.9.1
  • Update dependency @types/lodash to v4.17.0
  • Update dependency ink to v2.7.1
  • Update dependency ink-spinner to v3.1.0
  • Update dependency js-yaml to v3.14.1 (js-yaml, @types/js-yaml)
  • Update dependency nock to v11.9.1
  • Update dependency node-fetch to v2.7.0 (node-fetch, @types/node-fetch)
  • Update dependency object-hash to v2.2.0
  • Update dependency open to v7.4.2
  • Update dependency ora to v4.1.1
  • Update dependency prompts to v2.4.2 (prompts, @types/prompts)
  • Update dependency ts-node-dev to v1.1.8
  • Update react monorepo (@types/react, react)
  • Update dependency @types/algoliasearch to v4
  • Update dependency @types/jsonwebtoken to v9
  • Update dependency @types/meow to v6
  • Update dependency @types/node to v20
  • Update dependency @types/supertest to v6
  • Update dependency @types/update-notifier to v6
  • Update dependency algoliasearch to v4
  • Update dependency chalk to v5
  • Update dependency cli-truncate to v4
  • Update dependency execa to v8
  • Update dependency husky to v9
  • Update dependency ink to v4
  • Update dependency ink-spinner to v5
  • Update dependency ink-testing-library to v3
  • Update dependency js-yaml to v4 (js-yaml, @types/js-yaml)
  • Update dependency lerna to v8
  • Update dependency meow to v13
  • Update dependency nock to v13
  • Update dependency node-fetch to v3
  • Update dependency object-hash to v3 (object-hash, @types/object-hash)
  • Update dependency open to v10
  • Update dependency ora to v8
  • Update dependency pkg to v5
  • Update dependency prettier to v3
  • Update dependency pretty-quick to v4
  • Update dependency rimraf to v5
  • Update dependency string-width to v7
  • Update dependency supertest to v7
  • Update dependency ts-node to v10
  • Update dependency ts-node-dev to v2
  • Update dependency tslint to v6
  • Update dependency typescript to v5
  • Update dependency update-notifier to v7
  • Update jest monorepo to v29 (major) (@types/jest, jest, ts-jest)
  • Update react monorepo to v18 (major) (@types/react, react)
  • ๐Ÿ” Create all rate-limited PRs at once ๐Ÿ”

Edited/Blocked

These updates have been manually edited so Renovate will no longer make changes. To discard all commits and start over, click on a checkbox.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

npm
package.json
  • @types/jest 24.0.23
  • chalk 3.0.0
  • codecov 3.6.1
  • execa 3.3.0
  • husky 3.0.9
  • jest 24.9.0
  • jest-serializer-ansi 1.0.3
  • lerna 3.18.4
  • multilines 1.0.2
  • prettier 1.19.1
  • pretty-quick 2.0.1
  • rimraf 3.0.0
  • ts-jest 24.1.0
  • ts-node 8.5.2
  • tslint 5.20.1
  • tslint-config-prettier 1.18.0
  • tslint-config-standard 9.0.0
  • typescript 3.7.2
packages/create-emma/package.json
  • algoliasearch ^3.32.1
  • chalk ^3.0.0
  • cli-truncate ^2.1.0
  • creato ^1.1.0
  • execa ^3.4.0
  • ink ^2.6.0
  • ink-spinner ^3.0.0
  • meow ^5.0.0
  • multilines ^1.0.2
  • node-fetch ^2.6.0
  • open ^7.0.0
  • ora ^4.0.3
  • prompts ^2.3.0
  • react ^16.12.0
  • string-width ^4.2.0
  • update-notifier ^3.0.1
  • @types/algoliasearch 3.34.7
  • @types/execa 2.0.0
  • @types/ink 2.0.3
  • @types/ink-testing-library 1.0.1
  • @types/jest 24.0.23
  • @types/meow 5.0.0
  • @types/node-fetch ^2.5.4
  • @types/ora ^3.2.0
  • @types/prompts ^2.0.3
  • @types/react 16.9.15
  • @types/update-notifier 2.5.0
  • @zeit/ncc 0.20.5
  • ink-testing-library 1.0.2
  • pkg 4.4.0
  • node >=8.0.0
packages/emma-cli/package.json
  • algoliasearch ^3.32.1
  • execa ^3.4.0
  • ink ^2.6.0
  • ink-spinner ^3.0.0
  • meow ^5.0.0
  • multilines ^1.0.2
  • open ^7.0.0
  • react ^16.12.0
  • update-notifier ^3.0.1
  • @types/algoliasearch 3.34.7
  • @types/execa 2.0.0
  • @types/ink 2.0.3
  • @types/ink-testing-library 1.0.1
  • @types/meow 5.0.0
  • @types/react 16.9.15
  • @types/update-notifier 2.5.0
  • @zeit/ncc 0.20.5
  • ink-testing-library 1.0.2
  • pkg 4.4.0
  • node >=8.0.0
server/package.json
  • @prisma/photon ^2.0.0-preview018
  • algoliasearch 3.35.1
  • crypto ^1.0.1
  • express 4.17.1
  • fp-ts 2.2.0
  • io-ts 2.0.1
  • js-yaml ^3.13.1
  • jsonwebtoken 8.5.1
  • lodash ^4.17.15
  • object-hash ^2.0.1
  • prisma2 ^2.0.0-preview018
  • probot 9.6.6
  • @types/algoliasearch 3.34.7
  • @types/express 4.17.2
  • @types/js-yaml ^3.12.1
  • @types/jsonwebtoken 8.3.5
  • @types/lodash ^4.14.149
  • @types/node 12.12.14
  • @types/object-hash ^1.3.0
  • @types/supertest ^2.0.8
  • execa 3.4.0
  • husky 3.1.0
  • lerna 3.19.0
  • nock ^11.7.0
  • prisma2 2.0.0-preview016.2
  • supertest ^4.0.2
  • ts-jest 24.2.0
  • ts-node 8.5.4
  • ts-node-dev 1.0.0-pre.44
  • typescript 3.7.3
templates/starter/package.json
nvm
.nvmrc

  • Check this box to trigger a request for Renovate to run again on this repository

Set configuration to choose more than 5 results

5 results is really to limited IMO.
If I don't already know the exact package name, I can't really get a list long enough to maybe find the right-one. Feel free to close or keep it as nice to have as it's really a personal opinion.

Display packages version in the list

Hey @maticzav, thanks for this awesome tool ๐Ÿ‘

This is just a suggestion, not really an issue, but it would be great if we could see the packages version in the search list!

What do you think?

add the possibility to choose to install as devDependencies when i select a package

Hi, awesome project

I see that we can choose to install packages as devDependencies with the --dev option, but often what happens to me is i search for a package like yarn add next react react-dom and then need to do yarn add -D @types/next @types/react @types/react-dom as a devDependencies.

I see two way your cli would be awesome, first i can just start searching and when i select a package to install their is some way to choose as a dependencies or devDependencies so i don't have to to quit the search to switch between dev and normal dependencies.

The second way that would be even more awesome is only useful for typescript people but that would be to install as devDependencies the @types package automatically by searching if it exist.

Let me know how that sounds to you and maybe we can work something out :)

Multi-select

Love the tool! One thing you might want to consider looking into is a way to select more than one package at a time with a search. For instance, if I want both react and react-dom, I type in react and both come up. However, I have to press enter on React, retype react, arrow down to react-dom, press enter, then press enter again just to install 2 packages. If I wanted eslint-react-plugin as well, it'd be even worse.

Instead, if I could press space bar or similar to multi-select current packages on the screen, it would make this great tool even quicker. Thanks!

Output as JSON?

I like to run a custom script to install my node packages. Is there a way to set the command that is used for installation or just get the output as something machine parseable?

Got error when run command `emma`

Hi there,

Thank you so much for creating this tool, it looks awesome! However, after I install it, by running npm install -g emma-cli, everytime I enter emma, I get the following error:

const canAccessFile = (0, _util.promisify)(_fs.default.access);
                                          ^

TypeError: (0 , _util.promisify) is not a function
    at Object.<anonymous> (/usr/local/lib/node_modules/emma-cli/dist/emma.js:40:43)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/usr/local/lib/node_modules/emma-cli/dist/index.js:10:36)
    at Module._compile (module.js:570:32)```

CLI is not added to my binaries

After yarn global add emma-cli.
I got a successful message:

success Installed "[email protected]" with binaries:
      - emma
      - ema
โœจ  Done in 3.96s.

But no emma CLI is at ls /usr/local/bin/.
Other yarn packages installed globally are present there.

Using npx works great ๐Ÿ‘

My env is:

  • macos Mojave
  • hyper term with fish 3.0.2
  • yarn 1.5.1
  • node 10.15.3

๐Ÿค”

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.