Chains is part of the Truss CLI.

push

✨ [new name]

truss chains deploy [OPTIONS] SOURCE [ENTRYPOINT]

Deploys a chain remotely.

  • SOURCE: Path to a python file that contains the entrypoint chainlet.
  • ENTRYPOINT: Class name of the entrypoint chainlet in source file. May be omitted if a chainlet definition in SOURCE is tagged with @chains.mark_entrypoint.

Options:

  • --name (TEXT): Name of the chain to be deployed, if not given, the entrypoint name is used.
  • --publish / --no-publish: Create chainlets as published deployments.
  • --promote / --no-promote: Replace production chainlets with newly deployed chainlets.
  • --wait / --no-wait: Wait until all chainlets are ready (or deployment failed).
  • --watch / --no-watch: Watches the chains source code and applies live patches. Using this option will wait for the chain to be deployed (i.e.--wait flag is applied), before starting to watch for changes. This option requires the deployment to be a development deployment
  • --dryrun: Produces only generated files, but doesn’t deploy anything.
  • --remote (TEXT): Name of the remote in .trussrc to push to.
  • --user_env(TEXT): Key-value-pairs (as JSON str) that can be used to control deployment-specific chainlet behavior.
  • --log [humanfriendly|I|INFO|D|DEBUG]: Customizes logging.
  • --help: Show this message and exit.

watch

truss chains watch [OPTIONS] SOURCE [ENTRYPOINT]

Watches the chains source code and applies live patches to a development deployment.

The development deployment must have been deployed before running this command.

SOURCE: Path to a python file that contains the entrypoint chainlet.

ENTRYPOINT: Class name of the entrypoint chainlet in source file. May be omitted if a chainlet definition in SOURCE is tagged with @chains.mark_entrypoint.

Options:

  • --name (TEXT): Name of the chain to be deployed, if not given, the entrypoint name is used.
  • --remote: (TEXT): Name of the remote in .trussrc to push to.
  • --user_env: (TEXT): Key-value-pairs (as JSON str) that can be used to control deployment-specific chainlet behavior.
  • --log [humanfriendly|W|WARNING|I|INFO|D|DEBUG]: Customizes logging.
  • --help: Show this message and exit.

init

truss chains init [OPTIONS] [DIRECTORY]

Initializes a chains project directory.

  • DIRECTORY: A name of new or existing directory to create the chain in, it must be empty. If not specified, the current directory is used.

Options:

  • --log [humanfriendly|I|INFO|D|DEBUG]: Customizes logging.
  • --help: Show this message and exit.

deploy

🚫 [deprecated] see push above.