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.2.tar.gz (124.8 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.2-py3-none-any.whl (153.7 kB view details)

Uploaded Python 3

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

Hashes for viv_compiler-0.11.2.tar.gz
Algorithm Hash digest
SHA256 93c0aef8a743fed8eaa73e8b84c0e980f81e020868eba467186307646275fc11
MD5 23dfcb65abc8c5f0b29496570ba2ce92
BLAKE2b-256 4527a562ec64d5de3427081a745c988ecef33b33f800fee71f22d2ae63e14dac

See more details on using hashes here.

Provenance

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

Hashes for viv_compiler-0.11.2-py3-none-any.whl
Algorithm Hash digest
SHA256 038294797a4bd460d65586aed23b677d0f4b73aff6a810852930f38277723c78
MD5 76e08203eba564245807dbf4cd715d80
BLAKE2b-256 68983a34182a74d5a878bb9258fcf0795f0d77e7c4c0a756c3bc4b7d9e8d6d9a

See more details on using hashes here.

Provenance

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