Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

viv_compiler-0.11.1.tar.gz (124.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

viv_compiler-0.11.1-py3-none-any.whl (153.6 kB view details)

Uploaded Python 3

File details

Details for the file viv_compiler-0.11.1.tar.gz.

File metadata

  • Download URL: viv_compiler-0.11.1.tar.gz
  • Upload date:
  • Size: 124.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for viv_compiler-0.11.1.tar.gz
Algorithm Hash digest
SHA256 9857754744367c19a41b22cceb3deec55a15c397a7961d9a73aeb6021dbf391c
MD5 7a3e8e741a2e15d05ce9e7f9f9e59790
BLAKE2b-256 cac36eeeac29ac9f066a1c015b34b63015bcd971f2c568d36c479deffaf1f6a2

See more details on using hashes here.

Provenance

The following attestation bundles were made for viv_compiler-0.11.1.tar.gz:

Publisher: cd-compiler.yml on siftystudio/viv

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file viv_compiler-0.11.1-py3-none-any.whl.

File metadata

  • Download URL: viv_compiler-0.11.1-py3-none-any.whl
  • Upload date:
  • Size: 153.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for viv_compiler-0.11.1-py3-none-any.whl
Algorithm Hash digest
SHA256 42202e11a01f4aa03fa03601a40cdc982c3e50ffb6c5b807a0311ae61fb846ae
MD5 6f5b1f9a00c91bde7b21c021b94d6498
BLAKE2b-256 380e03e77162247ebe23536e7aac03180c16dc933ffffc39f61b48ac781258d6

See more details on using hashes here.

Provenance

The following attestation bundles were made for viv_compiler-0.11.1-py3-none-any.whl:

Publisher: cd-compiler.yml on siftystudio/viv

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page