Metadata-Version: 2.1
Name: r2c-cli
Version: 0.0.20a1
Summary: A CLI for R2C
Home-page: https://ret2.co
Author: R2C
Author-email: cli@ret2.co
License: Proprietary
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: License :: Other/Proprietary License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.6
Description-Content-Type: text/markdown
Requires-Dist: r2c-lib (==0.0.15a1)
Requires-Dist: attrs (==19.1.0)
Requires-Dist: certifi (==2019.3.9)
Requires-Dist: chardet (==3.0.4)
Requires-Dist: click (==7.0)
Requires-Dist: docker-pycreds (==0.4.0)
Requires-Dist: docker (==3.7.0)
Requires-Dist: gitdb2 (==2.0.5)
Requires-Dist: gitpython (==2.1.11)
Requires-Dist: idna (==2.8)
Requires-Dist: importlib-resources (==1.0.2)
Requires-Dist: jsondiff (==1.1.2)
Requires-Dist: jsonschema (==3.0.1)
Requires-Dist: mypy-extensions (==0.4.1)
Requires-Dist: pyrsistent (==0.14.11)
Requires-Dist: requests (==2.21.0)
Requires-Dist: semantic-version (==2.6.0)
Requires-Dist: six (==1.12.0)
Requires-Dist: smmap2 (==2.0.5)
Requires-Dist: toposort (==1.5)
Requires-Dist: urllib3 (==1.24.3)
Requires-Dist: websocket-client (==0.55.0)

# r2c-cli

This is the CLI for interacting with the R2C platform.

## Installation

### Prerequisites

- [Install Docker](https://docs.docker.com/install/) for your platform
- [Python 3.7 and up](https://www.python.org/about/gettingstarted/) for your platform

### Setup

- Install r2c-cli via `pip`:

  ```
  pip3 install r2c-cli
  ```

- Run `r2c` to check that the CLI was installed properly. If installed properly, you should see our help text.

## Documentation

See [docs.r2c.dev](https://docs.r2c.dev) for details on how write analyzer using `r2c-cli`.

## Usage

```bash
r2c <command> [options]
```

You can also run `r2c --help` or just `r2c` to see usage information.

For help with a command in particular, you can run `r2c <command> --help` and see help specifically for that command.

For the commands `run` `test` `push` and `unittest` they will require that you run them in an analyzer directory (i.e. a directory containing an `analyzer.json` and associated files).

## Unit Testing

Instructions to run unittests are defined `src/unittest.sh`. Make sure to add `mocha test` or `npm test` to enable
unittesting for your analyzer.

## Integration Testing

Integration tests should be defined in the `src/examples` directory.
Integration test on a github REPO@COMMIT could be defined as

```json
{
  "target": "{REPO}",
  "target_hash": "{COMMIT}",
  "expected": []
}
```

## Uploading new analyzer

Once you are done developing and testing your analyzer locally, you must update `version` in your
`analyzer.json` and run

```bash
r2c push
```

to upload your analyzer to your repository.

## Troubleshooting

- If you run into issues running `r2c` commands, you can run with `--verbose` flag and reach out to `support@ret2.co` with the error log.


