Skip to content
Permalink
Browse files

Update README.md (#128)

This commit updates Bento's README.md to clarify installation, value propositions, and behavior.
  • Loading branch information
dlukeomalley committed Oct 25, 2019
1 parent 959cc82 commit de84bc44a5dbd24813380229fc166476b9591e5e
Showing with 80 additions and 96 deletions.
  1. +80 −96 README.md
  2. BIN bento-demo.gif
176 README.md
@@ -1,117 +1,101 @@
# Bento
Bento automatically tailors linters and static analysis with sane defaults on a per-project basis, letting you focus on writing code rather than configuring tools. Bento is free, fully-featured, and you can run Bento on as many projects as you like.
<h1 align="center" style="margin-top:0;">
Bento
</h1>
<br/>
<h3 align="center">
Free program analysis focused on bugs that matter to you.
</h3>
<p align="center">
Install, configure, and adopt Bento in seconds. Runs 100% locally.
</p>
<p align="center">
<a href="https://pypi.org/project/bento-cli/">
<img alt="PyPI" src="https://img.shields.io/pypi/v/bento-cli?style=flat-square&color=blue">
</a>
<a href="https://pypi.org/project/bento-cli/">
<img alt="PyPI - Downloads" src="https://img.shields.io/pypi/dm/bento-cli?style=flat-square&color=green">
</a>
<a href="https://github.com/returntocorp/bento/issues/new/choose">
<img src="https://img.shields.io/badge/issues-welcome-green?style=flat-square" alt="Issues welcome!" />
</a>
<a href="https://join.slack.com/t/r2c-community/shared_invite/enQtNjU0NDYzMjAwODY4LWE3NTg1MGNhYTAwMzk5ZGRhMjQ2MzVhNGJiZjI1ZWQ0NjQ2YWI4ZGY3OGViMGJjNzA4ODQ3MjEzOWExNjZlNTA">
<img src="https://img.shields.io/badge/chat-on%20slack-blue?style=flat-square">
</a>
<a href="https://twitter.com/intent/follow?screen_name=r2cdev">
<img src="https://img.shields.io/twitter/follow/r2cdev?label=Follow%20r2cdev&style=social&color=blue" alt="Follow @r2cdev" />
</a>
</p>
<br>
<br>

Bento is a free and opinionated toolkit for gradually adopting linters[¹](https://en.wikipedia.org/wiki/Lint_(software)) and program analysis[²](https://en.wikipedia.org/wiki/Program_analysis) in your codebase. Be the bug-squashing advocate your team needs but (maybe) doesn’t deserve.

- **Find bugs that matter.** Bento automatically enables and configures relevant analysis based on your dependencies and frameworks, and it will never report style-related issues. You won’t painstakingly configure your tooling.
- **Get started immediately.** Bento doesn’t force you to fix all your preexisting issues today. Instead, you can archive them and address them incrementally when it makes sense for your project.
- **Go fast.** Bento installs in 5 seconds and self-configures in less than 30. Its tools check your code in parallel, not sequentially.

Bento includes checks written by [r2c](https://r2c.dev/) and curated from [Bandit](https://pypi.org/project/bandit/), [ESLint](https://eslint.org/), [Flake8](https://pypi.org/project/flake8/), and their plugins. It runs on your local machine and never sends your code anywhere or to anyone.

<p align="center">
<img src="bento-demo.gif" width="90%" alt="gif demonstrating Bento running in a terminal"/>
</p>

## Installation

### Requirements

Bento is supported on macOS Mojave (10.14) and Ubuntu 18.04+, and requires Python 3.6 or later, and pip3.

Bento supports npm-packaged JavaScript and Python, and is ideal for monorepos.

To run Bento on projects that include JavaScript, Node.js is required and the following versions are supported:

* Node.js 8 (8.10.0 and above)
* Node.js 10 (10.13.0 and above)
* Anything above Node.js 11.10.1

### Installing Bento
Bento is a command-line tool that is simple to install:

```bash
pip3 install bento-cli
```

## Usage
The workflow for Bento is:

1. Initialize Bento
2. Run Bento checks on your source code
3. Fix issues or archive unnecessary warning and errors
4. Disable undesired checks
5. Add Bento to git pre-commit hooks
6. Add Bento to the CI pipeline (e.g., CircleCI)

### Initialize Bento for a project:

In your project directory, run:

```bash
bento init
```shell
$ pip3 install bento-cli
```

and add some of the artifacts bento produces to your .gitignore file:

```bash
printf "# Bento tools:\n.bento/" >> .gitignore
```
Bento is for JavaScript, TypeScript, and Python projects. It requires Python 3.6+ and works on macOS Mojave (10.14) and Ubuntu 18.04+.

### Analyze your source code
To trigger Bento to analyze your project, run:
## Usage
To get started right away with sensible defaults:

```bash
bento check
```shell
$ bento init && bento check
```

### Archive outstanding issues

The `archive` command whitelists outstanding issues to fix later. This lets you continue coding with a clean slate without having to address all your tech debt as soon as you adopt a new tool. New issues introduced from this point forward will be reported by Bento until the next time you run the `archive` command.
To set aside preexisting results so you only see issues in new code:

Archive issues by running:

```bash
bento archive
```shell
$ bento archive
```

### Disable and enable individual checks
Enable/disable a specific check by running:
Bento really sings when you run it automatically in your editor, as a commit hook (`bento install-hook`), or in CI.

```
bento enable [OPTIONS] TOOL CHECK
```
or
```
bento disable [OPTIONS] TOOL CHECK
```
where:
## Command Line Options
```shell
$ bento --help
* `TOOL` refers to the tool that includes the check, for example, `r2c.eslint`
* `CHECK` refers to the label for the check you want to enable, for example `no-console`
Usage: bento [OPTIONS] COMMAND [ARGS]...
Example:
Options:
--version Show current Bento version.
--agree Automatically agree to terms of service.
--help Show this message and exit.
Commands:
archive Adds all current findings to the whitelist.
check Checks for new findings.
disable Disables a check.
enable Enables a check.
init Autodetects and installs tools.
install-hook Installs Bento as a git pre-commit hook.
```
bento enable r2c.eslint no-console
```
You can find the tool and check names in the output of `bento check`. Bento currently supports the following tools:

| Language | Supported Tools |
|------------|-----------------|
| Python | Bandit, Flake8 |
| JavaScript | ESLint |

If there are tools you'd like us to add, please let us know by creating an issue.
## Help and Community
- Need help or want to share feedback? Reach out to us at [support@r2c.dev](mailto:support@r2c.dev). We’d love to hear from you! 💌
- Join #bento in our [community Slack](https://join.slack.com/t/r2c-community/shared_invite/enQtNjU0NDYzMjAwODY4LWE3NTg1MGNhYTAwMzk5ZGRhMjQ2MzVhNGJiZjI1ZWQ0NjQ2YWI4ZGY3OGViMGJjNzA4ODQ3MjEzOWExNjZlNTA) for support, to talk with other users, and share feedback. 🤝
- We’re fortunate to benefit from the contributions of the open source community and great projects such as [Bandit](https://pypi.org/project/bandit/), [ESLint](https://eslint.org/), [Flake8](https://pypi.org/project/flake8/), and their plugins. 🙏

### Install Bento as a pre-commit hook
Bento can install itself as a pre-commit hook, so it runs before each commit and blocks on failures.

To install bento as a pre-commit hook, simply run:
```bash
bento install-hook
```

## Demo
Here’s a short preview of Bento in action:

![Bento demo](bento-demo.gif)

## Community
Join the Bento channel in our [community Slack](https://join.slack.com/t/r2c-community/shared_invite/enQtNjU0NDYzMjAwODY4LWE3NTg1MGNhYTAwMzk5ZGRhMjQ2MzVhNGJiZjI1ZWQ0NjQ2YWI4ZGY3OGViMGJjNzA4ODQ3MjEzOWExNjZlNTA) to receive and give support, talk with other users, and share things about Bento. The r2c team is there and ready to help!

## Terms of service and privacy
## License and Legal
Please refer to the [terms and privacy document](https://github.com/returntocorp/bento/blob/master/PRIVACY.md).

## License
Copyright (c) [r2c](https://r2c.dev ).

![r2c logo](https://r2c.dev/r2c-logo-silhouette.png?gh)
</br>
</br>
<p align="center">
<img src="https://r2c.dev/r2c-logo-silhouette.png?gh" height="24" alt="r2c logo"/>
</p>
<p align="center">
Copyright (c) <a href="https://r2c.dev">r2c</a>.
</p>
BIN -1020 KB (67%) bento-demo.gif
Binary file not shown.

0 comments on commit de84bc4

Please sign in to comment.
You can’t perform that action at this time.