Skip to content

Releases: pinokiocomputer/pinokio

3.3.27

25 Jan 19:18
Compare
Choose a tag to compare

Visual Studio Build Tools Hotfix

Previous fix from 3.3.25 neglected the scenario where the user doesn't have visual studio build tools installed (which will be true for most new--non developer--users just installing pinokio).

Because i couldn't uninstall and reinstall visual studio every time i test the new version, neglected to check this scenario. But just replicated this by actually uninstalling build tools and starting from scratch.

The problem has been fixed now. New users should not have any issue getting started

3.3.25

25 Jan 15:39
Compare
Choose a tag to compare

Windows Fix

This release is mainly for Windows users. More specifically for apps that require building/compiling from source code.

Visual Studio Build Tools and CUDA were not working properly on Windows. This didn't affect a lot of apps since many apps use prebuilt wheels. But some apps (such as 3D mesh generation AI apps) required building from source, and these apps were failing to install for many users.

This updated fixes all of this.

  1. Visual Studio Handling: instead of injecting environment variables manually, just use the official vcvarsall.bat right after conda activation.
  2. CUDA Handling: In case there's a globally installed CUDA that gets leaked in, remove those attributes so the base environment will use the CUDA installed inside the pinokio home environment

3.3.8

23 Jan 02:53
Compare
Choose a tag to compare

fs.link hotfix

fs.link fix for installing pip from github (ex: git+https://github.com/huggingface/diffusers.git)

  • fixes fluxgym install issue, as well as other installers that use fs.link on any pip package that installs from github

3.3.7

23 Jan 00:43
Compare
Choose a tag to compare

Linux install issue fix

Because on linux installing playwright with --install-deps flag requires root access, the initial requirement setup step fails for every linux user.

So just don't do it for now. Only install playwright itself and the browsers.

The dependencies can be installed manually only if needed (by the users).

Now Playwright is installed under ~/pinokio/bin/playwright/node_modules, and the browsers are stored at ~/pinokio/bin/playwright/browsers

pw

3.3.0

22 Jan 17:29
Compare
Choose a tag to compare

Major Fix Update

[STRONGLY RECOMMENDED UPDATE] The goal of 3.3.0 was to sit down and fix a lot of fundamental issues that have existed from the very beginning of Pinokio, including

  1. Unreliable execution
  2. Conda issues
  3. Pip issues
  4. Requirement install issues

and many more.

It is strongly recommended to update to this version, since this fixes a lot of the bugs that have existed from the very first version of Pinokio.

1. FIX

  • homebrew install fix
  • conda install fix
  • do not allow installing pip packages into conda base environment
  • do not install brew on linux
  • playwright fix
  • script.start fix: ignore if already running
  • disallow fs.link on non python 3.10 venvs => implement later
  • uvicorn fix
  • when running sudo shell, even when there's an error, do NOT throw an error, but instead display the error message, in order to be consistent with how normal shell.run behaves
  • set process.env.WEBKIT_DISABLE_DMABUF_RENDERER = 1 for some linux users
  • update python module when the pinokio app itself upgrades => just to make sure the py repository is up to date and the venv is correctly set up for the current python
  • do not allow outside click on the download page: clicking outside the modal would close the modal and throw an error previously.

2. New Features

2.1. PNPM Support

Now supports PNPM https://pnpm.io/ in addition to the default NPM that comes with node.js (PNPM is much faster)

2.2. Autolaunch

Now you can make apps autolaunch when pinokio starts.

Simply set the PINOKIO_SCRIPT_AUTOLAUNCH=<script_file_path> environment variable to autostart any app. Here's an example:

# ~/pinokio/api/comfyui.git/ENVIRONMENT
PINOKIO_SCRIPT_AUTOLAUNCH=start.js

2.3. Multiple Python Version Support

By default Pinokio uses Python 3.10 when creating venvs. Now with the venv_python attribute, you can use ANY python version when creating venvs (3.11, 3.12, etc.). Example:

{
  "method": "shell.run",
  "params": {
    "message": "pip install -r requirements.txt",
    "venv": "env",
    "venv_python": "3.11"
  }
}

2.4. "next" RPC attribute

a new attribute has been added to RPC calls:

{
  "when": <condition>,
  "method": <method>,
  "params": <params>,
  "next": <id_or_index>
}

When combined with when, you can program a script to jump to anywhere else in the script by id or index. Example:

module.exports = {
  run: [
    // windows nvidia
    {
      "when": "{{platform === 'win32' && gpu === 'nvidia'}}",
      "method": "shell.run",
      "params": {
        "venv": "env",
        "message": "uv pip install torch==2.5.1 torchvision==0.20.1 torchaudio==2.5.1 {{args && args.xformers ? 'xformers' : ''}} --index-url https://download.pytorch.org/whl/cu121"
      },
      "next": "end"
    },
    // mac
    {
      "when": "{{platform === 'darwin'}}",
      "method": "shell.run",
      "params": {
        "venv": "env",
        "message": "uv pip install torch==2.5.1 torchvision==0.20.1 torchaudio==2.5.1"
      },
      "next": "end"
    },
    // linux nvidia
    {
      "when": "{{platform === 'linux' && gpu === 'nvidia'}}",
      "method": "shell.run",
      "params": {
        "venv": "env",
        "message": "uv pip install torch==2.5.1 torchvision==0.20.1 torchaudio==2.5.1 {{args && args.xformers ? 'xformers' : ''}} --index-url https://download.pytorch.org/whl/cu121"
      },
      "next": "end"
    },
    // default
    {
      "method": "shell.run",
      "params": {
        "venv": "{{args && args.venv ? args.venv : null}}",
        "path": "{{args && args.path ? args.path : '.'}}",
        "message": "uv pip install torch==2.5.1 torchvision==0.20.1 torchaudio==2.5.1 --index-url https://download.pytorch.org/whl/cpu"
      }
    },
    {
      "id": "end",
      "method": "log",
      "params": {
        "raw": "Finished"
      }
    }
  ]
}
  1. Note that the last step is marked with id: "end"
  2. Every step checks the when condition to see if it matches, and runs the step when matched, and then jumps to id: "next"
  3. This ensures that only one of the options is executed in the entire script, since it runs the first matched RPC call and jumps straight to the end.

2.5. Info API

apii

http://localhost/pinokio/info provides realtime info of everything going on on Pinokio, including:

  1. pinokio version
  2. which scripts are running (and which step it's running right now)
  3. which shells are running and what's displayed in the shell
  4. installed apps (~/pinokio/api)
  5. installed requirements (~/pinokio/bin)
  6. local sharing endpoints (proxies)

Here's an example:

{
  "version": {
    "pinokiod": "3.3.0",
    "pinokio": "3.3.0"
  },
  "platform": "darwin",
  "arch": "arm64",
  "home": "/Users/x/pinokio",
  "scripts": [
    {
      "path": "test.git/playwright/launch_and_navigate/run.js",
      "app": "test.git",
      "script_path": "playwright/launch_and_navigate/run.js",
      "step": {
        "method": "script.start",
        "params": {
          "uri": "torch.js",
          "params": {
            "venv": "env"
          }
        },
        "current": 0,
        "total": 5
      },
      "input": {},
      "args": {},
      "full_path": "/Users/x/pinokio/api/test.git/playwright/launch_and_navigate/run.js"
    },
    {
      "path": "test.git/playwright/launch_and_navigate/torch.js",
      "app": "test.git",
      "script_path": "playwright/launch_and_navigate/torch.js",
      "step": {
        "when": "{{platform === 'darwin'}}",
        "method": "shell.run",
        "params": {
          "venv": "{{args && args.venv ? args.venv : null}}",
          "path": "{{args && args.path ? args.path : '.'}}",
          "message": "uv pip install torch torchvision torchaudio"
        },
        "current": 3,
        "total": 7
      },
      "input": null,
      "args": {
        "venv": "env"
      },
      "full_path": "/Users/x/pinokio/api/test.git/playwright/launch_and_navigate/torch.js"
    }
  ],
  "shells": [
    {
      "cols": 170,
      "rows": 45,
      "id": "091eddb9-5852-4398-8071-f57755e7512f",
      "group": "/Users/x/pinokio/api/test.git/playwright/launch_and_navigate/torch.js",
      "path": "/Users/x/pinokio/api/test.git/playwright/launch_and_navigate",
      "index": 0,
      "cmd": "eval \"$(conda shell.bash hook)\" ; conda deactivate ; conda deactivate ; conda deactivate ; sleep 1 ; conda activate base ; sleep 1 ; python -m venv /Users/x/pinokio/api/test.git/playwright/launch_and_navigate/env ; source /Users/x/pinokio/api/test.git/playwright/launch_and_navigate/env/bin/activate /Users/x/pinokio/api/test.git/playwright/launch_and_navigate/env ; python -m pip install --upgrade pip setuptools wheel ; deactivate ; sleep 1 ; source /Users/x/pinokio/api/test.git/playwright/launch_and_navigate/env/bin/activate /Users/x/pinokio/api/test.git/playwright/launch_and_navigate/env ; sleep 1 ; uv pip install torch torchvision torchaudio",
      "done": false
    }
  ],
  "proxies": [],
  "api": [
    {
      "path": "MMAudio.git",
      "title": "MMAudio",
      "description": "Generate synchronized audio from video and/or text inputs https://github.com/hkchengrex/MMAudio",
      "icon": "/api/MMAudio.git/icon.png?raw=true"
    },
    {
      "path": "comfy.git",
      "title": "Comfyui",
      "description": "The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface. https://github.com/comfyanonymous/ComfyUI",
      "icon": "/api/comfy.git/icon.jpeg?raw=true"
    },
    {
      "path": "e2-f5-tts.git",
      "title": "e2-f5-tts",
      "description": "F5-TTS: A Fairytaler that Fakes Fluent and Faithful Speech with Flow Matching https://huggingface.co/spaces/mrfakename/E2-F5-TTS",
      "icon": "/api/e2-f5-tts.git/icon.png?raw=true"
    },
    {
      "path": "facefusion-pinokio.git",
      "title": "FaceFusion 3.1.1",
      "description": "Industry leading face manipulation platform",
      "icon": "/api/facefusion-pinokio.git/facefusion.png?raw=true"
    },
    {
      "path": "test.git",
      "title": "Test",
      "icon": "/api/test.git/icon.jpg?raw=true"
    }
  ],
  "bin": {
    "conda": {
      "installed": [
        "anaconda-anon-usage",
        "aom",
        "archspec",
        "boltons",
        "brotli-python",
        "bzip[2](https://github.com/cocktailpeanutlabs/p2/releases?page=2)",
        "c-ares",
        "ca-certificates",
        "cairo",
        ...
      ]
    },
    "brew": {
      "installed": [
        "cloudflared",
        "gettext",
        "libunistring"
      ]
    }
  },
  "procs": {},
  "gpu": "apple",
  "gpus": [
    "apple"
  ],
  "graphics": {
    "controllers": [...],
    "displays": [...],
  },
  "system": ...,
  "cpu": ...,
  "osInfo": ...,
  "shell": "/bin/zsh",
  "audio": [...],
  "mem": ...,
  "battery": ...,
  "load": ...,
  "bluetooth": [...]
}

2.6. Reset Global Environment

resetenv

you can now reset global environment variables from the settings page.

Sometimes when Pinokio updates to a new version, it adds some new attributes to the ~/pinokio/ENVIRONMENT file. But this doesn't get upgraded automatically.

You can easily update to the latest ENVIRONMENT file by going to the settings page and clicking "reset" from the environment section.

2.7. kernel.userAgent() API

let randomUserAgent = kernel.userAgent(browser)

where:

  • browser: (optional) name of the browser. For examp...
Read more

3.2.0

01 Jan 14:34
Compare
Choose a tag to compare
  1. Fix install issues with Linux (nodejs + playwright)
  2. Environment Variable Fix => the envs variable value is consistent. can be accessed in template expressions everywhere
  3. fs.link fix => undici fetch buggy. use cross-fetch instead

3.0.32

22 Dec 12:04
Compare
Choose a tag to compare
3.0.32 Pre-release
Pre-release
3

3.0.31

20 Dec 15:57
Compare
Choose a tag to compare

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:

chrom

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):

ssssssa

3.0.27

19 Dec 12:36
Compare
Choose a tag to compare
3.0.27 Pre-release
Pre-release
3

3.0.26

16 Dec 15:23
Compare
Choose a tag to compare

1. Hackable UI

With 3.0, you can customize the UI:

  1. Customize the home page
  2. Customize the CSS for the app page
  3. Customize Terminal

1.1. Customizing Home

You can customize the home page by creating an index.ejs file.

customize_home

1.2. Customizing App Page

The app page can be styled with a custom CSS

customize_app

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

bluescreen

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:

  1. break when certain pattern happens
  2. 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.

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.

diskspace

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}}"
		}
	}]
}
  1. First it assigns the contents of config.json to local.config
  2. 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

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.
wizard

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:

  1. If the required environment variables are already set, the script just proceeds using those environment variables.
  2. 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.

huggingface

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 file
  • mode: "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.