Skip to content
A JavaScript client that speaks's container protocol
TypeScript JavaScript HTML
Branch: master
Clone or download
masad-frost Merge pull request #8 from replit/fm-open-close-actions
Allow closing and opening to specify the actions
Latest commit e345a8b Dec 6, 2019

Generated docs


yarn add @replit/crosis @replit/protocol

Crosis relies on the @replit/protocol package as a peer dependency.


You probably don't need this but it's exported: Channel


You should probably familiarize yourself with the protocol before trying to use it. Crosis is just a client that helps you connect and communicate with the container using the protocol.

Read about the protocol here

Here's an example of connecting then opening an eval channel and sending it an eval command

import { Client } from '@replit/crosis';

const client = new Client();

const token = await fetch(TOKEN_URL).then((r) => r.text());

await client.connect({ token });

const channel = client.openChannel({
  name: 'evaller',
  service: 'eval',

channel.on('cmd', (cmd) => {
channel.send({ eval: '1+1' });
You can’t perform that action at this time.