kcl-lang / cli

The KCL Command Line Interface (CLI).
https://kcl-lang.io
Apache License 2.0
19 stars 13 forks source link

Allow option to read from stdin as opposed required a file #130

Closed ghostsquad closed 1 month ago

ghostsquad commented 1 month ago

Enhancement

This is proposed enhancement is to allow KCL to read from stdin as opposed to requiring a file. Here are some possible implementations:

kcl run - << EOF
{
  foo: "bar"
}
EOF

Allow stdin as well as other files

kcl run - foo.k << EOF
{
  foo: "bar"
}
EOF