{"id":18482985,"url":"https://github.com/rodyherrera/lisa","last_synced_at":"2026-04-16T18:02:50.304Z","repository":{"id":217373410,"uuid":"712681949","full_name":"rodyherrera/Lisa","owner":"rodyherrera","description":"🌱 Lightweight and fast C++ JavaScript runtime environment for your scripts. Built with Apple JavaScriptCore.","archived":false,"fork":false,"pushed_at":"2024-01-15T19:41:16.000Z","size":2084,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-13T20:25:21.187Z","etag":null,"topics":["cpp","cxx","javascript","javascript-core","javascript-engines","javascript-tools","javascriptcore","jsc","libuv","nodejs","runtime","webkit2gtk"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rodyherrera.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"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}},"created_at":"2023-11-01T01:03:38.000Z","updated_at":"2024-06-01T22:16:42.000Z","dependencies_parsed_at":null,"dependency_job_id":"a011fef7-1a1e-4d7f-8cbf-a2d3399b2736","html_url":"https://github.com/rodyherrera/Lisa","commit_stats":null,"previous_names":["rodyherrera/lisa"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rodyherrera/Lisa","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rodyherrera%2FLisa","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rodyherrera%2FLisa/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rodyherrera%2FLisa/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rodyherrera%2FLisa/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rodyherrera","download_url":"https://codeload.github.com/rodyherrera/Lisa/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rodyherrera%2FLisa/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31897870,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-16T17:33:00.867Z","status":"ssl_error","status_checked_at":"2026-04-16T17:32:57.401Z","response_time":69,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["cpp","cxx","javascript","javascript-core","javascript-engines","javascript-tools","javascriptcore","jsc","libuv","nodejs","runtime","webkit2gtk"],"created_at":"2024-11-06T12:32:42.656Z","updated_at":"2026-04-16T18:02:50.288Z","avatar_url":"https://github.com/rodyherrera.png","language":"C++","readme":"# LisaJS\nLisa is a C++ application that provides a fast and lightweight runtime environment for JavaScript scripts. It uses JavaScriptCore, providing an integrated environment with specific functionalities and utilities.\n\n## Main Features\n- Integration with JavaScriptCore for script execution.\n- Built-in modules for functionalities such as `Console`, `System`, `FileSystem`, `UUID`, `SQLite3` and `Network`.\n- Custom methods like `SetTimeout`, `SetInterval` and `ClearTimer`.\n- Support for running scripts from external files.\n\n## Installation\nBefore starting the compilation, you need to clone the repository if you have not already done so, to do this, you must execute the following command in your terminal:\n```bash\ngit clone https://github.com/rodyherrera/Lisa/\n```\n\nIn order to compile Lisa, you must have a series of dependencies, which are installed by using the `make` command within the root of the repository, which will execute the `Makefile` file.\n\nYou may prefer to install the dependencies yourself using:\n```bash\nsudo apt-get install libwebkit2gtk-4.0-dev libboost-all-dev libsqlite3-dev libpoco-dev libuv1-dev\n```\n\nOnce you have the cloned repository and the required dependencies installed, we can proceed to compile the source code!\n\n```bash\n# Assuming you are at the root of the repository.\nmake\n```\n\nOr you can also prefer the following way to install and compile Lisa:\n```bash\ngit clone https://github.com/rodyherrera/Lisa/ \u0026\u0026 cd Lisa \u0026\u0026 make\n```\n\n## Examples \nExplore the functionality of LisaJS by checking out the examples provided in the `Examples` folder. These examples demonstrate the usage of the various modules and objects available in LisaJS. \n\nYou must run the files from the root of the repository, for example:\n```bash\n./Lisa Examples/Console.js\n# Or\n./Lisa Examples/SQLite3.js\n```\n\n## Description of Makefile Targets and Variables\n\n| Target                | Description                                                                                     |\n|-----------------------|-------------------------------------------------------------------------------------------------|\n| **all**               | The default target that installs dependencies, adds the current directory to the `PATH` (if not added), and compiles the project.                       |\n| **install_dependencies** | Installs the necessary dependencies for building the project using `apt-get`. Requires administrator privileges.                        |\n| **build**             | Compiles the project, generating the `Lisa` executable. This target uses the defined rules to compile the source code.                                  |\n| **add_path**          | Adds the current directory to the `PATH`. This allows running the `Lisa` executable from any location on your system without specifying the full path. |\n| **clean**             | Removes object files and the executable generated during compilation.                           |\n\n### Variables:\n\n| Variable              | Description                                                                                     |\n|-----------------------|-------------------------------------------------------------------------------------------------|\n| **CXX**               | Specifies the compiler to be used for compiling the source code. In this case, it is set to `g++`.                         |\n| **CXXFLAGS**          | Defines compilation flags. In this case, it sets the C++ version to C++2a and enables warning generation (`-Wall`).                        |\n| **INCLUDES**          | Specifies the include directories for the compiler. It includes the necessary directories to find required headers.                      |\n| **LDFLAGS**           | Defines linker flags. Specifies the necessary libraries for linking the executable.                         |\n| **SOURCE_DIR**        | Specifies the directory where the project's source files are located.                          |\n| **SOURCES**           | Generates the list of source files (.cpp) in the directory specified by SOURCE_DIR.                         |\n| **OBJECTS**           | Generates the list of object files (.o) corresponding to the source files.                           |\n| **IS_PATH_ADDED**     | Checks if the current directory has already been added to the `PATH`.                          |\n| **EXECUTABLE**        | Specifies the name of the executable that will be generated during compilation. |\n\n## API Reference\n\n### FileSystem\nThe `FileSystem` module in LisaJS provides a set of functions for interacting with the file system. It allows you to perform various operations such as file manipulation, directory creation, checking file existence, and more.\n\n| Method                                            | Description                                                                                                          |\n|---------------------------------------------------|----------------------------------------------------------------------------------------------------------------------|\n| `AbsolutePath(path: string): string`               | Returns the absolute path of the given path.                                                                         |\n| `CanonicalPath(path: string): string`              | Returns the canonical path of the given path.                                                                        |\n| `ReadLines(path: string): string[]`                | Reads the contents of the file specified by path and returns an array containing each line as a separate string.    |\n| `RelativePath(path: string): string`               | Returns the relative path of the given path.                                                                         |\n| `Copy(sourcePath: string, destinationPath: string): void` | Copies the file or directory from sourcePath to destinationPath.                                                  |\n| `CopyFileContent(sourcePath: string, destinationPath: string): void` | Copies the contents of the file from sourcePath to destinationPath.                                           |\n| `CopySymlink(sourcePath: string, destinationPath: string): void` | Copies the symlink from sourcePath to destinationPath.                                                         |\n| `CreateDirectory(path: string): boolean`           | Creates a new directory specified by path. Returns true if successful.                                            |\n| `CreateDirectories(path: string): boolean`         | Creates directories specified by path, including all parent directories if they do not exist. Returns true if successful.|\n| `CreateHardLink(sourcePath: string, destinationPath: string): void` | Creates a hard link from sourcePath to destinationPath.                                                         |\n| `CreateSymlink(sourcePath: string, destinationPath: string): void` | Creates a symbolic link from sourcePath to destinationPath.                                                       |\n| `CreateDirectorySymlink(sourcePath: string, destinationPath: string): void` | Creates a directory symbolic link from sourcePath to destinationPath.                                       |\n| `WriteFile(path: string, content: string): boolean`| Writes the specified content to the file specified by path. Returns true if successful.                             |\n| `CurrentPath(): string`                             | Returns the current working directory.                                                                              |\n| `Exists(path: string): boolean`                     | Checks if the file or directory specified by path exists. Returns true if it exists.                               |\n| `Equivalent(path1: string, path2: string): boolean` | Checks if the paths path1 and path2 refer to the same file system entity. Returns true if they are equivalent.       |\n| `ReadFile(path: string): string`                    | Reads the entire contents of the file specified by path and returns it as a string.                                  |\n| `FileSize(path: string): number`                    | Returns the size of the file specified by path in bytes.                                                            |\n| `HardLinkCount(path: string): number`               | Returns the number of hard links to the file specified by path.                                                     |\n| `GetLastWriteTime(path: string): number`            | Returns the last write time of the file specified by path in milliseconds since the epoch.                          |\n| `SetLastWriteTime(path: string, time: number): void` | Sets the last write time of the file specified by path to the provided time (in milliseconds since the epoch).      |\n| `SetPermissions(path: string, permissions: number): void` | Sets the permissions of the file or directory specified by path to the provided permissions.                   |\n| `ReadSymlink(path: string): string`                 | Reads the target of the symlink specified by path and returns it as a string.                                       |\n| `Remove(path: string): boolean`                     | Removes the file or directory specified by path. Returns true if successful.                                        |\n| `RemoveRecursively(path: string): boolean`          | Recursively removes the file or directory specified by path. Returns true if successful.                            |\n| `Rename(sourcePath: string, destinationPath: string): void` | Renames the file or directory from sourcePath to destinationPath.                                                |\n| `ResizeFile(path: string, fileSize: number): void`  | Resizes the file specified by path to the given fileSize in bytes.                                                 |\n| `Space(path: string): { Capacity: number, Free: number, Available: number }` | Returns an object containing information about the disk space at the specified path, including capacity, free space, and available space.|\n| `TempDirectoryPath(): string`                       | Returns the path of the temporary directory.                                                                        |\n| `IsBlockFile(path: string): boolean`                | Checks if the file specified by path is a block special file. Returns true if it is.                                 |\n| `IsCharacterFile(path: string): boolean`            | Checks if the file specified by path is a character special file. Returns true if it is.                             |\n| `IsDirectory(path: string): boolean`                | Checks if the path specified by path refers to a directory. Returns true if it is.                                   |\n| `IsEmpty(path: string): boolean`                    | Checks if the directory specified by path is empty. Returns true if it is.                                           |\n| `IsFifo(path: string): boolean`                     | Checks if the file specified by path is a FIFO (named pipe). Returns true if it is.                                   |\n| `IsOther(path: string): boolean`                    | Checks if the file specified by path is of an unknown type. Returns true if it is.                                   |\n| `IsRegularFile(path: string): boolean`              | Checks if the file specified by path is a regular file. Returns true if it is.                                       |\n| `IsSocket(path: string): boolean`                   | Checks if the file specified by path is a socket. Returns true if it is.                                              |\n| `IsSymlink(path: string): boolean`                  | Checks if the file specified by path is a symbolic link. Returns true if it is.                                       |\n\n### Network\nThe `Network` module in LisaJS provides functions related to network information.\n| Method                          | Description                                                       |\n|---------------------------------|-------------------------------------------------------------------|\n| `IPv4(): string`                 | Returns a string representing an IPv4 address.                    |\n| `IPv6(): string`                 | Returns a string representing an IPv6 address.                    |\n| `Broadcast(): string`            | Returns a string representing the broadcast address.              |\n| `Any(): string`                  | Returns a string representing the wildcard address (any).         |\n| `IsWildcard(ip: string): boolean`| Checks if the provided IP address is a wildcard address. Returns true if it is.|\n| `IsBroadcast(ip: string): boolean`| Checks if the provided IP address is a broadcast address. Returns true if it is.|\n| `IsLoopback(ip: string): boolean`| Checks if the provided IP address is a loopback address. Returns true if it is.|\n| `IsMulticast(ip: string): boolean`| Checks if the provided IP address is a multicast address. Returns true if it is.|\n| `IsUnicast(ip: string): boolean`| Checks if the provided IP address is a unicast address. Returns true if it is.|\n| `IsLinkLocal(ip: string): boolean`| Checks if the provided IP address is a link-local address. Returns true if it is.|\n| `IsSiteLocal(ip: string): boolean`| Checks if the provided IP address is a site-local address. Returns true if it is.|\n| `IsIPv4Compatible(ip: string): boolean`| Checks if the provided IP address is IPv4-compatible. Returns true if it is.|\n| `IsIPv4Mapped(ip: string): boolean`| Checks if the provided IP address is mapped to IPv4. Returns true if it is.|\n\n### SQLite3\nThe `SQLite3` module in LisaJS provides functions for working with SQLite databases.\n\n| Method                           | Description                                               |\n|----------------------------------|-----------------------------------------------------------|\n| `Open(Path: string): number`      | Opens a SQLite database at the specified path. Returns a unique identifier for the database. |\n| `OpenV2(Path: string): number`    | Opens a SQLite database at the specified path with extended options. Returns a unique identifier for the database. |\n| `Remove(Path: string): number`    | Removes (deletes) the SQLite database at the specified path. Returns 0 on success. |\n| `Close(DatabaseId: number): number`| Closes the SQLite database identified by the given identifier. Returns 0 on success. |\n| `Execute(DatabaseId: number, Query: string): number` | Executes an SQL query on the specified database. Returns 0 on success. |\n| `PrepareV2(DatabaseId: number, Query: string): number` | Prepares an SQL statement for execution with extended options. Returns a statement object or an error code. |\n| `Prepare(DatabaseId: number, Query: string): number` | Prepares an SQL statement for execution. Returns a statement object or an error code. |\n| `Step(Statement: object): number` | Executes a prepared statement. Returns a result code. |\n| `Reset(Statement: object): number` | Resets a prepared statement. Returns a result code. |\n| `ClearBindings(Statement: object): number` | Clears the bindings on a prepared statement. Returns a result code. |\n| `BindInt(Statement: object, Index: number, Value: number): number` | Binds an integer value to a parameter in a prepared statement. Returns a result code. |\n| `Randomness(Length: number): string` | Generates random data of the specified length. Returns a string. |\n| `CloseV2(DatabaseId: number): number` | Closes a SQLite database with extended options. Returns 0 on success. |\n| `BindText(Statement: object, Index: number, Value: string): number` | Binds a text value to a parameter in a prepared statement. Returns a result code. |\n| `BindBlob(Statement: object, Index: number, Value: string): number` | Binds a blob value to a parameter in a prepared statement. Returns a result code. |\n| `BindDouble(Statement: object, Index: number, Value: number): number` | Binds a double value to a parameter in a prepared statement. Returns a result code. |\n| `BindNull(Statement: object, Index: number): number` | Binds a null value to a parameter in a prepared statement. Returns a result code. |\n| `BindParameterCount(Statement: object): number` | Returns the number of parameters in a prepared statement. |\n| `BindParameterName(Statement: object, Index: number): string` | Returns the name of the specified parameter in a prepared statement. |\n| `BindParameterIndex(Statement: object, Name: string): number` | Returns the index of the specified parameter in a prepared statement. |\n| `BindParameterIndexFromName(Statement: object, Name: string): number` | Returns the index of the specified parameter in a prepared statement. |\n| `Finalize(Statement: object): number` | Finalizes a prepared statement. Returns a result code. |\n| `Version(): string` | Returns the SQLite library version. |\n| `VersionNumber(): number` | Returns the SQLite library version number. |\n| `SourceID(): string` | Returns the SQLite library source ID. |\n| `ColumnCount(Statement: object): number` | Returns the number of columns in the result set of a prepared statement. |\n| `ColumnName(Statement: object, Index: number): string` | Returns the name of the specified column in the result set of a prepared statement. |\n| `ColumnType(Statement: object, Index: number): number` | Returns the data type of the specified column in the result set of a prepared statement. |\n| `ColumnInt(Statement: object, Index: number): number` | Returns the integer value of the specified column in the result set of a prepared statement. |\n| `ColumnDouble(Statement: object, Index: number): number` | Returns the double value of the specified column in the result set of a prepared statement. |\n| `ColumnText(Statement: object, Index: number): string` | Returns the text value of the specified column in the result set of a prepared statement. |\n| `ColumnBlob(Statement: object, Index: number): string` | Returns the blob value of the specified column in the result set of a prepared statement. |\n| `ColumnValue(Statement: object, Index: number): any` | Returns the value of the specified column in the result set of a prepared statement. |\n| `Backup(SourceDatabaseId: number, DestinationDatabaseId: number): number` | Initiates a backup from the source database to the destination database. Returns a result code. |\n| `Restore(SourceDatabaseId: number, DestinationDatabaseId: number): number` | Initiates a restore from the source database to the destination database. Returns a result code. |\n| `PrepareV3(DatabaseId: number, Query: string): number` | Prepares an SQL statement for execution with extended options. Returns a statement object or an error code. |\n| `LoadExtension(DatabaseId: number, Path: string, FunctionName: string): number` | Loads a SQLite extension from the specified path with the given function name. Returns a result code. |\n| `EnableLoadExtension(DatabaseId: number, OnOff: number): number` | Enables or disables the loading of SQLite extensions for the specified database. Returns a result code. |\n| `Sleep(Milliseconds: number): undefined` | Sleeps (pauses) the execution for the specified number of milliseconds. |\n| `Shutdown(): number` | Shuts down the SQLite library. Returns a result code. |\n\n### System\nThe `System` module in LisaJS provides functions for interacting with system-related information.\n\n| Method                                  | Description                                               |\n| --------------------------------------- | --------------------------------------------------------- |\n| `HRTime`                                | Returns the high-resolution time.                          |\n| `Uptime`                                | Returns the system uptime.                                 |\n| `Uname`                                 | Returns information about the system name and version.    |\n| `Environ`                               | Returns an object containing the environment variables.   |\n| `GetEnviron(name)`                      | Returns the value of the specified environment variable.  |\n| `SetEnviron(name, value)`               | Sets the value of the specified environment variable.     |\n| `UnsetEnviron(name)`                    | Unsets the specified environment variable.                |\n| `ChangeWorkingDirectory(directory)`     | Changes the current working directory.                    |\n| `CurrentWorkingDirectory()`             | Returns the current working directory.                    |\n| `HomeDirectory()`                       | Returns the home directory.                                |\n| `TempDirectory()`                       | Returns the temporary directory.                           |\n| `CPUInfo()`                             | Returns information about the CPU.                         |\n| `Platform()`                            | Returns information about the platform.                    |\n| `NetworkInterfaces()`                   | Returns information about network interfaces.             |\n| `GetHostname()`                         | Returns the hostname of the system.                        |\n| `GetPID()`                              | Returns the process ID.                                    |\n| `GetPPID()`                             | Returns the parent process ID.                             |\n| `Sleep(milliseconds)`                   | Pauses execution for the specified number of milliseconds. |\n\n### UUID\nThe `UUID` module in LisaJS provides functions for generating UUIDs.\n\n| Method         | Description                               |\n| -------------- | ----------------------------------------- |\n| `v1()`         | Generates a UUID using the v1 algorithm.   |\n| `v4()`         | Generates a UUID using the v4 algorithm.   |\n| `v5(namespace, name)` | Generates a UUID using the v5 algorithm with a specified namespace and name. |\n\n\n### Console\nThe `Console` module in LisaJS provides a set of functions for interacting with the console. It allows you to log messages and information.\n\n\n| Method         | Description                                    |\n| -------------- | ---------------------------------------------- |\n| `Log(...args)` | Logs messages to the console with a line break. |","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frodyherrera%2Flisa","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frodyherrera%2Flisa","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frodyherrera%2Flisa/lists"}