Compiler for Viv, a DSL for emergent narrative in games and simulations.
Project description
Viv Compiler
This package contains the reference compiler for the domain-specific language (DSL) at the heart of Viv, an engine for emergent narrative in games and simulations.
The Viv compiler accepts a Viv source file (.viv) and produces a Viv content bundle in a JSON-serializable format that is compatible with any Viv runtime, enabling character simulation and story sifting according to the constructs defined in the authored Viv code.
Once you've installed this package, you'll have access to two compiler interfaces:
-
A command-line interface (
vivc) for invoking the compiler from the command line. -
A Python API for invoking the compiler programmatically.
As for runtimes, currently there is a single option: the Viv JavaScript runtime.
Docs
Consult the compiler reference for documentation of the CLI, Python API, troubleshooting strategies, and more.
Requirements
- Python 3.11+.
Installation
-
Install from PyPI:
pip install viv-compiler
-
Run a smoke test to confirm your installation looks good:
$ vivc --test * Compiling sample file... * Smoke test passed * Viv compiler installation is operational
Running from Source
Here's how to work directly from a repo checkout:
-
Clone the Viv monorepo:
git clone https://github.com/siftystudio/viv
-
Install the compiler package and its dependencies via Poetry:
cd viv/compiler poetry install
-
Use Poetry to invoke the CLI:
poetry run vivc --test
Changelog
See the changelog for a history of changes to this package.
Security and Privacy
The Viv compiler runs entirely on your machine. It collects no telemetry, makes no analytics calls, and sends no data to any third party. If you discover a security vulnerability in the compiler, please report it using the protocol described in the Viv security policy.
License
Viv is freely available for non-commercial use, while commercial use requires a license from Sifty. Check out LICENSE.txt for the full details.
© 2025-2026 Sifty LLC. All rights reserved.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file viv_compiler-0.11.2.tar.gz.
File metadata
- Download URL: viv_compiler-0.11.2.tar.gz
- Upload date:
- Size: 124.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
93c0aef8a743fed8eaa73e8b84c0e980f81e020868eba467186307646275fc11
|
|
| MD5 |
23dfcb65abc8c5f0b29496570ba2ce92
|
|
| BLAKE2b-256 |
4527a562ec64d5de3427081a745c988ecef33b33f800fee71f22d2ae63e14dac
|
Provenance
The following attestation bundles were made for viv_compiler-0.11.2.tar.gz:
Publisher:
cd-compiler.yml on siftystudio/viv
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
viv_compiler-0.11.2.tar.gz -
Subject digest:
93c0aef8a743fed8eaa73e8b84c0e980f81e020868eba467186307646275fc11 - Sigstore transparency entry: 1331052680
- Sigstore integration time:
-
Permalink:
siftystudio/viv@8a7183d363710d4ff024a860956670bcedb790ab -
Branch / Tag:
refs/tags/compiler-v0.11.2 - Owner: https://github.com/siftystudio
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
cd-compiler.yml@8a7183d363710d4ff024a860956670bcedb790ab -
Trigger Event:
push
-
Statement type:
File details
Details for the file viv_compiler-0.11.2-py3-none-any.whl.
File metadata
- Download URL: viv_compiler-0.11.2-py3-none-any.whl
- Upload date:
- Size: 153.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
038294797a4bd460d65586aed23b677d0f4b73aff6a810852930f38277723c78
|
|
| MD5 |
76e08203eba564245807dbf4cd715d80
|
|
| BLAKE2b-256 |
68983a34182a74d5a878bb9258fcf0795f0d77e7c4c0a756c3bc4b7d9e8d6d9a
|
Provenance
The following attestation bundles were made for viv_compiler-0.11.2-py3-none-any.whl:
Publisher:
cd-compiler.yml on siftystudio/viv
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
viv_compiler-0.11.2-py3-none-any.whl -
Subject digest:
038294797a4bd460d65586aed23b677d0f4b73aff6a810852930f38277723c78 - Sigstore transparency entry: 1331052781
- Sigstore integration time:
-
Permalink:
siftystudio/viv@8a7183d363710d4ff024a860956670bcedb790ab -
Branch / Tag:
refs/tags/compiler-v0.11.2 - Owner: https://github.com/siftystudio
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
cd-compiler.yml@8a7183d363710d4ff024a860956670bcedb790ab -
Trigger Event:
push
-
Statement type: