An abstraction layer on top of @replit/crosis that makes Repl connection management and operations so easy, a Furret could do it! 🎉
The latest version of
crosis4furrets@1.3.0-beta.*
is bleeding edge, it is recommended you usecrosis4furrets@1.2.x
for your projects.
# with NPM
$ npm install crosis4furrets@1.2.x
# with Yarn
$ yarn add crosis4furrets@1.2.x
import { Client } from 'crosis4furrets';
const client = new Client({
token: process.env.REPLIT_TOKEN,
replId: process.env.REPLIT_REPL_ID,
});
which returns a <Client>
. See DOCUMENTATION.md for docs on how
to use Crosis4Furrets.
import { Client } from 'crosis4furrets';
const client = new Client({
token: process.env.REPLIT_TOKEN,
replId: 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx',
});
await client.connect();
console.log('Read:\n', await client.read('index.js', 'utf-8'));
Run the following command in your Repl to get its Repl ID:
$ echo $REPL_ID
or alternatively make a GraphQL Request with the following query:
query ReplID ($url: String) {
repl(url: $url) {
...on Repl { id }
}
}
{
"url": "/@<username>/<repl_slug>"
}
To get a Replit Token, you can visit this Repl.
This project is in active development and we would love some ✨ fabulous ✨ contributions! To get started, visit our Contributing documentation.
This project is licensed under the MIT License. For more information, see LICENSE.