Create an action service project
Synopsis
Creates a project for a NovaFlow action service: a Python service whose actions can be used in flows.
The project comes from the NovaFlow action template (github.com/wandelbotsgmbh/novaflow-action-template), which is rendered with Copier via uv, so uv and git need to be installed. The template is not public yet: you need read access to it.
Without --action, the template asks for the service's actions. With --action, or without a terminal (scripts, agents), it runs without questions and uses defaults for everything not given.
The project's .env is set up for the configured instance ('nova app update-env' refreshes it). Run the service with 'uv run run.py': its actions show up in the flow editor within seconds. That needs access to the instance's NATS, which LAN/IPC instances allow but cloud instances don't.
Deploy it like any app with 'nova app install .' (after 'uv sync', the Dockerfile needs uv.lock): the image goes to the imageRegistry in .nova (taken from 'nova config set image-registry'), or with --copy-image straight to the instance over ssh. On the cell, NOVA provides NATS_BROKER, NOVA_API and CELL_NAME; a stopped or removed service stays listed in NovaFlow as offline.
Later template versions are merged into the project with 'uvx copier update --trust'.
nova flow action create <name> [flags]
Examples
# ask for the actions
nova flow action create gripper-actions
# no questions (scripts, agents): two actions, the second returns a boolean for conditions in flows
nova flow action create gripper-actions --action OpenGripper --action IsGripperOpen:condition
# develop: run it against a LAN/IPC instance, its actions show up in the flow editor within seconds
cd gripper-actions
uv sync # also writes uv.lock, which the Dockerfile needs
uv run pytest
uv run run.py
# deploy it to the cell as an app (builds the image and pushes it to the imageRegistry in .nova)
nova config set image-registry <your-registry> # before 'action create', or edit imageRegistry in .nova
nova app install .
# deploy to an instance without registry access: copy the image over ssh instead (IPCs)
nova app install . --copy-image --ssh-user <user> --setup-ssh-key # first time
nova app install . --copy-image --ssh-user <user>
# check that it runs, remove it again
nova app list
nova app delete gripper-actions
Options
--action stringArray An action to create, as Name or Name:kind (kind: action, condition, state_provider). Repeat for more, up to 5. Makes the creation non-interactive.
-h, --help help for create
-o, --output format Output format: text or json (default text)
Options inherited from parent commands
--debug Write diagnostic output to stderr: HTTP requests and responses, external commands, the resolved instance. Known secrets are redacted, but bodies (app environments, kubeconfigs) can still contain some: don't share the output unreviewed (env: NOVA_DEBUG=1)
--env string (Wandelbots internal) Portal environment for this invocation: prod, stg or dev (default: the environment of the cloud instance, else of the last 'nova login'; env: NOVA_ENV)
--insecure-skip-tls-verify If true, the server's certificate will not be checked for validity (disables TLS verification for all requests)
--instance string Name of the instance to work against for this invocation (overrides the selected instance; env: NOVA_INSTANCE)
-y, --yes Answer yes to questions, e.g. to install NovaFlow when it is missing
SEE ALSO
- nova flow action - Develop custom actions for flows