GithubHelp home page GithubHelp logo

cerebroapp / cerebro Goto Github PK

View Code? Open in Web Editor NEW
8.2K 135.0 451.0 4.96 MB

🔵 Cerebro is an open-source launcher to improve your productivity and efficiency

Home Page: https://www.cerebroapp.com/

License: MIT License

JavaScript 82.34% CSS 10.14% HTML 1.22% NSIS 0.36% Shell 0.07% TypeScript 5.87%
search launcher electron cerebro

cerebro's Introduction

Cerebro

Cerebro is an open-source launcher to improve your productivity and efficiency

Usage

You can download the latest version on the releases page.

After the installation, use the default shortcut, ctrl+space, to show the app window. You can customize this shortcut by clicking on the icon in the menu bar, and then selecting "Preferences...".

Cerebro

Plugins

Core plugins

  • Search the web with your favourite search engine
  • Search & launch application, i.e. spotify
  • Navigate the file system with file previews (i.e. ~/Dropbox/passport.pdf)
  • Calculator
  • Smart converter. 15$, 150 рублей в евро, 100 eur in gbp;

Install plugins

You can manage and install more plugins by typing plugins <plugin-name> in the Cerebro search bar.

Discover plugins and more at Cerebro's Awesome List.

If you're interested in creating your own plugin, check the plugins documentation.

Shortcuts

Cerebro provides several shortcuts to improve your productivity:

  • ctrl+c: copy the result from a plugin to the clipboard, if the plugin does not provida a result, the term you introduced will be copied
  • ctrl+1...9: select directly a result from the list
  • ctrl+[hjkl]: navigate through the results using vim-like keys (Also ctrl+o to select the result)

Change Theme

Use the shortcut ctrl+space to open the app window, and type Cerebro Settings. There you will be able to change the Theme.

Currently Light and Dark Themes are supported out of the box

change-cerebro-theme

Config file path

You can find the config file in the following path depending on your OS:

Windows: %APPDATA%/Cerebro/config.json

Linux: $XDG_CONFIG_HOME/Cerebro/config.json or ~/.config/Cerebro/config.json

macOS: ~/Library/Application Support/Cerebro/config.json

⚠️ A bad configuration file can break Cerebro. If you're not sure what you're doing, don't edit the config file directly.

Build executable from source

If you'd like to install a version of Cerebro, but the executable hasn't been released, you can follow these instructions to build it from source:

  1. Clone the repository

  2. Install dependencies with yarn:

    yarn --force
  3. Build the package:

     yarn package

Note: in CI we use yarn build as there is an action to package and publish the executables

Install executable on Linux

If you're a linux user, you might need to grant execution permissions to the executable. To do so, open the terminal and run the following command:

sudo chmod +x <path to the executable>

Then, you can install the executable by running the following command:

  • If you're using the AppImage executable:

    ./<path to the executable>
  • If you're using the deb executable:

    dpkg -i <path to the executable>

On some computers you might need run these commands with elevated privileges (sudo). sudo ./<path to the executable> or sudo dpkg -i <path to the executable>

Contributing

CerebroApp is an open source project and we welcome contributions from the community. In this document you will find information about how Cerebro works and how to contribute to the project.

⚠️ NOTE: This document is for Cerebro developers. If you are looking for how to develop a plugin please check plugin developers documentation.

General architecture

Cerebro is based on Electron and React.

A basic Electron app is composed of a main process and a renderer process. The main process is responsible for the app lifecycle, the renderer process is responsible for the UI.

In our case we use:

All this files are bundled and transpiled with Webpack and Babel.

The build process is managed by electron-builder.

Two renderer processes

This two-renderer process architecture is used to keep the main renderer process (Cerebro) responsive and to avoid blocking the UI when executing long tasks.

When we need to execute a long task we send a message to the background process, which executes the task asynchronously and sends a message back to the main renderer when the task is completed.

This is the way we implement the plugins system. Their initializeAsync method is executed in the background process.

Prerequisites

Install Cerebro

First, clone the repo via git:

git clone https://github.com/cerebroapp/cerebro.git cerebro

Open the project

cd cerebro

And then install dependencies:

yarn

Run in development mode

yarn run dev

Note: requires a node version >=16.x

Resolve common issues

  1. AssertionError: Current node version is not supported for development on npm postinstall. After yarn postinstall script checks node version. If you see this error you have to check node and npm version in package.json devEngines section and install proper ones.

  2. Uncaught Error: Module version mismatch. Exepcted 50, got ... This error means that node modules with native extensions build with wrong node version (your local node version != node version, included to electron). To fix this issue run yarn --force

Conventional Commit Format

The project is using conventional commit specification to keep track of changes. This helps us with the realeases and enforces a consistent style. You can commit as usually following this style or use the following commands that will help you to commit with the right style:

  • yarn cz
  • yarn commit

Publish a release

CerebroApp is using GH actions to build the app and publish it to a release. To publish a new release follow the steps below:

  1. Update the version on both package.json and app/package.json files.
  2. Create a release with from GH and publish it. 🚧 The release tag MUST contain the v prefix (❌ 0.1.2 → ✅v0.1.2).
  3. Complete the name with a name and a description of the release.
  4. The GH action is triggered and the release is updated when executables are built.

License

MIT © Cerebro App

cerebro's People

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  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

cerebro's Issues

Plugin install : Doc

Hi ! This looks really awesome, thanks for this work !

I installed cerebro and I wanted to try some plugin but I couldn't find how to do that.

Can add few lines about that in the README ?

Or if it's really simple just reply to this issue but I think it might help others :)

Thanks

Persist search result

current:

the search result would be cleared after toggling cerebro with shortcut

expected:

result should not be cleared.

Change Translate default language

Hi cerebro team,

Any way to change the default language for Translate? It's defaulting from English to Russian. Can we change the default destination language?

Get applications list on Linux

Cerebro has a lot of plugins, but most used of them is searching and launching applications. There is a plugin to do it on OSx.

Now we need to add a plugin to do the same on linux, so we need:

  1. Find a way to get list of all installed applications and cache this list;
  2. This list should contain human-friendly name of application and path to this application to run it;
  3. Later we should find a way to display application icon in list.

Command bypass to terminal with ">"

Please consider implementing command bypass to terminal, so that when you type in something like:
> cd desktop

  1. terminal (cmd.exe on windows) would open up and
  2. the code would get passed there

It's a very helpful feature in Wox which is an alternative to cerebro.

  • an option to prevent it from closing after command execution would be very handy, as well as
  • an option to show the list of the recent commands

111

Latest build is broken

On the latest build, running either dev or build && start results in the application launching, and the main window displayed as a thin bar with no text entry visible. Clicking in the box or typing doesn't seem to do anything, the bar remains white.

The application's icon menu toggles visibility on and off, however Plugins and Preferences just display the empty white bar if the application wasn't already visible. Quit Cerebro works :)

Tested on both OSX El Capitan & Windows 10.

File search in windows

Hello, I was looking for a better alternative for Alfred on windows. After trying all the available software, I liked Cerebro and Wox Launcher. But an important feature missing in Cerebro is system wide file search. Wox launcher has this feature by using Everything plugin. I suggest same can be done for Cerebro.

Window stays open when choosing a suggestion

Window hides on enter ✅

REPRO

  1. Open cerebro window
  2. Type "anything"
  3. Hit enter

EXPECTED & ACTUAL
Browser opens, cerebro hides

Window does not hide on enter ❌

REPRO

  1. Open cerebro window
  2. Type "anything"
  3. Arrow over to suggestion list
  4. Hit enter

EXPECTED
Browser opens, cerebro hides

ACTUAL
Browser opens, cerebro stays open

Requiring NPM

Are there any plans on not strictly requiring npm? Wanted to add some enhancements to cerebro, but yarn install fails with AssertionError: Current node version is not supported for development because (what I assume) NPM is required.

Would be cool to have the option to use the preferred package manager.

Separate plugins by OS

Right now plugins are OS-ignorant and pretty hard coded for osx. Would be good to have a scheme where by the correct os-specific plugin is chosen for a certain feature

Hide on lose focus

Would like the option for cerebro to hide when the window loses focus, for example;

  1. Open cerebro
  2. Click on another window
  3. cerebro hides

Alternative search engines and translation services

Although very useful built in features, it would be good to have a toggle to disable/enable the default search and translate plugins. Those concerned with privacy may not like use Google/Yandex.

I will try to work on a duckduckgo search implementation.

Plugin documents

Hi,
I can't find the document for writing the plugin.
Is there are plan to start writing the document?
Thanks.

Show icons for applications and preferences on MacOS

Cerebro does not display icons for applications and preferences on MacOS

Probably the reason is in that the apps in MacOS are folders. In the apps/index.js uses path for icon which is in this case is dir. Real icon is bit deeper AppName.app/Contents/Resources/*.icns

just white line and icon in toolbar

При запуске вижу только белую полосу и иконка в панеле инструментов. Ни настроки ни само приложение не рабоет.
Mac Book pro mid 2012 el capitan
Node v7.0.0 && NPM 3.10.8

Missing apps

I sometimes see missing obvious apps in the search results, like this:

screen shot 2017-01-30 at 09 01 09

Obviously missing the actual App Store.app – only finding the prefpane.

Icon appears jagged in Windows

I briefly saw icons included in the latest commits - possibly the reason why the icon is displayed low quality in windows now;
image

Cerebro does not show up in full-screen mode on Mac

When I toggle Cerebro in full-screen mode search window shows up on Desktop instead of current window.

It is expected to have search window on the top of current application like Spotlight does.
Is it relatively easy fix?

I would like to help if you can point me to the code I can start my investigations from.

shortcut to clipboard

would be great to have a shortcut that instead of opening the link in browser, would just copy the link of it to clipboard (and close app)

for example, search for a gif, imdb movie or anything else, instead of pressing 'Enter' to open in browser, press 'Shift Enter' to copy link to clipboard to immediately share in IM or social media or elsewhere.

translation options

please include settings to change translator service to other popular online translators. Yandex is very limited in language support. (very few languages)

Unable to run AppImage on Arch Linux

When running the AppImage on Arch Linux, after making it executable, I get the following error:

/tmp/.mount_NUsefC/AppRun: line 77: 21426 Aborted (core dumped) LD_LIBRARY_PATH="" zenity --question --title="$TITLE" --text="$TEXT" 2> /dev/null

This is using the latest release, 0.2.3.

Starting app on windows fails

I just downloaded the windows release and I get two dialog popups:

The program can't start because node.dll is missing from your computer. Try reinstalling the program to fix this problem.

The other dialog states (comes after I click OK on the first one):

The program can't start because ffmpeg.dll is missing from your computer. Try reinstalling the program to fix this problem.

[macos] invisible on fullscreen apps

Steps to reproduce on mac os sierra:

  1. switch chrome (for example) to fullscreen mode
  2. try to toggle cerebro
  3. ???
  4. switch to default workspace
  5. cerebro is visible for second

Link within preview uses same window to open url

I was looking at the details of a plugin and clicked on a link within those details and it took over the entire app, making it into a single use browser window (with no navigation). The only way to get back to being able to type in the search bar again is to close the app and reopen it..

I think links within the preview should automatically open in the users default browser so that this doesn't happen.

Problems developing on Windows

Hi!
First of all - congrats on an awesome project!
I wanted to contribute a plugin to support results from Everthing by voidtools (a great file indexer on Windows) and wrote a plugin https://github.com/reflog/cerebro-plugin-everything
But I cannot test it well, since the instructions are very Mac oriented and don't work in Windows land.
Opening dev tools doesn't work, since they are shown like this:
image
And there is no way (that I could find) to see console output from my plugin.

What's your recommended way of debugging on Windows?
Also - how can I mark my plugin as 'windows only' so that other platform users would avoid it?

Create a team in Slack?

Will be nice to have a team in the Slack for discussing and syncs tasks/bug fixes.
Possible some other alternative (Gitter?) to the Slack, but I personally prefer the Slack :)

chrome extension

Is it feasible to package this as a chrome extension?

This would make it possible to run on chromeOS too.

postinstall fails on node v7

> concurrently "node node_modules/fbjs-scripts/node/check-dev-engines.js package.json"

[0]
[0] assert.js:85
[0]   throw new assert.AssertionError({
[0]   ^
[0] AssertionError: Current node version is not supported for development, expected "7.4.0" to satisfy "6.x".
[0]     at Object.<anonymous> (C:\git\cerebro\node_modules\fbjs-scripts\node\check-dev-engines.js:39:3)
[0]     at Module._compile (module.js:571:32)
[0]     at Object.Module._extensions..js (module.js:580:10)
[0]     at Module.load (module.js:488:32)
[0]     at tryModuleLoad (module.js:447:12)
[0]     at Function.Module._load (module.js:439:3)
[0]     at Module.runMain (module.js:605:10)
[0]     at run (bootstrap_node.js:420:7)
[0]     at startup (bootstrap_node.js:139:9)
[0]     at bootstrap_node.js:535:3
[0] node node_modules/fbjs-scripts/node/check-dev-engines.js package.json exited with code 1

could not find machine-id file

Just installed cerebro on Arch Linux and this happened:

cat: /var/lib/dbus/machine-id: No such file or directory
A JavaScript error occurred in the main process
Uncaught Exception:
Error: Command failed: cat /var/lib/dbus/machine-id
cat: /var/lib/dbus/machine-id: No such file or directory

    at checkExecSyncError (child_process.js:495:13)
    at execSync (child_process.js:535:13)
    at childProcess.(anonymous function) (ELECTRON_ASAR.js:685:22)
    at c (/tmp/.mount_wzwsP7/usr/bin/resources/app.asar/main.js:309:7107)
    at Object.<anonymous> (/tmp/.mount_wzwsP7/usr/bin/resources/app.asar/main.js:283:100)
    at __webpack_require__ (/tmp/.mount_wzwsP7/usr/bin/resources/app.asar/main.js:21:30)
    at Object.<anonymous> (/tmp/.mount_wzwsP7/usr/bin/resources/app.asar/main.js:159:20)
    at __webpack_require__ (/tmp/.mount_wzwsP7/usr/bin/resources/app.asar/main.js:21:30)
    at Object.<anonymous> (/tmp/.mount_wzwsP7/usr/bin/resources/app.asar/main.js:52:22)
    at __webpack_require__ (/tmp/.mount_wzwsP7/usr/bin/resources/app.asar/main.js:21:30)

I solved it by creating a sym link to the file that actually was located at /etc/machine-id instead of /var/lib/dbus/machine-id

Design Cerebro logo/icon

We are looking for someone who use Cerebro and interested in improving this app. If you are a designer or you know someone, who can help – let's discuss it here!

Exception Object has been destroyed

Uncaught Exception:
Error: Object has been destroyed
    at Error (native)
    at exports.default.appWindow (/Applications/Cerebro.app/Contents/Resources/app.asar/webpack:/app/main/createWindow/toggleWindow.js:6:17)
    at Function.toggleMainWindow (/Applications/Cerebro.app/Contents/Resources/app.asar/webpack:/app/main/createWindow.js:34:34)

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.