Skip to main content
Choose the path that matches what you want to do:
  • Single file — write one .ocat file and run it immediately with ocat run
  • Full project — scaffold a project with ocm initialize and run it with ocm run
1

Create a source file

Create a file named hello.ocat:
hello.ocat
print("Hello, World!")
2

Run the file

Pass the file to ocat run:
ocat run hello.ocat
Expected output:
Hello, World!
ocat run only accepts .ocat files by default. If you want to run a file with a different extension, pass the -f / --force flag:
ocat run hello.oc --force

Next steps

Language guide

Learn OCat syntax: variables, functions, and imports

CLI reference

Every flag and subcommand for ocat and ocm

Build docs developers (and LLMs) love