tutorial

An interactive, hands-on course for GreyCat, a programming language and runtime for applications with stored, connected, time-based, and geographic data. It progresses from basic types and persistence to APIs, testing, parallel work, advanced features, and frontend development.

In plain words
What is it for?
Use it to learn GreyCat from the basics, resume tracked progress, or practise topics such as data modeling, APIs, tests, scheduling, time, geography, and frontend work.
Why use it?
It gives newcomers a structured way to learn GreyCat concepts with explanations, runnable code, and validation.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/datathings/marketplace/tutorial
Clone the repo
git clone --depth 1 https://github.com/datathings/marketplace
Per session 15 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,178 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00015 $0.03178
Opus 5 $0.00008 $0.01589
Sonnet 5 $0.00003 $0.00636
Haiku 4.5 $0.00002 $0.00318

Measured 2d ago against content hash 95e6391952c3, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

tutorial scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/greycat/commands/tutorial.md · 345 lines

How it starts

The opening of the file, as written. The whole thing — 345 lines — stays where its author put it; the contents beside it link to each section on GitHub.

GreyCat Interactive Tutorial

Purpose: progressive hands-on learning of GreyCat — theory + runnable code + validation. 11 sequential modules (each builds on the prior), ~4.5 hours total.

# Module Time Topic
1 Basics 20m Types, nullability, functions
2 Persistence 25m node<T> vs plain objects
3 Collections 30m nodeList/Index/Time/Geo
4 Modeling 25m Relationships + indices
5 Services 20m Abstract type + static fns
6 APIs 25m @expose, @permission, @volatile
7 Testing 20m @test, Assert
8 Parallelization 25m Jobs, await
9 Time & Geo 30m nodeTime, nodeGeo
10 Advanced 30m Inheritance, polymorphism
11 Frontend 35m Lit + Web Awesome + lucide-static, Lighthouse, LLM-friendly SEO

Progress Tracking

.greycat-tutorial-progress:

{
  "started": "<ISO>",
  "current_module": 5,
  "completed_modules": [1, 2, 3, 4],
  "last_session": "<ISO>"
}

Step 1: Check progress + choose path

If file exists: show resume prompt. Else: create with current_module: 1.

Ask (AskUserQuestion):

  • Continue from Module N
  • Start from beginning
  • Jump to specific module
  • Exit

Module 1: Basics (20m)

Concept: statically-typed, non-null by default, no ternary (use if/else). Primitives: int, float, bool, String, char, time.

fn greet(name: String?): String {
    if (name == null) { return "Hello, stranger!"; }
    return "Hello, ${name}!";
}

Exercise (tutorial/module1_basics.gcl):

fn calculate_age(birth_year: int, current_year: int): int {
    return 0;  // TODO
}

@test fn test_calculate_age() {
    Assert::equals(calculate_age(1990, 2024), 34);
    Assert::equals(calculate_age(2000, 2024), 24);
}

Validate: greycat test test_calculate_age (a @test function name, NOT a file path). Hint: current_year - birth_year.


Module 2: Persistence (25m)

Concept: separate transient (RAM) from persistent (storage).

Read the full file on GitHub · 345 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 345 lines · 15 tokens per session scan A 95e6391952c3

Subscribe to this mod's changes

tutorial is a command published in the GitHub repository datathings/marketplace (11 stars, last pushed 4d ago), licensed Apache-2.0. It adds 15 tokens to every session and 3,178 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.