# Cryswol and Wolkit: apps made for WolOS

> What Cryswol, Wolkit and Crystal are, how they fit together, where to start, and where the complete developer documentation lives.

Source: https://wolos.org/manual/cryswol-apps

## What it is

WolOS apps are written in Crystal, a language that reads like a script and builds into a normal program. Two libraries make it a WolOS app:

- Cryswol is the phone line between your program and the system. Through it a program opens windows, posts notifications, uses the clipboard, saves preferences, opens file panels, shares, plays sound and asks for the things a person may allow or refuse.
- **Wolkit** is the kit for programs that draw their own window: a description of the window, state that updates only the parts that change, and the parts the interface guidelines name (toolbar, sidebar, sheet, menu, tabs).

Your program never needs administrator rights to talk to the system, and it never reaches around the rules: before it does something personal, such as showing notifications, the person using it decides. A refusal arrives in your program as an error that carries WolOS's own sentence, ready to show.

## Why WolOS does it this way

Writing an app should not mean managing memory by hand or decoding error numbers. Cryswol does that once, in one place, so a program of twelve lines is a real app. Splitting the work keeps both halves good: the fast, safe things (layout, text, painting, input, accessibility) live in the engine under Wolkit, and the pleasant things (the language you write in, components, tools) live in the Crystal part.

## How

1. **Install the Developer Tools.** Tick **Developer Tools** in the installer, or open System Settings > Modules and click **Install** next to it ([Set up for development](/manual/developer-module)).
2. **Write and run a first program.** [Your first app in Crystal](/manual/first-app) walks through twelve lines that read the system, ask to post a notification and handle a refusal.
3. **Draw a window.** The Wolkit tutorial in the Reference builds a small to-do app in about fifteen minutes: a signal, a text field, a list, a style sheet, a test and a package ([Your first Wolkit app](/reference/wolkit-tutorial)).
4. **Look things up.** The Reference has every object of Cryswol ([Cryswol](/reference/cryswol)), every element of Wolkit ([Wolkit](/reference/wolkit)), its style language ([Wolkit style](/reference/wolkit-style)), the engine ([libWolkit](/reference/libwolkit)) and the interface guidelines ([Interface guidelines](/reference/hig)). The [Cryswol page](/cryswol) shows what it looks like.

## A worked example

Alice writes a small program that asks the system whether it is in light or dark mode and tries to post a notification. The first time, WolOS asks her to allow notifications for the program. She says no, and the program prints the sentence WolOS gave it: it says where in System Settings she could allow it later. Her program is finished, small, and behaves the way people expect an app to behave.

## If something goes wrong

| What you see | What to do |
|---|---|
| `crystal: command not found` | The Developer Tools are not installed. Install them in System Settings > Modules. |
| A permission error with a sentence | The person has not allowed it. Show the sentence; it says where in System Settings to allow it. |
| A window freezes while a file panel is open | Call the panel in the background, so the window keeps drawing. The Reference shows how. |
| An app refuses to start on another computer | It was built for a newer system library than that computer has. Update that computer, then try again. |
