Self-hosted service
alibaba/pipcook avatar
alibaba/pipcook

Pipcook: training and serving models from a JavaScript pipeline

Machine learning platform for Web developers

2,595 stars211 forksTypeScriptApache-2.0

At a glance

What is it?
Pipcook is Alibaba's TypeScript framework that turns machine learning pipelines into npm packages a web engineer can run from the CLI. It is genuinely useful for image classification demos, and the last push was on 2026-09-10, but the newest tagged release is still v1.3.0 from 2020.
Who is it for?
Pipcook fits JavaScript engineers who want to train and serve a model without leaving the Node.js toolchain, and it is a poor fit for anyone who needs a maintained release line or production serving guarantees, since the newest tagged release is v1.3.0 from 2020.
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 1 day ago.
What is it written in?
Mainly TypeScript, according to GitHub's language statistics.

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

Editorial analysis

The gap Pipcook is aimed at: web engineers who need a model, not a research stack

The README states the mission plainly: enabling JavaScript engineers to use machine learning "without any prerequisites." The intended audience is listed as web engineers who want to learn what machine learning is, train and serve their own models, or improve an existing model's evaluation results, with higher image classification accuracy given as the example. That framing matters because the project does not try to compete with notebook-driven workflows. It targets the person who already knows npm, TypeScript and a build pipeline, and who would rather not learn a second language's packaging system to get a classifier running.

The subprojects are split along that line. Pipcook Pipeline models an ML pipeline as a sequence of scripts and outputs an npm package containing the trained model plus JavaScript functions that call it. Pipcook Bridge to Python covers the other half of the problem: the README admits that JavaScript lacks a mature machine learning toolset, and points at Boa, which bridges CPython through N-API so that numpy, scikit-learn, jieba or tensorflow can be called from the Node.js runtime through JavaScript. Read together, the two pieces describe a deliberate position: keep the orchestration and the serving layer in JavaScript, and borrow Python only where the ecosystem has no equivalent.

How a Pipcook pipeline is structured, and why the last stage is fixed

A pipeline is a set of scripts plus a configuration, and the README is explicit about the contract: each pipeline has exactly one role, producing the trained model, and the last stage must be the output of that model or the pipeline is invalid. That constraint is what lets the CLI treat a pipeline as a build artifact. The output is an npm package, so the deliverable of training is something a JavaScript project can depend on rather than a loose checkpoint file.

The plugin mechanism is where the modularity claim comes from. Dataset, training, validation and deployment are described as pluggable stages, and the README says most modules can be swapped for different implementations. The repository layout backs this up: packages/ holds the workspace members, example/pipelines/ holds the pipeline definitions referenced by the quick start, and lerna.json plus the workspaces field in package.json show the monorepo structure. The trade-off is that a pipeline is only as good as the scripts it names, and the configuration is a JSON document pointing at remote URLs, which means a pipeline definition can break independently of the framework version you installed.

Installing @pipcook/cli and running a first training job

The setup section lists two prerequisites: Node.js at version 12.17 or later, or 14.0.0 or later, and npm at 6.14.4 or later. The CLI is installed globally from npm under the scoped name @pipcook/cli.

bash
npm install -g @pipcook/cli

The README's example trains an image classification model by pointing the CLI at a pipeline JSON hosted on jsDelivr, with -o setting the output directory. Note that the URL is pinned to the main branch, not to a release tag.

bash
pipcook train https://cdn.jsdelivr.net/gh/alibaba/pipcook@main/example/pipelines/image-classification-mobilenet.json -o ./output

The dataset in that pipeline contains two categories, avatar and blurBackground. Prediction takes the pipeline file from the output directory and a single image path via -s. The README shows the result for an image taken from the validation set, a blurBackground photo, with a score above 0.999.

bash
pipcook predict ./output/image-classification-mobilenet.json -s ./output/data/validation/blurBackground/71197_223__30.7_36.jpg

Serving is a third subcommand that takes the output directory. The README's sample output ends with the server listening on port 9091, so the browser step is just opening that address.

bash
pipcook serve ./output

The release cadence is the real limitation, not the API

The repository is not archived and the last push was on 2026-09-10, so commits are still landing. The release history tells a different story. The newest tag is v1.3.0, published on 2020-12-19, preceded by v1.2.0 in September 2020 and v1.1.2 in August 2020. Nothing has been tagged in the years since. That gap is the single most important fact for anyone evaluating Pipcook, because the quick start instructs you to install @pipcook/cli from npm and pull a pipeline from a branch URL. The CLI you get is whatever was last published, while the pipeline JSON is whatever main contains today. Those two can drift apart with no release to mark the change.

There is a second boundary worth stating. The README describes the audience as web engineers learning or experimenting, and the showcase examples are image classification, MNIST digits and imgcook databinding images. Nothing in the documented scope describes distributed training, GPU scheduling, model registries or the operational surface you would expect from a serving platform. The serve command starts a local server on port 9091 for trying a model in a browser. Treating that as a production deployment path would be reading a capability into the project that the documentation does not claim. If your requirement is a stable, versioned training framework with a support window, Pipcook's own release list is the reason to look elsewhere.

Compared with writing the training script in Python directly

The obvious alternative is to skip the JavaScript layer and write the training job in Python with the libraries Pipcook itself reaches for. That approach gives you the full ecosystem directly, without the N-API bridge, and it keeps you on the release cadence of those libraries rather than on Pipcook's. The cost is that the trained model then has to cross back into your JavaScript application by some other route, and the pipeline definition, dataset handling and serving code become your own glue.

Pipcook's difference is that it makes the glue the product. The pipeline is a JSON file, the stages are plugins, and the output is an npm package, so the boundary between training and the web application is a package boundary. That is a real advantage for a front-end team that wants the model to arrive the same way every other dependency does. It is a disadvantage if your training work is exploratory, because you are expressing experiments in a configuration format designed for repeatable pipelines, and the framework's plugin set is whatever the repository ships.

Licence and the cost of staying current

Pipcook is published under Apache-2.0, which permits commercial use and modification, and the LICENSE file sits at the repository root. The framework is distributed as npm packages under the @pipcook scope, so the usual dependency obligations apply to whatever your build pulls in, and Apache-2.0 includes a patent grant and requires attribution and notice retention. That is a description of the licence text, not legal advice; if you are redistributing a trained artifact or a modified framework, have counsel read the terms rather than this paragraph.

The upgrade cost is the part that deserves attention before you commit. Because no release has been tagged since v1.3.0 in December 2020 while commits continue, there is no changelog entry to tell you what changed between the CLI on npm and the pipeline definitions on main. Upgrading means diffing the repository yourself. The repository does provide the machinery for building from source: package.json defines a build script that runs lerna run compile, a test script that runs lerna run test, and Docker build scripts for both a CPU image and a default image under docker/. Building from a specific commit is therefore possible, and it is the only way to pin framework and pipeline together.

What Pipboard adds, and where it stops

Pipboard is the hosted view into training runs. The README sends you to https://pipboard.imgcook.com and describes it as the place to check training logs and models, with an MNIST showcase on the home page to try. It is a convenience layer over the same pipelines, not a separate product, and the documentation does not describe self-hosting it. If your team cannot send training metadata to an external host, that removes the log-viewing story and leaves you reading CLI output and files under the output directory. The README is silent on what Pipboard retains or how long, so that question has to be answered by the project maintainers rather than inferred from the documentation.

Editorial conclusion

Pipcook fits JavaScript engineers who want to train and serve a model without leaving the Node.js toolchain, and it is a poor fit for anyone who needs a maintained release line or production serving guarantees, since the newest tagged release is v1.3.0 from 2020. Before adopting it, run the CLI quick start against the image-classification-mobilenet pipeline, then check whether the example pipelines you depend on still resolve from the jsDelivr URL pinned to main, because that URL follows the branch rather than a release tag.

Frequently asked questions

What is Pipcook from Alibaba?

It is a JavaScript application framework for machine learning and its engineering, published by Alibaba under Apache-2.0. The README describes it as aimed at web engineers who want to learn machine learning, train and serve their own models, or improve model evaluation results.

How do I install the Pipcook CLI?

Install it globally from npm with npm install -g @pipcook/cli, after making sure Node.js is at 12.17 or later (or 14.0.0 or later) and npm is at 6.14.4 or later, as the setup table lists.

What does a Pipcook pipeline output?

According to the README, a pipeline outputs an npm package containing the trained model and JavaScript functions that can be used directly. The last stage of a pipeline must produce the trained model, or the pipeline is considered invalid.

Does Pipcook run Python libraries from JavaScript?

Yes, through a module called Boa, which the README says provides access to Python packages by bridging CPython using N-API. That lets code running in Node.js use packages such as numpy, scikit-learn, jieba or tensorflow.

Which port does pipcook serve use?

The README's sample output for pipcook serve ./output ends with the message that Pipcook has served at http://localhost:9091, and directs you to open the browser and try the image classification server.

Official sources

  1. alibaba/pipcook on GitHub
  2. License: Apache-2.0
  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/alibaba-pipcook.svg)](https://hysenlabs.com/projects/alibaba-pipcook)