Configuration
gset.conf — keyword aliases, compiler overrides, and run pipelines.
GSET reads configuration from three locations, first match wins:
./gset.confin the current working directory$HOME/.gset.conf/etc/gset.conf
The file is a flat key=value list. Comments start with #.
Keyword aliases
Control the spelling of print per target:
# global keywords
keywords.print=say
# per-target overrides
ext.py.keywords.print=puts
ext.js.keywords.print=logWith keywords.print=say, say "hi" in your source transpiles to print("hi") (Python), console.log("hi") (JavaScript), fmt.Println("hi") (Go).
Verified: keyword aliases are applied by both
gset runandgset transpile— the keyword map feeds every emitter.say/shoutwork.
Compiler overrides
Change how each target runs. Each compiler block has four keys:
compiler.python.command=python3
compiler.python.args=-u
compiler.python.wrapper=
compiler.java.command=javac
compiler.java.args=Main.java
compiler.java.run=javac Main.java && java Main && rm Main.class
compiler.java.wrapper=Precedence:
| Setting | Meaning | Default |
|---|---|---|
compiler.<lang>.command | executable | GetCompilers() defaults (python3, node, go, javac, ruby) |
compiler.<lang>.args | static args | target-specific |
compiler.<lang>.run | full shell pipeline | set only for Java |
compiler.<lang>.wrapper | extra wrapper lines | empty |
If command is empty in config, the built-in default is retained (merging, not replacing).
The gset.conf included with the repo
The shipped gset.conf registers print aliases (say, println, print, shout, log, echo, puts) for .py, .js, .java, .go, .rb and lists keyword sections for future targets.
CWD dependence
Because gset.conf is resolved from the current working directory, running gset from a different directory changes keywords and compilers. Verify your config is in effect:
ls gset.conf # your config present?
gset transpile hello.gset --target js | head -3If say stops mapping, you're likely not in the directory holding gset.conf.
File-header keywords (parsed, not yet applied)
A leading key=value block inside a .gset file (e.g. a custom print= mapping in the file header) is parsed by config/config.go, but not yet applied to transpilation — the header is a planned feature. Set aliases via gset.conf for now.