---
title: Glossary
description: Each term Luna uses in its code, CLI and Console, in one line, with a link to the page that covers it.
related:
  - /thinking-in-luna
  - /concepts/the-life-of-a-luna
  - /concepts/keys-and-tokens
---

Each term below has one meaning across the docs, the CLI, the SDK and the Console. Follow a term's link for the page that explains it in full.

## Accounts and apps

| Term | Meaning |
| --- | --- |
| [Account](/concepts/organisations-projects-and-environments) | You, as you sign in to Luna. An account can belong to up to 20 organisations. |
| [Organisation](/concepts/organisations-projects-and-environments) | A group of members that holds projects, roles, billing and the audit log. |
| [Project](/concepts/organisations-projects-and-environments) | One app, with its environments. |
| [Environment](/concepts/organisations-projects-and-environments) | One running copy of a project, with its own URL, code, lunas, data, keys and secrets. Every project starts with `production`. |
| [Tenant](/platforms/add-tenants) | A space with data of its own inside an environment. Every environment has a default tenant, and platforms add more. |
| [Deploy](/develop/deploy-an-app) | Sending your app's code to an environment with [`luna deploy`](/cli/deploy). |
| [Version](/develop/deploy-an-app) | What one deploy made. Each call runs on one version, held in `ctx.version`. |

## Lunas

| Term | Meaning |
| --- | --- |
| [Luna type](/lunas/define-a-luna) | A kind of luna, defined with `defineLuna`: its key, tables and handlers. |
| [Luna](/concepts/the-life-of-a-luna) | One instance of a luna type, named by its key, with its own data. |
| [Key](/lunas/define-a-luna) | The fields that name one luna of a type, such as `{ id: "groceries" }`. |
| [Handler](/lunas/write-handlers) | A function of a luna type that apps and other lunas call. |
| [Query](/lunas/write-handlers) | A handler given `query: true`, which reads and never writes. Apps can subscribe to one. |
| [Hook](/lunas/define-a-luna) | Code that runs at a point in a luna's life, such as `onCreate` or `onWake`. |
| [Message](/lunas/call-another-luna) | A one-way call sent with `ctx.send`. The sender does not wait, and Luna tries it again when it fails. |

## Background work

| Term | Meaning |
| --- | --- |
| [Schedule](/background/schedule-a-handler) | A handler set to run later, at a set time or on a cron. |
| [Durable run](/background/run-durable-work) | A run of a durable handler, which carries on after a crash, a restart or a long wait. |
| [Step](/background/run-durable-work) | One part of a durable run, which runs once and keeps its result. |

## Events and data

| Term | Meaning |
| --- | --- |
| [Event](/events/emit-events) | A declared fact a handler emits, kept with the handler's writes for listeners. |
| [Listener](/events/listen-to-events) | A handler that runs in a luna for each event it listens to. |
| [Index](/data/query-across-lunas) | Rows gathered from many lunas' tables or events, defined with `defineIndex`. |
| [Stream](/events/keep-a-stream) | A log of entries in a luna, read by offset and kept for as long as you choose. |
| [Rollup](/events/roll-up-a-stream) | Counts, sums and other totals of a stream, kept per hour or day. |

## Realtime

| Term | Meaning |
| --- | --- |
| [Connection](/realtime/open-a-connection) | A WebSocket held open between an app and a luna. |
| [Push](/realtime/push-to-connected-apps) | A typed message a luna sends to its connected apps. |

## Files and code

| Term | Meaning |
| --- | --- |
| [Bucket](/files-and-code/store-files) | A named place for a luna's files, declared on its luna type. |
| [Isolate](/files-and-code/run-untrusted-code) | A separate place to run JavaScript you did not write, with its own memory, CPU and time limits. |
| [Sandbox](/files-and-code/run-a-sandbox) | A Linux machine of a luna's own, for commands and processes. |

## Keys and tokens

| Term | Meaning |
| --- | --- |
| [Publishable key](/concepts/keys-and-tokens) | A key starting `pk_` that reaches the public luna types of one environment. It is safe to put in an app. |
| [Secret token](/concepts/keys-and-tokens) | A token starting `sk_` that reaches every luna type of one environment. Keep it on a server. |
| [API token](/concepts/keys-and-tokens) | A token starting `lt_` for the control API, limited to the scopes you give it. |
| [Account key](/concepts/keys-and-tokens) | A key starting `la_` that can do everything your account can. `luna login` makes one. |

## Recovery

| Term | Meaning |
| --- | --- |
| [Restore](/develop/restore-to-an-earlier-moment) | Rewinding a luna, a luna type or an environment to an earlier moment. |
| [Fork](/develop/fork-a-luna) | Copying a luna, as it is now or as it was, to a new key or another environment. |
