Tortia
tortia packages and runs applications in an isolated, non-virtualized execution environment.
It creates a single .tortia archive (7z format) that contains:
- your project files
- requested runtimes (for example Node, Rust, Python)
- optional package manager setup
- a run manifest
Then tortia run extracts and executes the archive with an isolated PATH.
Features
init,build,run,cleancommands- Colorful logs (
STEP,INFO,OK,ERROR) - Runtime auto-install during build
- Package manager integration and optional auto dependency install
- Host system package manager integration (
brew,apt,pacman) - User extensions (plugin-style event scripts)
- Runtime/command blocking via shims when not requested
- Download cache reuse for runtime installers and archives
- No VM/container runtime required
Requirements
- macOS or Linux
7zcurltar- POSIX
sh
Notes:
- Runtime downloads require network access at build time.
- Runtime installation support is currently implemented for macOS/Linux on
x86_64/aarch64.
Install / Build
CLI
Cleanup
tortia clean removes leftovers from failed/interrupted runs and build caches.
Examples:
# default: clean stale temp dirs (tortia-build-*, tortia-run-*)
# preview only
# remove global download cache only
# remove project-local tools dir only
Flags:
--temp: remove stale temp dirs from the OS temp directory--cache: remove global Tortia cache (TORTIA_CACHE_DIRor default cache root)--tools: remove project-local tools directory (<project>/.tortia-toolsby default)--all: enable--temp,--cache, and--tools--dry-run: print targets without deleting them
Quick Start
# 1) Create template config
# 2) Edit RecipeFile
# 3) Build archive
# 4) Run archive
Minimal Examples
Each example is intentionally minimal and runnable with only tortia.
Node.js
index.js
console.log;
RecipeFile
[]
= "node-min"
[]
= ["node@22.14.0"]
[]
= ["npm"]
= false
[]
= ""
[]
= ""
[]
= "node index.js"
[]
= ["index.js"]
= []
Build and run:
Python
main.py
RecipeFile
[]
= "python-min"
[]
= ["python@3.12"]
[]
= ["pip"]
= false
[]
= ""
[]
= ""
[]
= "python main.py"
[]
= ["main.py"]
= []
Build and run:
Rust
Cargo.toml
[]
= "rust-min"
= "0.1.0"
= "2021"
src/main.rs
RecipeFile
[]
= "rust-min"
[]
= ["rust@stable"]
[]
= ["cargo"]
= false
[]
= ""
[]
= "cargo build --release"
[]
= "./target/release/rust-min"
[]
= ["Cargo.toml", "src"]
= []
Build and run:
RecipeFile
tortia reads configuration from RecipeFile in the project root.
[]
= "my-app"
[]
= ["node@22.14.0", "rust@stable", "python@3.12", "go@1.22.12", "deno@2.2.5", "bun@1.2.5"]
[]
= ["npm", "pnpm", "pip", "uv", "cargo", "go", "deno", "bun"]
= true
[]
= ["brew:wget"] # also supports apt:<pkg>, pacman:<pkg>
= false
= false
= false
= true
[]
= ["extensions"]
= []
= []
= []
= []
= []
= []
[]
= ""
[]
= ""
[]
= "node app/index.js"
[]
= ["."]
= [".git", "target"]
Runtime Support
Supported runtimes in [runtimes].items:
node@<version>(default:22.14.0)rust@<toolchain>(default:stable)python@<version>orpython/python@latestgo@<version>(default:1.22.12)deno@<version>ordeno/deno@latestbun@<version>orbun/bun@latest
Package Manager Integration
Supported package managers in [package_managers].items:
npm,pnpm,yarnpip,uvcargo,go,deno,bun
Behavior:
- Required runtimes are auto-added if missing.
- Example:
package_managers = ["npm"]auto-adds Node runtime.
- Example:
pnpm/yarnare prepared viacorepack.pipanduvwrappers are provided inside the isolated environment.
Auto Dependency Install
If auto_install = true, tortia build attempts dependency install automatically:
npm:npm ci(ifpackage-lock.json), elsenpm installpnpm:pnpm install --frozen-lockfile(if lockfile), elsepnpm installyarn:yarn install --immutable || yarn install --frozen-lockfile || yarn install(if lockfile), elseyarn installbun:bun install(ifpackage.json)uv:uv sync(ifpyproject.toml) oruv pip install -r requirements.txtpip:pip install -r requirements.txtorpip install .(ifpyproject.toml)cargo:cargo fetch(ifCargo.toml)go:go mod download(ifgo.mod)deno: currently only prepares runtime/manager; use explicit[deps].commandfor custom prefetch
Host System Packages
tortia can optionally install host-level system packages during build.
Configuration:
[]
= ["brew:cmake", "apt:libssl-dev", "pacman:openssl"]
= true
= true
= true
= true
Behavior:
- Supported managers:
brew,apt,pacman - Entry format:
<manager>:<package> - Install runs on the host (not inside archive)
missing_only = trueskips packages already installeduse_sudo = trueruns install/update commands withsudo
Notes:
aptusesapt-getpacmanuses non-interactive flags (--noconfirm)- If a manager is not installed on the host, build fails with an explicit error
Extensions (Plugins)
tortia supports user-defined extension scripts triggered at lifecycle events.
Configuration:
[]
= [".tortia/extensions", "extensions"]
= ["prepare-env"]
= []
= ["gen-assets.sh"]
= []
= ["preflight"]
= ["cleanup"]
Resolution rules:
dirsare searched in order- Script references are relative paths
- If no extension is provided in a reference,
.shis also tried
Events:
before_deps,after_depsbefore_build,after_buildbefore_run,after_run
Runtime behavior:
- Build events search scripts from your project root
- Run events search scripts from extracted archive contents
- Scripts execute with:
TORTIA_EVENTTORTIA_PROJECT_ROOTTORTIA_STAGE_ROOT
Isolation Model
tortia runs hooks ([deps], [build]) and [run].command in an isolated environment:
PATHis rebuilt from archive-internal tool paths + system base path- non-requested runtime commands are blocked by shim executables
- host user-level runtime paths are not used by default
This means a runtime not declared in RecipeFile should not be available inside tortia run.
Archive Contents
A .tortia archive includes:
- bundled project files from
[bundle].include - tool directories (for installed runtimes/package managers)
.tortia-manifest.tomlwith run metadata
Paths and Overrides
Tool directory inside build/run payload:
- default:
.tortia-tools - override: set
TORTIA_TOOLS_DIRto a relative directory name/path
Global cache directory:
- override:
TORTIA_CACHE_DIR - defaults:
- Linux/macOS:
$XDG_CACHE_HOME/tortiaor$HOME/.cache/tortia - Windows:
%LOCALAPPDATA%\\tortia\\cache - fallback: OS temp directory (
.../tortia-cache)
- Linux/macOS:
Runtime download cache path:
<cache-root>/downloads
Troubleshooting
could not resolve host ...- Build needs network to download runtimes/tools.
command ... is blocked in this isolated environment- Add corresponding runtime in
[runtimes].items.
- Add corresponding runtime in
- Large archive size
- Python (Miniconda) can significantly increase archive size.
- Slow repeated builds
- Tortia now reuses runtime download cache in
<cache-root>/downloads. - Use
tortia clean --cacheto fully reset cached downloads.
- Tortia now reuses runtime download cache in
Security Note
[deps].command, [build].command, and [run].command execute shell commands. Treat RecipeFile as code.