APIWEBADMAPP

Platform statusAll monitored systems operational.

All languages

Operations and typed pipelines language

Shyra

Betav0.4.0

Replaces Bash and PowerShell.

Shyra is capability-safe by default. File, environment, and process argument reads are rejected by the checker unless --allow-read is present.

CLI

Shyra is capability-safe by default. File, environment, and process argument reads are rejected by the checker unless --allow-read is present.

shyra / cli
shyra builtinsshyra check [--allow-read] FILE.shyrashyra run [--allow-read] FILE.shyra [args...]shyra tasks [--allow-read] FILE.shyrashyra run-task NAME [--allow-read] FILE.shyra [args...]

Syntax

Scripts are line-oriented. A statement is a module import, typed let binding, top-level function, named task, or expression pipeline.

Type annotations on let bindings are optional. User functions use fn name(params) -> expr; parameter types are checked at call sites from the pipeline or expression context.

use "path" loads another .shyra file relative to the importing file. Imported functions are called through a namespace based on the imported file stem: use "math.shyra" exposes math.double(3).

shyra / syntax
use "math.shyra" fn double(x) -> x * 2fn add(acc, item) -> acc + item let nums: list<int> = [1, 2, 3, 4]nums | map(double) | reduce(0, add) | printmath.scale(5) | print

Values

Values in brief:

  • int: 1, 42
  • bool: true, false
  • string: "hello"
  • list<T>: [1, 2, 3]
  • dict<T>: dict { "api": 8080, "web": 3000 }
  • records: { name: "api", replicas: 3 }

Expressions

Supported expression forms:

Match patterns support integer, boolean, string, and _ wildcard cases. The checker requires pattern types to match the matched value and all case results to have the same type.

  • Variables: nums
  • Function calls: upper("api"), sum([1, 2, 3])
  • Arithmetic: +, -, *, /
  • Comparisons: >, >=, <, <=, ==, !=
  • Boolean operators: &&, ||
  • Field access: service.name
  • Lambdas: x -> expr
  • Match expressions: match value { case pattern -> expr case _ -> fallback }

Pipeline Stages

Stages consume and produce typed values.

Pipeline callables can be lambdas, user functions, or builtin helper names when their arity matches the stage.

  • map(callable): transforms list<T> into list<U>
  • filter(callable): keeps elements of list<T> when callable returns bool
  • where(callable): alias-style record/list filter with a boolean callable
  • where("field"): keeps records where field is true
  • where("field", value): keeps records where field == value
  • select("field", ...): selects fields from a record or list<record>
  • sort: sorts a list by value
  • sort(callable): sorts a list by a computed key

Builtin Helpers

Builtin helpers are available as expression calls and, where arity matches, as pipeline callables:

format supports positional placeholders and record-field interpolation:

Dictionary helpers are also available as stages:

  • split(string, sep) -> list<string>
  • join(list<string>, sep) -> string
  • upper(string) -> string
  • lower(string) -> string
  • sum(list<int>) -> int
  • avg(list<int>) -> int
  • min(list<int>) -> int
  • max(list<int>) -> int
shyra / builtin-helpers
format("{0}:{1}", "api", 3) | printformat("service {name} has {replicas} replicas", { name: "api", replicas: 3 }) | print

Capability-Gated I/O

The I/O stages are unavailable unless explicitly enabled:

Without --allow-read, check and run report a permission/type diagnostic such as stage 'read-lines' requires capability --allow-read.

shyra / capability-gated-i-o
"services.txt" | read-lines | print"PATH" | env | length | print[] | args | print

Tables

Records and lists of records can be projected, filtered, inspected, and printed:

table prints a header, separator, and aligned rows. Values are not converted to CSV; it is intended for human-readable command output.

shyra / tables
let services = [{ name: "api", replicas: 3, active: true }, { name: "web", replicas: 2, active: false }]services | columns | printservices | where("active") | select("name", "replicas") | table

Error Handling

try(default, callable) is the Result-style recovery stage. The fallback and callable return type must match:

This prints 0. A mismatched fallback is rejected by the checker.

Unknown stages, unknown functions, mismatched stage inputs, mismatched callable returns, and invalid record field access are reported with file, line, and column diagnostics.

Download

Shyra is in active development and has no public downloads or releases yet.

No public download artifacts are available yet for this language.

Looking for everything in one place? See the downloads index.