Run, test and preview

Deskless 3.0 is available for iPhone and iPad. Android 3.0 is in review on Google Play; Android 2.1 differences are noted. SQLite scripts and the dependency installer are new in 3.0.

Project Tools runs supported projects on your device using bundled runtimes. It is free and needs no provider key or companion computer. The Pro Editor + Tools layout keeps tools beside an editor; the standalone tools screen is available without Pro.

Open and configure a project

Open the folder containing your source files, then:

  • iPhone and iPad: choose Workspace layout → Project Tools, then Configuration.
  • Android: choose Project Tools from the editor menu, then Project configuration.

On Apple devices, choose a runtime, enter an entry path relative to the open folder, and tap Save .deskless/project.json, then Done. Android presents the configuration as JSON; edit it and choose Save configuration. For a small TypeScript project:

{
  "schemaVersion": 1,
  "runtime": "typescript",
  "entry": "main.ts",
  "arguments": [],
  "tests": ["tests/main.test.ts"],
  "previewRoot": "."
}

The runtime values are javascript, typescript, python, sqlite (3.0) and web. Opening a folder or its configuration does not run code automatically.

Choose Run to execute the entry. Each operation captures the current project, including unsaved drafts. Output and source locations refer to that capture; saving your files is a separate action. Stop ends the operation. Keep Deskless in the foreground while running tools.

Add a small test

JavaScript and TypeScript use the bundled deskless:test and deskless:assert modules. Create these two files, list the test path in your configuration, and choose Test:

// main.ts
export function add(a: number, b: number) {
  return a + b;
}
// tests/main.test.ts
import { test } from 'deskless:test';
import { equal } from 'deskless:assert';
import { add } from '../main';

test('adds two numbers', () => equal(add(2, 3), 5));

For Python, select a .py entry and list your unittest files in tests. Python also accepts configured arguments and predefined standard input. JavaScript does not provide Node’s process API. An empty test collection is not evidence that a project passed its tests.

Run a SQL script

New in 3.0: set the runtime to sqlite and the entry to a .sql file, then choose Run. Each run starts with a fresh in-memory SQLite database, runs every statement in the script, and shows the results. Nothing persists between runs, and project .db files are not opened, imported or saved. Test, Debug and language actions are not available for SQL, and this is not the sqlite3 shell: dot commands are not supported.

Preview a web project

Choose the Web preview runtime on Apple devices, or set "runtime": "web" on Android. Set an HTML entry such as index.html and a project-relative previewRoot, then choose Run. Android also provides Preview drafts.

Relative HTML, CSS, JavaScript and image assets can load from the captured project. Choose Fit, Phone, Tablet or Desktop to inspect different viewport sizes. Use Refresh on Apple devices or Refresh drafts on Android after editing. Optional Refresh on save captures a fresh project when you save.

The preview is a capture of your drafts. External network requests and navigation, embedded frames, camera/microphone access and native file access are blocked. A page that depends on a CDN or remote API needs suitable local assets or a different testing environment.

On Android, changing the viewport reloads the preview. Replacing Tools with the second editor also stops the preview; reopen it to start again. Stopping a preview can stop another tool view sharing Android’s WebView renderer.

What the local runtime supports

  • Relative project modules, JSON and the bundled Python standard library work locally.
  • Compatible source dependencies in node_modules or vendor/python require .deskless/dependencies.lock.json with exact file hashes and license metadata. Merely copying a package folder is insufficient; use Dependencies (below) to install them.
  • There is no install-script execution, native extension loader, desktop Node environment or system shell. These tools do not compile or sign native iOS/Android apps.
  • Ordinary worker execution uses a 15-second budget; startup is measured separately. Captures allow up to 2,048 files, 2 MiB per text file and 64 MiB of text plus assets, with a separate 32 MiB source limit in the worker. Python’s WebAssembly memory is capped at 256 MiB. Reduce the project if a resource limit is reported.
  • Older Android System WebView versions may support JS/TS but be unable to start Python. Update WebView or Android when the app reports this limitation.

Install dependencies

New in 3.0: choose Dependencies in Project Tools, pick npm or PyPI, enter a package name and an optional version or range, and choose Install Package. Deskless downloads the package and its dependencies from the public registry, verifies their integrity, saves them in the project and writes .deskless/dependencies.lock.json, so runs and tests work offline afterwards.

Only pure-source packages are supported: npm packages without native code or install scripts, pure Python wheels, and source distributions with static metadata. Unsupported packages are refused with a reason. No package scripts, build backends or compilers run, and existing packages and edits are preserved. Installing needs a connection; running does not.

The editor’s older single-file Run action is separate from these multi-file tools. For a remote shell and the tools installed on your own computer, use the Pro SSH terminal.

Continue with Language Tools and Debugging.

Was this page helpful?