Kuetix Engine is the core runtime and modular workflow engine that powers Kuetix applications. It provides a lightweight bootstrap, dependency injection, configuration, and a workflow subsystem to orchestrate tasks and services.
- Modular architecture with pluggable modules under
modules/ - Workflow runtime with support for
workflow,feature, andsolutiontypes - Hierarchical execution: solutions orchestrate features; features orchestrate workflows
- Dependency injection helpers in
boot/andmodules/ - Structured logging under
pkg/helpers/logger/ - Config profiles for development and production in
runtime/etc/ - Example workflows in
runtime/workflows/ - SimplifiedWSL (
.swsl) — concise workflow syntax with->chaining and<-error binding - Nested const blocks — objects and arrays in
constblocks with automatic type conversion - On Success When — conditional transitions based on step result expressions
- Go 1.21+
- Make (optional, for convenience)
- Docker (optional, for running examples via docker-compose)
git clone https://github.com/kuetix/engine.git
cd engineUsing Makefile:
make kueOr directly with Go:
go build ./...# Build the kue CLI
make kue
# Create a new application project
./runtime/bin/kue create --name my_project --app-type cli
# Add a module to an existing project
./runtime/bin/kue add module my_module
# Update the module cache (di.go, meta.go, modules.json)
./runtime/bin/kue update
# Show project components
./runtime/bin/kue show
# Show help
./runtime/bin/kue --helpSee Kue CLI Documentation below for detailed usage.
Configuration files live under runtime/etc/ with separate profiles, e.g.:
runtime/etc/developmentruntime/etc/production
Logs are written to runtime/log/ by default.
Sample workflows can be found in:
runtime/workflows/commonruntime/workflows/workflowruntime/workflows/wsl_hello_worldruntime/workflows/hierarchical_example
Kuetix Engine supports SimplifiedWSL, a streamlined syntax for defining workflows without verbose boilerplate. See SimplifiedWSL Documentation for details.
Workflows can be organized hierarchically: solutions orchestrate features, features orchestrate workflows, all sharing a single WorkerSessionContext. See Hierarchical Execution Documentation for details.
boot/ # Bootstrapping helpers and services
cmd/ # CLI entrypoints
kue/ # Main workflow CLI tool (create, add, update, show, templates, version)
docs/ # Additional documentation
event/ # Event types and handlers
internal/ # Internal WSL parser (wsl, simplified_wsl)
modules/ # Optional modules and integrations
packaging/ # Distribution packages (Homebrew, Debian)
pkg/ # Public packages (workflow, domain, services, helpers)
runtime/ # Config, logs, and example workflows
tests/ # Test suites and fixtures
The kue command is the primary CLI tool for Kuetix workflow development. It provides project scaffolding, code generation, module cache management, and more.
Installation:
# Build locally
make kue
# Install globally
go install github.com/kuetix/engine/cmd/kue@latest
# Install via Homebrew (macOS/Linux)
brew install kuetix/tap/kue
# Install via APT (Ubuntu/Debian)
sudo apt install ./dist/kue_0.1.0_amd64.debCommands:
Create a new application or package from a template:
kue create --name my_app --app-type cli
kue create -n my_api -a api
kue create -n my_package -a package -o ./projectsOptions:
--name, -n: Project name (required)--app-type, -a: Application type (default: cli)cli: CLI applicationapi: Web API applicationconsumer: AMQP queue consumer (Apache ActiveMQ)service: Background service/daemonpackage: Reusable package with workflows/features/solutionsall: Full application with all types
--output, -o: Output directory (default: current directory)--force, -f: Force creation without confirmation
Add modules, workflows, features, solutions, or transitions:
kue add module payment
kue add workflow order-processing
kue add feature payment-gateway
kue add solution e-commerce
kue add transition payment ProcessPaymentSubcommands: module, workflow, feature, solution, transition
Regenerate the module cache files (di.go, meta.go, modules.json) after adding or modifying modules:
kue update
kue update --verbose
kue update --quietOptions:
--verbose, -v: Verbose mode--quiet, -q: Quiet mode
List applications, solutions, features, and workflows in the current project:
kue showDownload, update, or inspect the local template cache:
kue templates download
kue templates update
kue templates clear
kue templates statusRegister a Kuetix account:
kue register --email user@example.com --password my-secret
kue register --email user@example.com --password my-secret --name "John Doe" --username johndoeOptions:
--email: Email (required)--password: Password (required)--name: Display name (optional)--username: Username (optional)--host, -h: API host (default: api.kuetix.com)
Get and update authenticated profile data:
kue profile get
kue profile update --name "John Doe"
kue profile update --username johndoe
kue profile update --name "John Doe" --username johndoeSubcommands:
get: Get current profile (requires login)update: Updatenameand/orusername(requires login)
kue versionGlobal Template Options:
Templates are loaded from an external source. The priority is: local path > git > web URL.
# Use a specific template version
kue --template-version 0.1.0 create --name myapp
# Use templates from a local directory
kue --template-path /path/to/templates create --name myapp
# Use templates from a git repository
kue --template-git https://github.com/user/templates.git create --name myapp
# Use a custom URL
kue --template-url https://example.com/templates/ create --name myappEnvironment variables: KUE_TEMPLATE_URL, KUE_TEMPLATE_VERSION, KUE_TEMPLATE_PATH, KUE_TEMPLATE_GIT
See Template System Documentation for full details.
Workflows are defined in .wsl files using the Workflow Specification Language:
module example
const {
event: "greet",
version: "1.0.0",
cfg: {
timeout: 30000,
headers: [
{ key: "Content-Type", value: "application/json" }
]
}
}
workflow main {
start: Execute
state Execute {
action myModule.DoSomething(
timeout: $constants.cfg.timeout
) as result
on success when <<result.ok>> == true -> Done
on success -> Retry
}
state Done {
end ok
}
}
Const blocks support nested objects and arrays with automatic type conversion (string, int64, float64, bool, null).
on success when allows conditional transitions based on the step result.
SimplifiedWSL (.swsl) provides a concise syntax without workflow wrappers:
module example
feature # Declare workflow type (feature, solution, workflow, or custom)
const {
msg: "Hello"
}
def errors.OnAnyError() as errorHandler -> .
speak.Say(on: "message", v: $constants.msg) <- errorHandler -> common.Response(message: "Done") -> .
See SimplifiedWSL Documentation for full syntax reference.
Workflows can be organized into three levels that share a single WorkerSessionContext:
Solution → can call features, workflows, and actions
Feature → can call workflows and actions
Workflow → can call actions
Regular WSL:
feature payment_gateway {
start: Step1
state Step1 {
action workflow validate_payment # loads validate_payment.wsl
on success -> Step2
}
state Step2 {
action workflow process_payment # loads process_payment.wsl
on success -> Done
}
state Done {
end ok
}
}
SimplifiedWSL:
feature payment_gateway
workflow:validate_payment() <-
workflow:process_payment() -> .
See Hierarchical Execution Documentation for full details.
Run Kuetix Engine workflows using Docker Compose:
# Start all services (including workflow runner)
docker-compose up
# Start specific service
docker-compose up workflow
# Run a workflow in a container
docker-compose run --rm workflow /bin/bash -c "cd /app && kue update && kue show"The docker-compose.yaml includes a dedicated workflow service for running workflows in containers.
The Homebrew formula is available at packaging/homebrew/kue.rb. To create a tap:
# Create a Homebrew tap repository
brew tap kuetix/tap https://github.com/kuetix/homebrew-tap
# Install kue
brew install kueBuild a .deb package for Ubuntu/Debian:
# Build the package
cd packaging/debian
./build-deb.sh
# Install the package
sudo dpkg -i ../../dist/kue_0.1.0_amd64.debThe build script creates a Debian package in the dist/ directory.
- Use
make testto run tests. - Module definition is in
go.mod. - See CLI Documentation for the full
kuecommand reference.
This project is licensed under the terms of the LICENSE file included in this repository. See LICENSE and NOTICE for details.
See TRADEMARK.md for the trademark policy.
Kuetix™ is an unregistered trademark of Anar Alishov. All rights reserved. The Kuetix™ name and logo are not covered by this license.