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.12.1.tar.gz (125.1 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.12.1-py3-none-any.whl (154.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: viv_compiler-0.12.1.tar.gz
  • Upload date:
  • Size: 125.1 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.12.1.tar.gz
Algorithm Hash digest
SHA256 f31e6e2482d5d6592218d022133426a6f955d3fc00922e1ca0c9d77b6ac232a8
MD5 211758ad4bce70667680b2bb9842822f
BLAKE2b-256 c2ad468e960bdfa9a8b81ae0a65d5c510b3ea839456762006915541a52efc0cf

See more details on using hashes here.

Provenance

The following attestation bundles were made for viv_compiler-0.12.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.12.1-py3-none-any.whl.

File metadata

  • Download URL: viv_compiler-0.12.1-py3-none-any.whl
  • Upload date:
  • Size: 154.0 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.12.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c5a443753cb73fba09b6926e8391295e546f7b535e40b314323a5d70ea83ead4
MD5 be50b2e1f59252f50575d16fb7249810
BLAKE2b-256 f8908590aaf372842d6cfe314b6b7edf6c434c4206842f5da0bfabfe6807b166

See more details on using hashes here.

Provenance

The following attestation bundles were made for viv_compiler-0.12.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