{"id":13807378,"url":"https://github.com/scramjetorg/transform-hub","last_synced_at":"2026-03-14T09:35:05.525Z","repository":{"id":36964393,"uuid":"381708833","full_name":"scramjetorg/transform-hub","owner":"scramjetorg","description":"Scramjet Transform Hub (STH) is a runtime supervisor that can run data processing programs called Sequences and manage local resources on any Linux server, Docker on small edge servers, and even large-scale Kubernetes clusters in the cloud or datacenters. It connects to Scramjet Spaces in Scramjet Cloud Platform.","archived":false,"fork":false,"pushed_at":"2025-01-13T08:54:01.000Z","size":17693,"stargazers_count":68,"open_issues_count":69,"forks_count":8,"subscribers_count":11,"default_branch":"devel","last_synced_at":"2025-03-28T16:07:42.030Z","etag":null,"topics":["containers","data-acquisition","docker","kubernetes","kubernetes-deployment","nodejs","python","python3","real-time","runtime-supervisor","stream-processing","streaming","transform-as-a-service"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/scramjetorg.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":"FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"scramjetorg"}},"created_at":"2021-06-30T13:18:50.000Z","updated_at":"2025-02-20T17:32:36.000Z","dependencies_parsed_at":"2023-10-02T13:01:22.115Z","dependency_job_id":"39b1874a-b605-4fd0-8eda-a5460e5cb099","html_url":"https://github.com/scramjetorg/transform-hub","commit_stats":{"total_commits":3185,"total_committers":46,"mean_commits":69.23913043478261,"dds":0.7723704866562009,"last_synced_commit":"9fbfef249c03c31a0183549852aa0b381cfb3e11"},"previous_names":[],"tags_count":93,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scramjetorg%2Ftransform-hub","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scramjetorg%2Ftransform-hub/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scramjetorg%2Ftransform-hub/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scramjetorg%2Ftransform-hub/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/scramjetorg","download_url":"https://codeload.github.com/scramjetorg/transform-hub/tar.gz/refs/heads/devel","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247217174,"owners_count":20903008,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["containers","data-acquisition","docker","kubernetes","kubernetes-deployment","nodejs","python","python3","real-time","runtime-supervisor","stream-processing","streaming","transform-as-a-service"],"created_at":"2024-08-04T01:01:24.827Z","updated_at":"2026-03-14T09:35:00.487Z","avatar_url":"https://github.com/scramjetorg.png","language":"TypeScript","funding_links":["https://github.com/sponsors/scramjetorg","https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick\u0026hosted_button_id=7F7V65C43EBMW"],"categories":["Table of Contents","TypeScript"],"sub_categories":["Streaming Engine"],"readme":"\u003ch1 align=\"center\"\u003e\u003cstrong\u003eScramjet Transform Hub\u003c/strong\u003e\u003c/h1\u003e\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://github.com/scramjetorg/transform-hub/blob/HEAD/LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/github/license/scramjetorg/transform-hub?color=green\u0026style=plastic\" alt=\"GitHub license\" /\u003e\u003c/a\u003e\n    \u003ca href=\"https://npmjs.org/package/@scramjet/sth\"\u003e\u003cimg src=\"https://img.shields.io/github/v/tag/scramjetorg/transform-hub?label=version\u0026color=blue\u0026style=plastic\" alt=\"STH version\" /\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/scramjetorg/transform-hub\"\u003e\u003cimg src=\"https://img.shields.io/github/stars/scramjetorg/transform-hub?color=pink\u0026style=plastic\" alt=\"GitHub stars\" /\u003e\u003c/a\u003e\n    \u003ca href=\"https://npmjs.org/package/@scramjet/sth\"\u003e\u003cimg src=\"https://img.shields.io/npm/dt/@scramjet/sth?color=orange\u0026style=plastic\" alt=\"npm\" /\u003e\u003c/a\u003e\n    \u003ca href=\"https://scr.je/join-community-mg1\"\u003e\u003cimg alt=\"Discord\" src=\"https://img.shields.io/discord/925384545342201896?label=discord\u0026style=plastic\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick\u0026hosted_button_id=7F7V65C43EBMW\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/Donate-PayPal-green.svg?color=yellow\u0026style=plastic\" alt=\"Donate\" /\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e⭐ Star us on GitHub — it motivates us a lot! 🚀 \u003c/p\u003e\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://assets.scramjet.org/sth-logo.svg\" alt=\"Scramjet Transform Hub Logo\"\u003e\n\u003c/p\u003e\n\n# The Idea \u003c!-- omit in toc --\u003e\n\nScramjet Transform Hub is a cool way to run programs on your computer or in the cloud. It's easy to use, and it supports lots of different types of programs.\n\nThe Hub is the heart of Scramjet Cloud Platform, a serverless data processing system that allows you to easily deploy, run and interconnect programs that process repetitive data tasks in long-running processes. STH can be run just as well on a Raspberry Pi as it can on a massive 128 core Epyc bare metal server. It installs in one simple command and deploys your app to processes, Docker containers or Kubernetes clusters just as easily... Oh, and the apps are incredibly simple to write too, here's a slack posting sample:\n\n```js\nexport (input: Readable) =\u003e async function*() {\n     for (const post of input) {\n        yield await slack.note(`New post titled \"${post.title}\" from ${post.author}`);\n     }\n}\n```\n\nIt currently supports Node.js and Python based apps, but Java and other languages are coming.\n\n[Get Scramjet Transform Hub straight from NPM](https://www.npmjs.com/package/@scramjet/sth)\n\nIf you don't have a server ready or want to run something from the cloud itself, do check out our website and try the hosted version of [Scramjet Cloud Platform](https://scramjet.org/).\n\n---\n\n# Table of contents \u003c!-- omit in toc --\u003e\n\n- [Introduction :handshake:](#introduction-handshake)\n- [Usage :bulb:](#usage-bulb)\n- [The basics :abcd:](#the-basics-abcd)\n- [Development instructions :construction_worker:](#development-instructions-construction_worker)\n  - [Installation :clamp:](#installation-clamp)\n    - [Environment setup](#environment-setup)\n    - [STH installation](#sth-installation)\n  - [Start STH :checkered_flag:](#start-sth-checkered_flag)\n  - [Install CLI and execute :white_check_mark:](#install-cli-and-execute-white_check_mark)\n  - [Build the packages :building_construction:](#build-the-packages-building_construction)\n  - [Docker commands :whale:](#docker-commands-whale)\n  - [Build Hub on Docker :building_construction:](#build-hub-on-docker-building_construction)\n  - [Run Transform Hub in Docker :robot:](#run-transform-hub-in-docker-robot)\n  - [Monorepo commands :pencil:](#monorepo-commands-pencil)\n  - [Autocomplete :zap:](#autocomplete-zap)\n  - [Git branching workflow](#git-branching-workflow)\n- [Sample usage :sunglasses:](#sample-usage-sunglasses)\n  - [\"Hello Alice\" sample :wave:](#hello-alice-sample-wave)\n  - [More samples :books:](#more-samples-books)\n  - [Configure your own sample :pencil:](#configure-your-own-sample-pencil)\n- [Troubleshooting :collision:](#troubleshooting-collision)\n- [Start your 30 day trial :partying_face:](#start-your-30-days-trial-now-partying_face)\n- [License and contributions :page_with_curl:](#license-and-contributions-page_with_curl)\n- [Help wanted :information_desk_person:](#help-wanted-information_desk_person)\n- [Donation :money_with_wings:](#donation-money_with_wings)\n\n---\n\n# Introduction :handshake:\n\nThis is a development repo for Scramjet Transform Hub, a container supervisor that allows deployment, execution and monitoring of any application based on a simple interface.\n\nThis repository contains the source code for [Scramjet Transform Hub](https://docs.scramjet.org/platform/transform-hub).\n\nIf you want to read more about the usage please go to [Quick Start](https://github.com/scramjetorg/platform-docs) repo.\n\nYou may also be interested in our [Scramjet Cloud Platform](https://docs.scramjet.org/platform) that is based on Transform-Hub.\n\nWhat's more, this repository is intended for developers who would like to:\n\n- participate in the Scramjet Transform Hub development community\n- register feature requests, issues and PRs for this product\n- build Transform Hub from source\n- dive into code and see how it works\n\nFor developers who would like to simply use Scramjet Transform Hub to run data processing applications, we recommend following resources:\n\n![gh_logo](./images/gh_logo.png) [Repository with Introductory README and templates](https://github.com/scramjetorg/platform-docs)\n\n![gh_logo](./images/gh_logo.png) [Repository with samples](https://github.com/scramjetorg/platform-samples)\n\n![npm_logo](./images/npm_logo.png) [NPM page for main scramjet/sth package](https://www.npmjs.com/package/@scramjet/sth)\n\n![npm_logo](./images/npm_logo.png) [NPM page for scramjet/cli package](https://www.npmjs.com/package/@scramjet/cli)\n\n---\n\n# Usage :bulb:\n\nThe easiest way to start Transform Hub is to run the follow (you'll need node.js and npm installed):\n\n```bash\nnpx @scramjet/sth --runtime-adapter=\u003cdocker|process|kubernetes\u003e\n```\n\nScramjet Transform Hub is a platform that helps you run programs on local and remote machines. You can start programs in the background or connect to them and see their output. You can also pipe your data to the program even if it is running on a different machine. You can install this platform in different places like AWS, Google Cloud, Azure or even your own computer.\n\nThere's no limit to what you can use it for. Do you want a stock checker? A chatbot? Maybe you'd like to automate your home? Retrieve sensor data? Maybe you have a lot of data and want to transfer and wrangle it? You have a database of cities and you'd like to enrich your data? You do machine learning and you want to train your set while the data is fetched in real-time? Or perhaps you want to use it for something else and ask us if that's a good use? Ask us [via email](mailto:get@scramjet.org) 📧 or hop on our [Scramjet Discord ![discord](./images/discord.png)](https://scr.je/join-community-mg1) and we'll be happy to talk with you.\n\n---\n\n# The basics :abcd:\n\n**NOTE:** This is the STH development repo and in order to use it, you need to have **Unix/Linux** based operating system, for example [Ubuntu](https://ubuntu.com/download/server) or [Windows with WSL2](https://learn.microsoft.com/en-us/windows/wsl/install). We also use [docker](https://www.docker.com/get-started) and [node.js v16.x](https://nodejs.org/en/). We're working on development guides for Mac and Windows. 🔜\n\nScramjet Transform Hub allows you to deploy and execute programs that you build and develop. As mentioned above, you can run any program you like, but you need to know a couple of important things:\n\n- The program should consist of a function or an array of functions, such a program is called a **Transform Sequence**.\n- The Sequence will be executed within a separate docker instance (🔜 we're working on other execution environment integrations - help will be appreciated 🦾).\n- The Sequence function will receive a stream as input in the first argument - you can send the data to it via the command `si instance input`.\n- If your Sequence contains more than one function, then the output from the first function is passed to the next one. Also, the first function in Sequence receives the input from API.\n- The functions can also be Generators and iterate over input data in `node` and `python` versions. This is the simplest way to process data, but it won't leverage asynchronous processing. Check out our frameworks to run your transforms faster [Scramjet Framework](https://github.com/scramjetorg/scramjet#scramjet-framework)\n- The last (or the only) function in Sequence can return a `Promise` or a `Stream` - based on this, STH will know when processing is done.\n- Once the returned `Promise` or `future` is resolved, or the `Stream` is ended, STH will gracefully stop the Sequence and remove its container.\n- You can communicate with the server via API, command line client `si` which we wrote for your convenience.\n- The Sequence is called with an AppContext as `this` or `self`, a class that allows you to communicate back from the Sequence: send logs, provide health info, send and receive events from the API or CLI.\n- You can run your Sequence multiple times with different arguments (like for instance currency tickers with different symbols or sensor data readers for each sensor)\n- The program does not leave your server and doesn't use any external systems. It runs on the server you install the host on.\n- Currently STH supports node.js and Python runners only, we're working on bringing you runners for other languages, with Java and C++ as the first ones.\n\nWe hope this helps you understand the basics of STH and get started with it. If you have any questions or need help, please don't hesitate to contact us!\n\nSome important links 👀:\n\n- All the documentation can be found on our documentation portal [docs.scramjet.org](https://docs.scramjet.org).\n- Here you can find the definition of the [Transform Sequence AppContext](./docs/types/interfaces/appcontext.md)\n- You can see the [Scramjet Transform Hub API docs here](./docs/interfaces/API-reference.md)\n- You can see the [CLI documentation here](./docs/interfaces/CLI-command-reference.md), but `si help` should also be quite effective.\n- Don't forget to ⭐ this repo if you like it, `subscribe` to releases and keep visiting us for new versions and updates.\n- You can [open an issue - file a bug report or a feature request here](https://github.com/scramjetorg/transform-hub/issues/new/choose)\n\n---\n\n# Development instructions :construction_worker:\n\nThis section contains more detailed installation descriptions, it is intended for developers who would like to contribute or build Transform Hub from source. If you wish to fire up STH quickly and without unnecessary installations, go to Quick Start [installation section](https://github.com/scramjetorg/platform-docs#2-installation), which focuses on starting STH and deploying a sample application.\n\nIn this section we will also show you some useful commands, tools and functionalities that you can use to develop your own programs.\n\nIf you want to help out, we're happy to accept your pull requests. Please follow the below information to start development.\n\n## Installation :clamp:\n\n\u003e **Reminder:** This is a development guide. In order to use it, you need to have a Unix/Linux based os (e.g. [Ubuntu](https://ubuntu.com/download/server)), [docker](https://www.docker.com/get-started) and [node.js v16.x](https://nodejs.org/en/) installed. We're working on development guides for Mac and Windows. 🔜\n\n### Environment setup\n\nThere are several installations you need to perform to get STH up and running, and even more to start developing with us. You may already have some of these below installed, but we will show you how to install them anyway.\n\n- nvm\n- node.js\n- yarn\n- typescript\n- ts-node\n- docker\n- pip\n- wget\n- jq\n\nOur hub is based on node.js, so you need to install node.js and npm, which is the default package manager for node.js.\nTo check if you already have Node.js(v16.xx.x) and npm installed, run the following commands in your console:\n\n```bash\nnode -v\nnpm -v\n```\n\nIf none of the above commands is found, **you must proceed with the installation.**\n\nIt is recommended to use a **Node version manager** like [nvm](https://github.com/nvm-sh/nvm/blob/master/README.md) to install Node.js and npm. Do it by running the install script using either of the commands bellow.\n\u003e Note: Make sure you replace v0.39.0 with the latest version of nvm. The actual version of nvm to install is [here](https://github.com/nvm-sh/nvm/blob/master/README.md#install--update-script).\n\n```bash\ncurl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash\n\nwget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash\n```\n\nAfter executing the above command you should see:\n\n![nvm_installation_output](./images/nvm_installation_output.png)\n\nwhich means that you need to run those two more commands to finish the nvm installation:\n\n```bash\nexport NVM_DIR=\"$HOME/.nvm\"\n[ -s \"$NVM_DIR/nvm.sh\" ] \u0026\u0026 \\. \"$NVM_DIR/nvm.sh\"\n[ -s \"$NVM_DIR/bash_completion\" ] \u0026\u0026 \\. \"$NVM_DIR/bash_completion\"\n```\n\nExport lines from above will be saved in your ~/.bashrc file so that you won't need to run it with every session start.\n\nNow you are ready to **install node.js**, simply type in your console:\n\n```bash\nnvm install --lts    # command will install latest LTS Version of Node.js\n```\n\n\u003e 💡 **Note**:\n\u003e The project is working on Node Long Term Support (LTS) Version, which contains Node Package Manager (NPM) in `^8.15.0` version.\n\u003e NodeJS in version `^17.XX.X` will install NPM in version `^8.1.2` and we don't use it right now 😉.\n\n🤓 For more info visit the node.js official [webpage](https://nodejs.org).\n\nNow you can check installed versions of node.js and npm, run the following commands in your console:\n\n\n```bash\n$ node -v\nv16.13.0\n\n$ npm -v\n8.15.0\n```\n\n**OK!** It looks like you have successfully installed node.js and npm.\n\nThere are two more installations you need to perform, run the following commands in your console one after another:\n\n```bash\nnpm install -g yarn   # yarn is a package manager\n```\n\n![installations](./images/installations.png)\n\nThe same as before the installations can be confirmed by checking the installed versions:\n\n```bash\n$ yarn -v\n1.22.17\n```\n\n**OK!** The installation was successful. 🎉 🎆\n\nSTH can run python packages, and for that it needs to have `python` and `pip`. These should be already installed on your system - check with:\n\n```bash\npython3 --version\npip --version\n```\n\nIf they are not present, refer to the official installation guide for [Python](https://wiki.python.org/moin/BeginnersGuide/Download) and [Pip](https://pip.pypa.io/en/stable/installation/).\n\nAdditionally you have to have `wget` and `jq` installed:\n\n```bash\n# Debian based distributions:\napt install wget jq\n\n# Mac\nbrew install wget jq\n```\n\n\u003e **If you don't want to use Docker, please skip this step!**\n\nWe also work with Docker, but this is optional. Running STH is possible without Docker in the background. If you want to use Docker, you can install it by running the following commands in your console:\n\n*On Mac u can use [Docker-Desktop](https://www.docker.com/products/docker-desktop/)*\n\n```bash\n# Install docker and docker-compose\nsudo apt install -y docker.io docker-compose\n\n# Verify installations by getting versions\nsudo docker version\ndocker-compose version\n\n# Add you user to the docker group\nsudo gpasswd -a $USER docker\n```\n\n### STH installation\n\nThere are two ways to install STH, either by getting the package from npmjs or by cloning repo.\n\n**First**, let's install current STH from the npm registry -\u003e [@scramjet/sth](https://www.npmjs.com/package/@scramjet/sth):\n\n```bash\nnpm i -g @scramjet/sth   # installs the package globally\n```\n\n![npm_package](./images/npm_package.png)\n\nWhen you start STH from npm, no package installations or builds are required. You can start STH right away, with one of those two commands: `scramjet-transform-hub` or `sth`. This was quick, wasn't it?:D\n\n\n**Second** way is designed for developers who want to contribute and not *just* use STH.\n\n Let's clone the transform-hub repo. After that, some more installations will be required. Please copy the following commands to the terminal:\n\n```bash\ngit clone https://github.com/scramjetorg/transform-hub.git \u0026\u0026 \\\ncd transform-hub \u0026\u0026 \\\nyarn install \u0026\u0026 yarn build:all \u0026\u0026 npm i -g ./dist/cli\n```\n\nDepending on your machine this may take some time, so it is a perfect time for another hot beverage ☕ or walk 🚶🏼‍♀️ or joggling 🤹‍♂️ or push-ups maybe..? no? Then simply wait 🧘.\n\nIn the meantime let me describe for you what is happening in the command you have just pasted into the console:\n\n- `git clone https://github.com/scramjetorg/transform-hub.git` is cloning STH repository.\n- `cd transform-hub` is changing the directory to STH repository.\n- `yarn install` is installing all the dependencies of STH.\n- `yarn build:all` is building all STH packages, this script includes three other building scripts (yarn build:packages \u0026\u0026 yarn build:refapps \u0026\u0026 yarn build:docker).\n- `npm i -g ./dist/cli` is installing STH [CLI](https://github.com/scramjetorg/scramjet-cli) as a global command.\n\nWhen both the package installation and build are complete, STH should be ready to run.\n\n\n\n---\n\n## Start STH :checkered_flag:\n\nSTH can be started in multiple ways. The default way is to run it with Docker and on localhost and port number 8000. Choose one of the following:\n\nIf installed by **cloning the repo**:\n\n```bash\nyarn start               # Starts Hub after it's been built using script\n\nyarn start:dev           # Starts Hub in development mode\n```\nIf installed as **npm package**:\n\n```bash\nscramjet-transform-hub   # Starts Hub from installed npm package (@scramjet/sth)\n\nsth                      # alias for scramjet-transform-hub\n```\nYou can also start STH without Docker, use the same commands as above but add `--no-docker` flag:\n\n```bash\nyarn start --no-docker\n\nyarn start:dev --no-docker\n\nsth --no-docker\n```\n\nThere is a wide range of options that you can start STH with. Please add `--help` or `-h` flag to list all the options:\n\n```bash\nyarn start --help\n\nyarn start:dev --help\n\nsth --help\n```\n\n```shell\n$ sth --help\nUsage: sth [options]\n\nOptions:\n  -L, --log-level \u003clevel\u003e         Specify log level (default: \"debug\")\n  -S, --socket-path \u003csocket\u003e      CSI socket location\n  -P, --port \u003cport\u003e               API port\n  -H, --hostname \u003cIP\u003e             API IP\n  -E, --identify-existing         Index existing volumes as sequences (default: false)\n  -C, --cpm-url \u003chost:ip\u003e\n  --id \u003cid\u003e\n  --runner-image \u003cimage name\u003e     Image used by runner\n  --runner-max-mem \u003cmb\u003e           Maximum mem used by runner\n  --prerunner-image \u003cimage name\u003e  Image used by prerunner\n  --prerunner-max-mem \u003cmb\u003e        Maximum mem used by prerunner\n  --expose-host-ip \u003cip\u003e           Host IP address that the Runner containers port is mapped to.\n  --runtime-adapter \u003ctype\u003e        Run all the instances on the given type of container or on host machine. Possible value: `process`, `docker`, `kubernetes`. Keep in mind that using `process` is UNSAFE FOR RUNNING ARBITRARY CODE.\n  --sequences-root                Only works with --runtime-adapter=process option. Where should ProcessSequenceAdapter save new sequences\n  -h, --help                      display help for command\n```\n\n## Install CLI and execute :white_check_mark:\n\nCLI installation was already done at the end of the [Installation](#installation-clamp) section, just before starting STH. But it is worth mentioning, that there are two ways to install the CLI:\n\n- from the source code. In the root folder, **after building**, run the commands:\n\n```bash\nnpm i -g ./dist/cli # install CLI globally from the source folder\nsi --help             # show CLI commands\n```\n\n- from [npm](https://www.npmjs.com/package/@scramjet/cli):\n\n```bash\nnpm i -g @scramjet/cli # install CLI globally from npm\nsi --help                # show CLI commands\n```\n\n![cli_npm](./images/cli_npm.png)\n\nRunning `si --help` command will confirm that the installation went properly and also to see the list of available commands:\n\n```bash\n$ si --help\nCurrent profile: default\nUsage: si [options] [command]\n\nThis is a Scramjet Command Line Interface to communicate with Transform Hub and Cloud Platform.\n\nOptions:\n  -v, --version            Display current CLI version\n  --config \u003cname\u003e          Set global configuration profile\n  --config-path \u003cpath\u003e     Set global configuration from file\n  -h, --help               display help for command\n\nCommands:\n  hub                      Allows to run programs in different data centers, computers or devices in local network\n  config|c                 Config contains default Scramjet Transform Hub (STH) and Scramjet Cloud Platform (SCP) settings\n  sequence|seq             Operations on a Sequence package, consisting of one or more functions executed one after another\n  instance|inst [command]  Operations on the running Sequence\n  topic                    Manage data flow through topics operations\n  completion               completion operations\n  util|u                   Various utilities\n\nTo find out more about CLI, please check out our docs at https://hub.scramjet.org/docs/cli\n\nRead more about Scramjet at https://scramjet.org/ 🚀\n```\n\nYou can also run CLI commands from the source code using `yarn start:dev:cli` instead of `si`, in this case no installation is needed, eg.:\n\n```bash\n$ yarn start:dev:cli --version\nyarn run v1.22.17\n\n$ ts-node packages/cli/src/bin/index.ts --version\nCLI version: 0.28.1\n```\n\nWe will use CLI later on to execute the Sequence. If you would like to read more about our command line interface jump right away to [CLI docs](https://github.com/scramjetorg/transform-hub/blob/main/docs/cli) in this repo or explore [CLI Reference](https://docs.scramjet.org/platform/cli-reference) section on our official website [www.scramjet.org](https://scramjet.org/).\n\n## Build the packages :building_construction:\n\nAll the packages in the project need to be installed and built before they can be used.\n\n**Install** will create a `node_modules` folder in the root of the project and in each package (dependencies will be installed).\n\n**Build** will create a `dist` folder in the root of the project and in each package. The folder will contain the files with the code compiled into JavaScript.\n\nThis is how to perform a clean install and build of all the packages:\n\n```bash\nyarn install:clean    # this command will perform 'yarn clean \u0026\u0026 yarn clean:modules \u0026\u0026 yarn install' at once\nyarn build:packages   # optionally 'build:all' if you want all dockerfiles.\n```\n\n![build_clean](./images/clean_install.png)\n\n\u003e 💡 **HINT:** For more scripts please see `\"scripts: {}\"` in main [package.json](package.json#scripts).\n\n## Docker commands :whale:\n\nDuring development, some artifacts may be leftover in docker. See how to clean them:\n\n```bash\ndocker ps                      # list containers\ndocker volume prune -f         # remove all unused local volumes\ndocker system prune --all -f   # remove all unused images not just dangling ones\ndocker stop $(docker ps -a -q) # stops all running containers\n```\n\n\u003e **\\*(`-f`)** - doesn't prompt confirmation\n\n## Build Hub on Docker :building_construction:\n\nBuild from current source:\n\n```bash\ncd ./packages/sth/\nyarn build:docker\n```\n\n## Run Transform Hub in Docker :robot:\n\n```bash\ncd ./packages/sth/\ndocker-compose up\n\n# or run in detached mode\ndocker-compose up -d\ndocker-compose logs -f\n```\n\nTo run Hub without docker-compose:\n\n```bash\ndocker run \\\n  -ti  \\\n  --name scramjet-hub \\\n  --init \\\n  -p 8000:8000 \\\n  -v /tmp/:/tmp/ \\\n  -v /var/run/docker.sock:/var/run/docker.sock \\\n  scramjetorg/sth:$(jq -r .version package.json)\n```\n\n## Monorepo commands :pencil:\n\nWe use our own scripts to control our monorepo. Here's a couple of helpful commands, which might be useful during development:\n\n```bash\n./scripts/run-script.js [script]\n    # Run an npm script in each package that contains that script.\n./scripts/run-script.js --scope @scramjet/\u003cpackage_name\u003e \u003cscript-name\u003e\n    # Run script only in one package\n./scripts/run-script.js --workspace packages \u003cscript-name\u003e\n    # Run script in all packages in workspace\n\n./scripts/run-script.js --help\n    # Check this out for additional information\n```\n\n## Autocomplete :zap:\n\nCompletion script depends on bash-completion so make sure it's already installed by running `type _init_completion`.\n\nBelow command installs completion script in ~/.bashrc.\n\n```bash\nsi completion install\n```\n\nFor immediate effect make sure to run `source ~/.bashrc`. Also you can manage completion script by yourself. Running `si completion bash` prints script to the terminal.\n\n---\n\n## Git branching workflow\n\nThere are two important branches: `main` (representing stable version of the\nproject) and `devel` (where most of the work happens; this is the default\nbranch).\n\n- New features, and especially breaking changes, should go to the `devel` branch.\n- Bugfixes, especially ones that should be published in a bugfix release,\n  should be merged into the `main` branch.\n  - Start such bugfix branches from `main`, and make PRs to `main`.\n  - After a bugfix is merged, `main` should be merged into `devel` to get the\n    bugfix there as well.\n\nThe purpose of having two branches is to keep important bugfixes separate from\nnew features, so that a bugfix version (a release without new features, just\nbugfixes) can be published immediately if needed.\n\n# Sample usage :sunglasses:\n\n## \"Hello World!\" sample :wave:\n\nFurther actions will work only if you have properly configured your environment, installed hub and built all the packages.\nBy this time you should already have all those things done by going through the [Installation](#installation-clamp) section.\n\n\u003e 💡 **HINT:** _The following instructions apply to the state of the repository from the `release/0.28.0`._\n\n- Run STH:\n```bash\nyarn start      # if cloned STH repo\n\nsth             # if installed STH as npm package\n```\nOpen a new terminal window **inside transform-hub root** folder and do the following:\n\n- Send the hello-world Sequence package to the STH and start it:\n```bash\nsi seq send packages/hello-world.tar.gz\n\nsi seq start -      # '-' means last uploaded Sequence\nsi seq start \u003cid\u003e   # or you can specify id parameter instead\n```\n\nAlternatively, you can use ***deploy*** which does 3in1 - it packs (if neccessary), sends and starts the Sequence:\n\n```bash\nsi seq deploy packages/hello-world.tar.gz\n```\nYou should see on the STH terminal that it received the Sequence.\n\n**Let's connect to the output stream.** Run this command:\n```bash\nsi inst output -        # '-' means last uploaded Sequence\nsi inst output \u003cid\u003e     # or you can specify id parameter instead\n```\nNote that we need an instance ID, not the Sequence.\nIf the output from previous command have been cleared on your terminal, you can still list all your Sequences and instances by running the following:\n- **List Sequences:**\n```bash\nsi seq list\n```\n- **List instances:**\n```bash\nsi inst list\n```\nAfter using instance's ID with `si inst output` command, you should see **\"Hello World!\"** on your terminal window.\n\n[See more about streams and curl commands =\u003e](docs/read-more/stream-and-api.md)\n\n## More samples :books:\n\nTo check out more of our ready-to-go samples, please go to our [Samples repo](https://github.com/scramjetorg/platform-samples) on GitHub, or to our [Samples Hub](https://docs.scramjet.org/platform/samples).\n\n## Configure your own sample :pencil:\n\nWe have also prepared a template for you to use. You can use it as a base for your own samples 👉 [sample template](https://github.com/scramjetorg/platform-docs/tree/main/templates). For this moment we support two variants of template in two programming languages:\n\n- JavaScript (Node.js) 👉 [template](https://github.com/scramjetorg/platform-docs/tree/main/templates/template-js)\n- TypeScript (ts-node) 👉 [template](https://github.com/scramjetorg/platform-docs/tree/main/templates/template-ts)\n- Python 👉 [template](https://github.com/scramjetorg/platform-docs/tree/main/templates/template-ts)\n\nThere is also C++ template that is still in development stage:\n\n# Troubleshooting :collision:\n\n### **Docker issues:** \u003c!-- omit in toc --\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\n    \u003cstrong\u003eError: connect ENOENT /var/run/docker.sock\u003c/strong\u003e\n\u003c/summary\u003e\n\nDuring sending the Sequence compressed package to the host you may come across this error:\n\n- **_Error: connect ENOENT /var/run/docker.sock_**\n\n    ```bash\n    2022-01-13T11:54:26.948Z info (object:Host) New sequence incoming...\n    2022-01-13T11:54:26.948Z log (object:DockerSequenceAdapter) DockerSequenceAdapter init.\n    2022-01-13T11:54:26.948Z log (object:DockerodeDockerHelper) Checking image scramjetorg/pre-runner:0.14.0\n    2022-01-13T11:54:26.949Z log (object:DockerodeDockerHelper) Start pulling image scramjetorg/pre-runner:0.14.0\n    2022-01-13T11:54:26.949Z debug (object:Host) Error: connect ENOENT /var/run/docker.sock\n        at PipeConnectWrap.afterConnect [as oncomplete] (node:net:1161:16)\n    2022-01-13T11:54:26.950Z debug (object:Host) Request date: 2022-01-13T11:54:26.948Z, method: POST, url: /api/v1/sequence, status: 422\n    ```\n\nTo solve this issue you need to install docker and docker-compose. You can install them using the following command below or refer to [official Docker instructions](https://docs.docker.com/get-docker/).\n\n    ```bash\n    sudo apt install -y docker.io docker-compose\n    ```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\n    \u003cstrong\u003eError: connect EACCES /var/run/docker.sock\u003c/strong\u003e\n\u003c/summary\u003e\n\nDuring sending the Sequence compressed package to the host you may come across this error:\n\n- **_Error: connect EACCES /var/run/docker.sock_**\n\n    ```bash\n    2022-01-13T11:58:00.368Z info (object:Host) New sequence incoming...\n    2022-01-13T11:58:00.369Z log (object:DockerSequenceAdapter) DockerSequenceAdapter init.\n    2022-01-13T11:58:00.370Z log (object:DockerodeDockerHelper) Checking image scramjetorg/pre-runner:0.14.0\n    2022-01-13T11:58:00.375Z log (object:DockerodeDockerHelper) Start pulling image scramjetorg/pre-runner:0.14.0\n    2022-01-13T11:58:00.377Z debug (object:Host) Error: connect EACCES /var/run/docker.sock\n        at PipeConnectWrap.afterConnect [as oncomplete] (node:net:1161:16)\n    2022-01-13T11:58:00.379Z debug (object:Host) Request date: 2022-01-13T11:58:00.373Z, method: POST, url: /api/v1/sequence, status: 422\n    ```\n\nTo solve this issue you need to add the current user to the docker group, please use this command:\n\n```bash\nsudo gpasswd -a $USER docker\n```\nIf the problem persists, restart your PC.\n\u003c/details\u003e\u003cbr\u003e\n\n### **Packages issues:** \u003c!-- omit in toc --\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\n    \u003cstrong\u003eErrors related to build packages\u003c/strong\u003e\n\u003c/summary\u003e\u003cbr\u003e\n\nIf something goes wrong during building packages, any errors occur, please try to run clean build, which will remove all `node_modules` and `dist` directories, after that you try to install and build them again.\n\n```bash\nyarn clean \u0026\u0026 yarn clean:modules \u0026\u0026 yarn install \u0026\u0026 yarn build:all\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\n    \u003cstrong\u003eErrors related to reference-apps package\u003c/strong\u003e\n\u003c/summary\u003e\u003cbr\u003e\n\nEvery reference-app package before we run it, needs to:\n\n- have `node_modules` installed (`yarn install`)\n- have `dist` directory created and tar.gz package created (`yarn build:refapps`)\n\nRemember to install dependencies and build your sample package before compressing it.\n\nIf you create your sample in `packages/reference-apps` folder, you can use the following command to build it:\n\n```bash\nyarn build:refapps\n```\n\nIt will build all the packages in the `packages/reference-apps` folder.\n\n\u003c/details\u003e\u003cbr\u003e\n\n\u003e **💡 HINT:** Have a look at the root `package.json`, there is the `scripts` section, which contains the list of all the scripts you can run with yarn. You may find them useful.\n\nLog an issue/bug every time you encounter a problem or find a bug. Maybe you will also find that some feature is missing?\n\n- [bug report](https://github.com/scramjetorg/transform-hub/issues/new?assignees=\u0026labels=\u0026template=bug_report.md\u0026title=)\n- [feature request](https://github.com/scramjetorg/transform-hub/issues/new?assignees=\u0026labels=\u0026template=feature_request.md\u0026title=)\n\n---\n\n# Start your 30 days trial now! :partying_face:\n\n[![Register](https://user-images.githubusercontent.com/63969229/208955381-676702f3-2af1-4f50-bd0c-f6b3660c26f0.png)](https://scramjet.org/)\n\n---\n\n# License and contributions :page_with_curl:\n\nThis project is dual licensed under the AGPL-3.0 and MIT licenses. Parts of the project that are linked with your programs are MIT licensed, the rest is AGPL.\n\nWe accept valid contributions and we will be publishing a more specific project road map so contributors can propose features and also help us implement them. We kindly ask you that contributed commits are Signed-Off `git commit --sign-off`.\n\nWe provide support for contributions via test cases. If you expect a certain type of workflow to be officially supported, please specify and implement a test case in `Gherkin` format in [`bdd` directory](./bdd).\n\nMore info about bdd tests can be found [here](./bdd/README.md).\n\n---\n\n# Help wanted :information_desk_person:\n\nThe project need's your help! There's lots of work to do and we have a lot of plans. If you want to help and be part of the Scramjet team, please reach out to us, [on discord](https://scr.je/join-community-mg1) or email us: [opensource@scramjet.org](opensource@scramjet.org).\n\n---\n\n# Donation :money_with_wings:\n\nDo you like this project? It helped you to reduce time spent on delivering your solution? You are welcome to buy us a coffee ☕\n\n- [You can sponsor us on github](https://github.com/sponsors/scramjetorg)\n\n- There's also a Paypal donation link if you prefer that:\n\n[![paypal](https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick\u0026hosted_button_id=7F7V65C43EBMW)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscramjetorg%2Ftransform-hub","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscramjetorg%2Ftransform-hub","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscramjetorg%2Ftransform-hub/lists"}