Releases: pinokiocomputer/pinokio
3.0.32
3
3.0.31
1. Mac OS Sequoia Support + Simpler Patch for Installer
Previously you had to run patch.command
and enter your system password to "patch" pinokio so you can run it on your mac.
However, this method doesn't work anymore from Mac Sequoia. From this version the Pinokio installer ships with Sentinel, which takes care of this with a simpler UX. Which also means now Pinokio works on Sequoia.
2. More customization
Based on feedback, now there's one more CSS you can customize.
Previously while you could customize the Browser chrome and the terminal, you couldn't customize the wrapper and the UI that wraps the terminal (which itself is wrapped by the Browser chrome). For example:
3.0.31 lets you customize those parts with an additional CSS named web/public/terminal.css
. You can test this by pulling the latest version of PSP and installing it https://github.com/pinokiocomputer/psp/blob/main/web/public/terminal.css
With this, now you have full control over the style of each app page. Here's an example (Now the entire screen has the same theme):
3.0.27
3
3.0.26
1. Hackable UI
With 3.0, you can customize the UI:
- Customize the home page
- Customize the CSS for the app page
- Customize Terminal
1.1. Customizing Home
You can customize the home page by creating an index.ejs
file.
1.2. Customizing App Page
The app page can be styled with a custom CSS
2. Error Screen
2.1. Blue Screen
When something goes wrong, no more "ENOENT file not found", but instead open a blue screen with an actual relevant error message
Breaks when there's an error in the shell
/error: /
/errno /
- but ignore
/error:.*trition/
2.2. Shell Breakpoint API
Additional patterns can be specified when calling shell.run
to:
- break when certain pattern happens
- ignore certain patterns even if they match error messages
3. UV
uv (https://github.com/astral-sh/uv) is included by default, so all uv commands can be used in pinokio shells.
The disk space deduplication feature to save disk space via fs.link
works out of the box, even when using UV.
4. Disk Usage Display
One of the most frequently asked question is "how much disk space does this app take?"
4.0 now displays the disk space size each app occupies.
5. JSON API
- json.get
- json.set
- json.rm
5.1. json.get
load JSON from one or more file paths and assign to local variables.
{
"method": "json.get",
"params": {
<key1>: <filepath1>,
<key2>: <filepath2>
}
}
Example:
{
"run": [{
"method": "json.get",
"params": {
"config": "config.json"
}
}, {
"method": "shell.run",
"params": {
"message": "http-server -p {{local.config.port}}"
}
}]
}
- First it assigns the contents of
config.json
tolocal.config
- Then accesses it with
{{local.config.port}}
5.2. json.set
set attributes of a JSON file
{
"method": "json.set",
"params": {
<filepath1>: {
<key_path1>: <value1>,
<key_path2>: <value2>,
...
},
<filepath2>: {
<key_path1>: <value1>,
<key_path2>: <value2>,
...
},
...
}
}
Where <key_path>
is a dot (.)
separated string, where each component can be:
- an array index
- a key in JSON
Example:
{
"method": "json.set",
"params": {
"config.json": {
"a": 1,
"b": 2
}
}
}
If config.json
doesn't exist:
creates config.json
and sets its content:
{
"a": 1,
"b": 2
}
If config.json
already existed with the following:
{
"a": 0,
"c": 3
}
The result will be:
{
"a": 1,
"b": 2,
"c": 3
}
5.3. json.rm
removes attributes at keypaths:
{
"method": "json.rm",
"params": {
<filepath1>: [<keypath1>, <keypath2>, ...],
<filepath2>: [<keypath1>, <keypath2>, ...]
}
}
Example:
if we start with config.json
:
{
"a": 1,
"b": 2
}
if we run
{
"method": "json.rm",
"params": {
"config.json": ["a"]
}
}
The resulting config.json
will be:
{
"b": 2
}
6. Browser Automation
Playwright is included in Pinokio by default, and the API to playwright is exposed via kernel.playwright
.
You can use this API to write Javascript code which can be controlled by Pinokio scripts, which means you now can not only launch apps, but also automatically interact with them via script.
Playwright and a Playwright firefox browser is now included in Pinokio, and can be used in javascript.
You can write a Javascript class, which then can be called from a script.
First, create a browser.js
// browser.js
class Browser {
async open(req, ondata, kernel) {
let { firefox } = kernel.playwright
const browser = await firefox.launch({ headless: false, });
const context = await browser.newContext({ viewport: null })
const page = await context.newPage()
await page.goto(req.params.url)
}
}
module.exports = Browser
Now we can call this in a run.json
script:
{
"run": [{
"uri": "browser.js",
"method": "open",
"params": {
"url": "https://pinokio.computer"
}
}]
}
When you run this, this will launch a sandboxed Firefox browser and open https://pinokio.computer
7. App Setup Wizard
Every script now has an additional optional attribute called pre
, which lets you express mandatory environment variables that need to be set before each script can run.
- If the environment variables are NOT set, it will display the wizard screen where the user can fill out the environment variables
- If the environment variables are set, the wizard screen will NOT show up, and automatically use the saved environment variable values.
Every script can specify a pre
array to specify which environment variables to require before running the script.
{
"pre": [{
"env": <ENVIRONMENT VARIABLE NAME>,
"description": <ENVIRONMENT VARIABLE DESCRIPTION>,
"default": <Default value (optional)>
}],
"run": [{
...
}]
}
Behavior:
- If the required environment variables are already set, the script just proceeds using those environment variables.
- If at least one of the required environment variables are not set, the script does not proceed, and waits until the variables are filled out
envs variable
now the envs
variable is accessible inside templates.
{
"method": "json.set",
"params": {
"config.json": {
"PATH": "{{envs.PATH}}"
}
}
}
Also, the envs
variable automatically normalizes the environment variables to uppercased version for the variables whose keys were not uppercase.
For example, if only the Path
variable was set, the envs
variable will include not only the Path
value, but also a duplicate version under PATH
, resulting in both Path
and PATH
variables with an identical value.
8. Huggingface API
Pinokio now includes a script API that lets you fully interface with huggingface-cli via JSON-RPC calls.
Exposes a dedicated HF api:
{
"method": "hf.download",
"params": {
"path": <executing folder path (default is the current path)>,
"_": [<arg1>, <arg2>, ...],
<kwarg1>: <val1>,
<kwarg2>: <val2>,
...
}
}
Example:
{
"method": "hf.download",
"params": {
"path": "app/models",
"_": ["adept/fuyu-8b", "model-00001-of-00002.safetensors"],
"local-dir": "fuyu"
}
}
internally runs:
huggingface-cli download adept/fuyu-8b model-00001-of-00002.safetensors --local-dir fuyu
9. New FS API
9.1. fs.open
{
"method": "fs.open",
"params": {
"path": "<filepath to open>",
"mode": "open"|"view"
}
}
mode: "open"
: open the filemode: "view"
: open file explorer
9.2. fs.cat
print the file content
{
"method": "fs.cat",
"params": {
"path": "<file path to read from>"
}
}
9.3. Open in file explorer via pinokio.js menu
Use the fs: "view"
attribute to open in file explorer inside pinokio.js
{
"menu": [{
"text": "open folder",
"href": "outputs",
"fs": "view"
}]
}
This is equivalent to "fs": true
{
"menu": [{
"text": "open folder",
"href": "outputs",
"fs": true
}]
}
You can open the file itself (it will open with the default app)
{
"menu": [{
"text": "open folder",
"href": "outputs",
"fs": "open"
}]
}
10. Misc
10.1. Port Fix
Previous bug where Pinokio could not launch if there's a web server running at port 80
- Do not generate dynamic menu items when in home page (only generate dynamically when you visit each app) (Only run
config.menu()
when an app loads) - Mobile view fix (When loading via local sharing)
- Do not automatically merge all JSON files in a folder (Was not being used and was just causing bugs)
10.2. Mac Compatibility Support
All shells launch with PYTORCH_ENABLE_MPS_FALLBACK=1
by default, which automatically falls back to CPU when a specific torch feature is not available in MPS
10.3. File Deduplication Fix
fs.link
had a bug caused by a PIP bug where sometimes the PIP version and the contents don't match.
In these cases, creating a virtual drive were buggy because the previous logic was to ignore same folders from the same version.
The fix is to overwrite the same folders from the same version instead of ignoring.
Memory Leak Fix
Previously when you shut down Pinokio before shutting down apps, some of the remaining app processes may stick around, causing issues such as:
- Keep consuming memory even when they all should be shut down
- Sometimes you get "uvicorn" related errors saying the process is still running (This is because when you closed Pinokio last time, the uvicorn server inside pinokio kept sticking around even though it should have been shut down along with Pinokio)
- Sometimes you can't delete folders because the folders are locked. All because the process associated with those folders are still running
Basically this update is a critical fix if you want to use Pinokio in a stable way. No other features have been touched, just this bug fixed, so no reason not to upgrade.
2.14.3
use port from pinokiod
2.14.0
Windows 24H2
Pinokio finally supports Windows 24H2 (Windows Insider Preview Canary + Dev + Beta + Release Candidate). Microsoft will soon roll out Windows 24H2, which breaks how shells work, which breaks all shell manipulation methods in Pinokio.
With Pinokio 2.2.0, the shell engine has been updated to work correctly on 24H2. This is a REQUIRED update.
Open in File Explorer
You can open any files and folders in a file explorer by appending ?fs
to any URI in the pinokio.js
file. Example:
// pinokio.js
module.exports = {
version: "2.1",
title: "test",
description: "description",
menu: [{
text: "Open app folder",
href: "app?fs"
}]
}
Navigation Buttons
Based on feedback, the back/forward navigation buttons are back. Now you can navigate back and forth between pages instead of having to go back to home and come back.
2.1.63
use port from pinokiod
2.1.59
use port from pinokiod
2.1.17
1. Editor mode
- Accessible under the "Files" tab
- Edit and save files
- Run scripts and see them execute on the side terminal
- Correctly save files under the
/api
folder instead of/_api
The editor mode was broken for a while but all fixed with this version
2. ENVIRONMENT Bug Fix
ENVIRONMENT files were incorrectly being generated when inheriting from the system ENVIRONMENT.