Examples
Each example is built and run when this site is generated. Each one links to its source on GitHub.
Basicbasic.roc
$ ./basic -a 1
Successfully parsed! Here's what I got:
{ alpha: 1, file: Err(NoValue), files: [], force: False }Deploydeploy.roc$ ./deploy ghcr.io/acme/api:v2 --environment production --replicas 4 --label team=payments --label tier=api --dry-run
Deployment plan:
{ dry_run: True, environment: "production", labels: ["team=payments", "tier=api"], region: "us-east-1", replicas: 4, target_image: "ghcr.io/acme/api:v2" }Default valuesdefault-values.roc$ ./default-values
Successfully parsed! Here's what I got:
{ alpha: 123, beta: 3.14, file: "NONE" }Single argumentsingle-arg.roc$ ./single-arg -a 123
Successfully parsed! Here's what I got:
Alpha(123)Subcommandssubcommands.roc$ ./subcommands
Successfully parsed! Here's what I got:
{ file: Err(NoValue), files: [], force: False, sc: Err(NoSubcommand) }Reference
- API documentation, generated from main on every deployment.
- README for concepts, behavior, and package usage.
- Latest release and its package bundle.