Library / SDK
monix/monix avatar
monix/monix

Monix for Scala: Async Work, Streams, and Effects

Asynchronous, Reactive Programming for Scala and Scala.js.

1,930 stars244 forksScalaApache-2.0

At a glance

What is it?
Monix is a modular Scala and Scala.js library for composing asynchronous programs, reactive streams, and effect-based workflows. It fits teams that need typed, back-pressure-aware abstractions rather than a single streaming API.
Who is it for?
Adopt Monix when the application needs Scala-native asynchronous composition, reactive streams, or Cats Effect integration across JVM and Scala.js. Do not choose it merely for a small callback-based task, and verify first that its module boundaries, Cats Effect version compatibility, and execution model fit the existing build.
Can I use it commercially?
Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 4 days ago.
What is it written in?
Mainly Scala, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on October 23, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • monix/monix1,930 ★ · +0
Star history
Repository2026-10-162026-10-23
monix/monix1.9k1.9k

0 Stars in the last 7 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

What Monix solves in Scala applications

Monix addresses a specific composition problem: Scala applications often need to coordinate delayed computations, cancellable work, event streams, and resource cleanup without hiding those operations behind loosely typed callbacks. The README describes Monix as a library for composing asynchronous, event-based programs in Scala and Scala.js. Its origin was a ReactiveX implementation, but its design also emphasizes functional programming, back-pressure, and compatibility with the Reactive Streams protocol.

The relevant audience is Scala developers working on JVM or Scala.js applications that need more than a future wrapper. A service might start asynchronous tasks, consume a push-based stream, compose sequential or concurrent effects, or return a lazily evaluated result. Monix groups these needs into separate abstractions instead of requiring every application to adopt one universal stream model. That distinction matters because a single request effect, a potentially repeating event source, and a resource that must be released have different failure and cancellation semantics.

Monix is also associated with the Typelevel ecosystem. The README says it includes abstractions for suspending side effects and resource handling, and that it is one of the parents and implementors of Cats Effect. This history explains the presence of `Task`, `Coeval`, and Catnap-based interfaces, but it does not mean every project needs all of those modules. The module layout lets an engineer select the part of the library that matches the code being introduced.

Observable, Iterant, Task, and the execution layer

The project exposes several data types for different asynchronous shapes. `Observable` models reactive, push-based streams with back-pressure. `Iterant` is described as a purely functional, pull-based streaming abstraction. `Task` and `Coeval` cover effect-oriented evaluation, while `IO[E, A]` is listed among the supported data types. The lower-level `monix-execution` module provides `Scheduler`, `Cancelable`, `Atomic`, `Local`, `CancelableFuture`, and `Future`-based abstractions from `monix-catnap`.

This split reflects an important design choice. A push-based stream can represent values arriving over time, while a pull-based `Iterant` makes the consumer drive the next step. `Task` is closer to a description of an asynchronous program that must eventually be run. `Coeval` represents a lazy computation rather than an event stream. The README does not provide a complete operator-by-operator data-flow example, so the exact scheduling behavior of any particular combinator should be checked in the current documentation.

The modules also show where dependencies enter. `monix-reactive` depends on `monix-eval`. `monix-tail` depends on `monix-eval` and uses Cats Effect heavily. `monix-catnap` exposes abstractions built on Cats Effect type classes and depends on `monix-execution`, Cats 1.x, and Cats Effect. The aggregate `monix` module provides all of the listed components. This makes dependency selection an architectural decision rather than merely an import choice.

Installing Monix with sbt and selecting a module

The README gives an sbt library dependency for the stable release. It states that JDK `17` is the minimum and that JDK `21` is validated. The documented compatibility baseline is Scala `2.13.18` and Scala `3.3.7`. The dependency snippet uses a placeholder version marker, so the README does not identify one exact version to copy for a new build.

For an application that needs the complete API, add the aggregate dependency to `build.sbt`:

scala
libraryDependencies += "io.monix" %% "monix" % "x.y.z"

Replace `x.y.z` with the version selected by the project. The README also lists modular dependencies, but it does not show their exact artifact coordinates in the usage section. The documented module names can identify the intended component, while the current Monix documentation or repository `build.sbt` should be checked before adding a narrower dependency.

The README points new users to `monix-jvm-app-template.g8` for a JVM application starting point and `monix-sample` for an example using Monix on both the server and the client. Those links are more useful for a first real use than inventing an API call. The README does not include the contents of either example, so it does not establish which `Task`, `Observable`, or scheduler operations a beginner should call first.

Monix states that it runs on both the JVM and Scala.js. That does not mean every module has identical deployment requirements. The module graph and the sample projects should be checked before assuming that a JVM dependency line is sufficient for a browser-targeted Scala.js build.

Back-pressure, Reactive Streams, and Cats Effect boundaries

Monix's strongest documented boundary is between reactive streaming and effect execution. `Observable` is explicitly described as push-based and back-pressure-aware. This is a different contract from a pull-based `Iterant`, which is built for purely functional streaming. A consumer that cannot process values as quickly as they arrive therefore needs to be evaluated against the stream implementation that actually matches its protocol, not against a generic promise of asynchronous behavior.

The README says that Monix is compatible out of the box with the Reactive Streams protocol. That is meaningful interoperability information for Scala applications that need to connect stream abstractions, but the README does not document adapters, interoperability tests, or exact cancellation behavior for third-party publishers. Those details are absent and should not be inferred.

Cats Effect appears in two places. `monix-catnap` provides pure abstractions on top of Cats Effect type classes, while `monix-tail` uses Cats Effect heavily. The stable dependency line is described as compatible with Cats and Cats Effect `2.x`. That statement does not establish compatibility with every Cats Effect release. A project already using Cats Effect must check the baseline before mixing the modules.

The practical consequence is that Monix can serve both effect-oriented and stream-oriented code, but a team must choose the abstraction deliberately. Starting with `Task` for a one-shot effect and later replacing it with `Observable` changes the model's repetition, cancellation, and demand behavior.

Where Monix is the wrong tool

Monix is a poor fit for a small Scala program that only needs to call one asynchronous library and return its result. Adding `Task`, schedulers, cancellation abstractions, and Cats Effect compatibility can introduce more type vocabulary than the application requires. The README does not claim that Monix is suitable for every Scala project, and its modular design exposes that choice.

It is also a questionable fit when the required stream protocol does not match the available abstraction. The README describes `Observable` as push-based with back-pressure and `Iterant` as pull-based. If an application requires a different execution model that the README does not document, the current API documentation must be checked before adoption. The README does not state latency, throughput, memory-use, or scheduler-selection guarantees, so performance claims cannot serve as the basis for a decision.

The stable dependency is also tied to a compatibility statement involving Cats Effect `2.x`. Teams committed to another version line should not assume that Monix's Cats-based modules are interchangeable. The README also does not describe migration steps or rollback procedures for changing major versions. Those omissions are decision boundaries, not evidence that migration is impossible.

Maintenance, releases, and license implications

The repository is not archived. Its last push was on 2026-10-12, and the release history includes `v3.5.2` on 2026-10-08, `v3.5.1` on 2026-10-07, and `v3.5.0` on 2026-08-23. Those dates show recent repository and release activity. They do not by themselves establish API stability, long-term support, or compatibility with every future library release.

The README requires contributions to use the Apache License, Version 2.0, and the repository contains `LICENSE.txt`. All code in the repository is identified as licensed under that license. This is a relevant procurement and redistribution fact, but it does not replace reviewing dependency licenses in a particular build. Monix's relationship with Cats, Cats Effect, and other libraries means an application's final dependency set should be checked separately.

Maintenance work is visible in the repository layout. The project includes `CHANGES.md`, `CONTRIBUTING.md`, `REPO_HOWTO.md`, a `benchmarks` directory, `reactiveTests`, `tracingTests`, and a `Makefile`. The Makefile's aggregate check target runs `./sbt ci-all`, while its dependency update target runs an sbt dependency report workflow. The README does not define a supported upgrade cadence or compatibility policy for every minor release, so an adopter must inspect `CHANGES.md` and dependency changes when moving between versions.

A practical path through the Monix modules

For a JVM application, the README's shortest documented path is to use `monix-jvm-app-template.g8` or inspect `monix-sample`. For an application that already has a Cats Effect stack, the relevant starting point is `monix-catnap`, after checking Cats Effect `2.x` compatibility. For pull-based functional streaming, the documented component is `monix-tail`. For push-based reactive streams with back-pressure, it is `monix-reactive`, which depends on `monix-eval`.

The aggregate dependency is easier for an initial prototype because it exposes all components, but it can also pull in more of the library than the application uses. The README explicitly calls Monix modular, so production build design should start with the required data type and its dependency path. The README does not list the complete coordinates for narrower modules, so they must be obtained from the current Monix usage documentation or repository build definition.

Monix publishes current documentation, separate 3.x documentation, older 2.x documentation, presentations, and API documentation. The repository also contains `AGENTS.md` and Scala formatting configuration, but the README does not describe their operational instructions. The first verification should therefore be mechanical: compare the selected module against the project's Cats Effect version, confirm JDK and Scala compatibility, and inspect the current examples for the intended JVM or Scala.js target.

Editorial conclusion

Adopt Monix when the application needs Scala-native asynchronous composition, reactive streams, or Cats Effect integration across JVM and Scala.js. Do not choose it merely for a small callback-based task, and verify first that its module boundaries, Cats Effect version compatibility, and execution model fit the existing build. For the stable release, the README documents the `io.monix %% monix` dependency.

Frequently asked questions

What is Monix used for in Scala?

Monix is used to compose asynchronous and event-based programs in Scala and Scala.js. The README describes support for `Observable`, `Iterant`, `Task`, `Coeval`, `IO[E, A]`, cancellation, execution, and resource handling.

How do I add Monix to an sbt project?

The README documents `libraryDependencies += "io.monix" %% "monix" % "x.y.z"`. It also lists modular components such as `monix-execution`, `monix-catnap`, `monix-eval`, `monix-reactive`, and `monix-tail`, but the usage section does not show their complete dependency coordinates.

Does Monix work with Cats Effect and Scala.js?

The README says that `monix-catnap` builds on Cats Effect type classes, `monix-tail` makes heavy use of Cats Effect, and Monix runs on both the JVM and Scala.js. The stable release is described as compatible with Cats and Cats Effect `2.x`, so version compatibility should be checked before adding a module.

Official sources

  1. License: Apache-2.0
  2. monix/monix on GitHub
  3. Project website
  4. README
  5. Releases
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/monix-monix.svg)](https://hysenlabs.com/projects/monix-monix)

Star history chart for your README

markdown
[![Star history](https://hysenlabs.com/chart/monix-monix.svg)](https://hysenlabs.com/projects/monix-monix)

Was this useful?