The KSL (Kessel Schema Language) is a domain-specific language for defining authorization schemas.
You can install the ksl command-line tool directly from the GitHub repository:
go install github.com/project-kessel/ksl-schema-language/cmd/ksl@latestThis will install the ksl binary to your $GOPATH/bin directory (or $HOME/go/bin if GOPATH is not set).
Alternatively, you can clone the repository and build it locally:
git clone https://github.com/project-kessel/ksl-schema-language.git
cd ksl-schema-language
make buildThis will create the binary in the ./bin/ directory.
The ksl tool can be used to:
-
Compile KSL files to intermediate representation:
ksl -c input.ksl -o output.json
-
Build multiple KSL/JSON files into a SpiceDB schema:
ksl file1.ksl file2.json -o schema.zed
-c <file>: Compile a KSL source file to intermediate representation-o <file>: Specify the output file (defaults toschema.zedfor builds or<input>.jsonfor compilation)
See the samples/ and demo/ directories for example KSL files and usage patterns.