Environment

Apple is a path-centered environment that has a virtual file system to store files and applications. There are folders and files.

Applications are written in JavaScript. They are defined as a single main function, which is called with two parameters, params and API.

Parameters allow an app to receive user-entered data, for example

> app_name "parameter 1" "parameter 2" ... "parameter N"`

For the application function, parameters are stored in an array in the first argument.

API

Delivered as a second parameter, API is an object with functions. These functions can be called to do different tasks within an application. The API functions include:

Function
Action

readFile

Returns file contents as text.

Returning output

You can return outputs of the application by using the JavaScript return statement.

circle-info

Learn how to style output text here.

Last updated