Skip to main content

Installation

Install the OCat CLI tools and get up and running in minutes

Quickstart

Write and run your first OCat program

Language Guide

Learn OCat syntax, variables, functions, and imports

CLI Reference

Full reference for the ocat and ocm command-line tools

What is OCat?

OCat (Orange Cat Language) is a programming language implemented in TypeScript, providing a clean syntax for declaring variables, defining functions, and organizing code across modules. It ships with two CLI tools:
  • ocat — The compiler and runner. Execute .ocat source files directly or launch an interactive REPL.
  • ocm — The project manager. Scaffold new projects, manage configuration, and run projects from a central entry point.

Key features

Run files

Execute .ocat source files with ocat run, with optional force mode for non-standard extensions

Interactive REPL

Explore the language interactively with ocat inline — supports all language features

Project scaffolding

Create App or Lib projects with ocm initialize, generating the full project structure automatically

Module imports

Import other .ocat or .oc files with the import keyword to split code across files

Typed variables

Declare variables with explicit types: number, string, and bool

Functions

Define reusable functions and call them anywhere in your program

Logging system

Built-in logging service with configurable log levels and interceptors, writing logs to .ocat/logs.txt

Project configuration

Per-project configuration via .ocat/config.json, including the main entry file and project metadata

Language overview

OCat programs are plain text files with a .ocat (or .oc) extension. A minimal program looks like this:
hello.ocat
print("Hello, World!")
Variables are declared with a type keyword:
number x = 10
string name = "Alice"
bool active = true
Functions are defined with func and called by name:
func greet
  print("Hello from a function!")

greet
Files can be split across modules using import:
import "utils"

Project structure

When you create a project with ocm initialize, the following structure is generated:
my-project/
├── src/
│   └── main.ocat
├── connection/
├── .ocat/
│   └── config.json
The .ocat/config.json file stores project metadata, the main entry point, and runtime configuration.

Build docs developers (and LLMs) love