Command line interface for Re:infer

re is the official command line interface for Linux (x86_64-unknown-linux-musl)

Command line interface for Re:infer

API Documentation | Website

re is the official command line interface for Re:infer. It simplifies managing resources, such as sources and datasets, as well as importing or exporting communications data. Additionally, re maintains multiple contexts, making it easy to switch between multiple authentication tokens for different users (and endpoints for multiple clusters if needed).

API Library

The api directory contains a Rust client library for reinfer which can be used for API access independently. Please refer to that directory for more information. The rest of the README is about the command line tool for managing reinfer resources.


  • Create, get, update and delete operations for sources, datasets, comments and more.
  • Context management for multiple endpoints (reinfer clusters) and user tokens.
  • Upload new verbatims to a source.
  • Easily download raw verbatims from a set of sources and datasets together with human applied annotations. Useful for backups, migrating data or for applying some transformations to the data.
  • Basic shell autocompletion for zsh and bash.
  • Colorized terminal output and progress bars.




Statically linked binaries with no dependencies are provided for selected platforms:

  • Linux (x86_64-unknown-linux-musl)
  • macOS (x86_64-apple-darwin)
  • Windows (x86_64-pc-windows-gnu)

Debian / Ubuntu

You can download a .deb package here.

From Source

To build from source, you need a recent version of the Rust toolchain installed.

Using cargo install

To install using cargo install run the following.

Ensure you have the cargo bin directory in your path (typically ~/.cargo/bin).


Build it the usual way using cargo

The binary is located at ../target/release/re. Move it somewhere suitable, e.g.

Getting Started

Check the installation and see a full listing of the available commands by running re with no arguments.


Per Session

The simplest way to authenticate is to specify the API token for every command. By default re will prompt you to enter it interactively. E.g. to list the available datasets

The token can also be specified using --token

This is not generally a good idea (e.g. it'll be stored in your shell history). Better to store in a environment variable.

Even better to use contexts, see further below.

Different Clusters

By default, the endpoint for all commands is This can be overidden using --endpoint, e.g.

Contexts (stateful authentication)

Contexts help avoid having to manually specify the token and endpoint with every command. A context is composed of

  • The authentication token (which user?)
  • The Re:infer cluster endpoint to talk to, typically
  • (Optional) An HTTP proxy to use for all requests
  • A memorable name which serves as an identifier for the "context"

Commands for managing contexts are under re config and allow one to create, update, set and delete contexts. Run re config -h to see all the options.

When creating the very first context, this will be set as the active one

The current context will be used for all subsequent commands.

Any of the context settings can be overwritten as a one off using global flags such as --token, --endpoint and --proxy.

Adding a context with a name that already exists will allow you to update any of the saved settings.

Uploading Comments



This project is licensed under Apache License, Version 2.0 (LICENSE or


Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the reinfer-cli or reinfer-client crate, as defined in the Apache-2.0 license, shall be licensed as above, without any additional terms or conditions.


Collection of the latest Issues



Comment Icon2

Calling re config get-token always returns the default token, regardless of --context or -c flags being passed.

Confirmed that the --context parameter works for other commands and that the token is indeed different in the config.json. So it seems only the get-token command fails.

Package version 0.11.0


Find the latest versions by id

v0.12.0 - Jul 06, 2022


  • Display project ids when listing projects
  • Add support for getting or deleting a single user
  • Upgrade all dependencies to their latest released version
  • Enable retry logic for uploading annotations

v0.11.0 - Mar 07, 2022


  • Renames organisation -> project throughout, including in the CLI command line arguments for consistency with the new API
  • re create dataset will default to sentiment disabled if --has-sentiment is not provided.
  • Changed --source-type parameter to --kind.


  • re create trigger-exception to tag a comment exception within a trigger.

Bug Fixes

  • Fix serialization of sources after api change of internal parameter _kind.

v0.10.2 - Dec 09, 2021


Bug Fixes

  • Fixes serialization issue where statistics expected usize not f64

v0.10.1 - Dec 02, 2021



  • Add an optional --source-type parameter to create source. Only for internal use.

v0.10.0 - Nov 23, 2021



  • New re create annotations command for uploading annotations (labels and entities) to existing comments in a dataset, without having to use re create comments. This avoids potentially - and unknowingly - modifying the underlying comments in the source.
  • Add support to --force delete projects with existing resources.
  • Print comment uid when a comment upload fails due to bad annotations.

Bug Fixes

  • Failure when uploading comments with thread properties

v0.9.0 - Oct 13, 2021



  • Added support for new labellings api. Old jsonl files can still be uploaded with re but newly downloaded jsonl files will be in the new format.


  • Deserialize thread properties when downloading comments for a dataset (the -d dataset option for re get comments). This limitation exists as only the /labellings API route returns thread properties.
  • Added re config get-token [context] which dumps the auth token for the current or a different, given context.
  • Added CRUD commands for projects.
  • Added option for --label-groups in re create dataset.

v0.8.0 - Jul 23, 2021



  • All API resources with floats now use ordered_float::NotNan
  • A new top level flag -o/--output has been added. This replaces all previous -o/--output flags in the re get * subcommands.
  • The EntityDefs wrapper has been removed in favour of Vec<EntityDef>. This impacts the NewDataset and Dataset structs
  • EntityDef has added fields to accurately reflect the api return type
  • Added metadata field to the Label struct


  • More public types implement Serialize, Eq and Hash for downstream use.


  • get comment: get a single comment by source and id
  • Created or updated resources will be returned via stdout. The format of the output can be changed with the global -o/--output flag.
    • This excludes creation of the comments and emails resources.
  • Added entity_defs and label_defs to the reinfer_api::Dataset struct, and create dataset command
  • Added LabelDef, NewLabelDef, NewEntity and associated structs

v0.7.0 - Jun 17, 2021



  • NewDataset's entity_defs field is now an Option for consistency


  • When uploading annotated comments, empty lists of assigned / dismissed labels are serialized in the request. Previously empty lists were skipped which meant it was not possible to remove labellings (N.B. the API distinguishes between missing field -- labellings are unmodified -- or and empty list -- labellings are removed).
  • All *Id types now implement Hash, PartialEq, and Eq
  • NewDataset and NewSource now implement Default


  • update source: update an existing source
  • update dataset: update an existing dataset

v0.6.0 - May 06, 2021



  • The create bucket flag --transform-tag is now required.


  • delete bulk: slight performance optimisations.
  • create dataset: Accept an optional --model-family and --copy-annotations-from for the new dataset.

v0.5.3 - Mar 09, 2021

  • delete bulk: For deleting multiple comments by source id. When run with --include-annotated=false, skips annotated comments. When run with --include-annotated=true, deletes all comments.

v0.5.2 - Mar 04, 2021

  • Add support for using an HTTP proxy for all requests. The proxy configuration is saved as part of the context. Additionally, the proxy can be overridden / specified as a one off using a global command line argument --proxy https://proxy.example (e.g. similar to --endpoint).

v0.5.1 - Feb 18, 2021

v0.5.0 - Feb 17, 2021

Breaking Changes

The -e flag used to pass in entity kinds at dataset creation has been re-purposed. One now needs to pass in a json object containing the corresponding EntityDef to be added to the new dataset. Example:

v0.4.1 - Sep 07, 2020

Information - Updated Jul 31, 2022

Stars: 12
Forks: 1
Issues: 2

Repositories & Extras

rust-clipboard is a cross-platform library for getting and setting the contents of the OS-level clipboard

It has been tested on Windows, Mac OSX, GNU/Linux, and FreeBSD

rust-clipboard is a cross-platform library for getting and setting the contents of the OS-level clipboard

EventStoreDB Rust Client

EventStoreDB rust gRPC gRPC Client

EventStoreDB Rust Client

Rust CLI template

A quick and dirty CLI boilerplate template for Rust

Rust CLI template

Rust CLI Template

Template for creating Rust-based CLI tools

Rust CLI Template

Pure Rust client for YubiHSM 2 devices from Yubico

YubiHSM 2 devices from Documentation

Pure Rust client for YubiHSM 2 devices from Yubico

Parsec Rust Client

When using the JWT-SVID authentication method, the client will expect the SPIFFE_ENDPOINT_SOCKET environment variable to contain the path of the Workload API endpoint

Parsec Rust Client

A Rust client for connecting to OmniSciDB via its RPC protocol of Thrift

OmniSciDB via its RPC protocol of Cargo, using cargo build

A Rust client for connecting to OmniSciDB via its RPC protocol of Thrift

Cardano Rust CLI


Cardano Rust CLI

Godot Rust CLI is an easy to incorporate Rust modules into your Godot project

Also keep in mind that the main branch will usually be ahead of the version on GitHub repo

Godot Rust CLI is an easy to incorporate Rust modules into your Godot project

Rust client implementation for Brasil API

Rust client implementation for BrasilAPI GitHub Project

Rust client implementation for Brasil API

Rust client for TDlib

Library allows you to interact with Telegram Database library

Rust client for TDlib
Facebook Instagram Twitter GitHub Dribbble