# csw-cli
Command-line interface for the **Categorical Semantics Workbench**.
## Installation
```bash
cargo install csw-cli
```
Or build from source:
```bash
git clone https://github.com/ibrahimcesar/categorical-semantics-workbench
cd categorical-semantics-workbench
cargo install --path crates/csw-cli
```
## Usage
### Show a Derived Type System
```bash
# Show Simply-Typed Lambda Calculus
csw show --example stlc
# Show Linear Lambda Calculus
csw show --example linear
# Show Affine types (Rust-like)
csw show --example affine
```
### Generate Code
```bash
# Generate Rust code for STLC
csw derive --example stlc --output generated/stlc/
# Generate with specific target
csw derive --example linear --output generated/linear/ --target rust
```
### Validate a Specification
```bash
csw validate --example stlc
```
## Built-in Examples
| `stlc` | Simply-Typed Lambda Calculus (Cartesian Closed Category) |
| `linear` | Linear Lambda Calculus (Symmetric Monoidal Closed Category) |
| `affine` | Affine types, Rust-like (can drop, cannot clone) |
| `bccc` | Bicartesian Closed Category (STLC + sum types) |
## License
Licensed under either of Apache License, Version 2.0 or MIT license at your option.