GSET
Reference

CLI Reference

gset transpile, gset run, version flags, targets, and exit codes.

USAGE
  gset transpile <file> [-t|--to <target>] [-f|--from <lang>] [-o outfile] [--verbose]
  gset run <file> [-t|--to <target>] [-f|--from <lang>] [--keep]
  gset version
  gset help

gset transpile

Parse a source file and print the generated source to stdout:

gset transpile <PATH> [OPTIONS]
FlagMeaning
-t, --to <TARGET>Target language to emit. Default go. --target is accepted as an alias.
-f, --from <LANG>Source language, overriding the one inferred from the file extension.
-o, --output <OUTFILE>Write the result here instead of stdout.
--verbosePrint diagnostics even when there are none.

gset run

Transpile, then execute on the target runtime:

gset run <PATH> [OPTIONS]
FlagMeaning
-t, --to <TARGET>Target language to emit before running. Default go.
-f, --from <LANG>Source language, overriding the one inferred from the file extension.
--keepKeep the generated file instead of deleting it after the run.

Execution flow:

  1. Source language resolved (extension default, overridden by --from).
  2. Source lowered and emitted for the target (--to, default go).
  3. Output written to a per-invocation temp directory.
  4. Target runtime invoked (go run today) and its exit code propagated.
  5. Temp directory removed unless --keep.

Targets

TargetExtensionStatus
go / golang.goImplemented
python / py / python3.pyImplemented
javascript / js / node.jsImplemented
java.javaImplemented
ruby / rb.rbImplemented

Any other value is rejected before parsing.

Environment & config

Variable / fileEffect
GSET_DEBUG=1Debug logging to stderr

There is no configuration file in the Rust rewrite — the Go-era gset.conf was deleted. A gset.toml (default target, interpreter paths, project root, dependency search roots) is planned but not yet implemented.

Exit codes

CodeMeaning
0success
1parse/lowering errors, unreadable input files
2target or pipeline errors (e.g. no backend for target)

Example session

$ gset transpile fib.py -t go              # Go source on stdout (with any warnings)
$ gset transpile fib.py -t go -o fib.go    # save to a file
$ gset run fib.py -t go                    # print fib(10) => 55
$ gset transpile fib.py -t python
gset: no backend for target `python`; supported: go

On this page