Skip to content

Latest commit

 

History

8 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

shell.js-pkgs

remote repository for shell.js

How to use

in shell.js run:

repo add https://cdn.jsdelivr.net/gh/levitaes/shell.js-pkgs/functions

then you can use repo to install packages from this repository

repo install <package>

Packages


Create a new function

  1. Create a new file in the functions folder with name yourNewFunction.function.js

  2. Add the following code to the file

export default {
  name: "function name",
  description: "function description",
  execute: async (os, args) => {
    // Your code here
  },
};
  1. Add the function to functions/functionList.js
import yourNewFunction from "./functions/yourNewFunction.function.js";

and add it to the array

const list = {
  // ...
  yourNewFunction,
};

In the execute function you can use the os and args parameters.

Through the os parameter you have access to the following functions:

  • os.ask - wait for user input
  • os.say - print text to user
  • os.next - last message to end function

The args parameter is an array of arguments passed to the function.

About

A repository of programs and applications for shell.js

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages