# The script tools

Officers open the community's menu › **Code and AI helpers…** (Code… for short). Its tabs:

## Scripts

Every script with its language, whether it's on, its powers and its last runs. A script's page has:

- **The editor** (CodeMirror): help while typing (every call and event is known, with its types), errors in plain words
  with their line marked.
- **Its settings form**, above the code, when the script calls `settings()`.
- **Try it**: runs the script on a made-up event (a join, a message, a command…) without keeping anything, and shows
  what it would post and change, with its cost.
- **Its last runs**, streaming live while you watch: what each did, its logs and errors, its cost (time, statements,
  memory).
- **Switch on/off**, and delete.

## The test room

**Test room** is a pretend channel: write messages and commands as a made-up member and see the scripts answer, press
their buttons and fill their forms, all without touching the real community. It keeps going between tries.

## The debugger

In the test room, click beside a line of code to set a **breakpoint**. A run stops there: see its values, then step on.

## Blueprints

A **blueprint** is a script drawn as boxes and wires: an event box (*a member joins*, *a command*), action boxes (*post*,
*give a flair*, *add to data*) and value boxes, joined in order. Good for officers who don't code.

## Data

**Data** shows the community's data (keys and values) and members' data. Change or delete values by hand.
**Data in and out** downloads all of it as a file, or loads one back.

## Leagues

**Leagues** lists the leagues the community is in, invites to join one, and makes a new one with other communities.

## The library

The **library** (`#/lib`) is scripts and kits shared between communities. Publish a script of yours with a version;
others use it by number (`use(12, 3)`), or copy it. Each item shows its powers.

## AI helpers

**AI helpers** makes keys for Claude Code, Codex or Cursor. See [AI helpers](../ai/connect.md).

## Terminal

In the Windows app only, **Terminal** opens PowerShell in a folder ready for an AI helper (its key and settings already
there). Start Claude Code or Codex from its buttons.

## gc-cli dev

Write scripts in your own editor and try them from your PC:

```sh
gc-cli dev ./scripts --community=<id> --init        # fills the folder with the community's scripts
gc-cli dev ./scripts/welcome.js --community=<id> --event=join --as=cat-1   # tries one on an event
gc-cli dev ./scripts --community=<id> --push        # saves them
```

`--event=join|message|command|…` and `--text=…` set the made-up event. Without `--push`, nothing is saved.

## Script webhooks

Integrations › **Into scripts** makes webhook addresses for outside sites (GitHub, Twitch, YouTube, or any site that
signs its posts); their posts arrive as the `webhook` event. See [Script reference › Webhooks](reference.md#webhooks).

## Bots and you

Every member decides what a community's bots may do with them: the community's menu › **Bots and you…**: messages from
its bots, its widgets knowing who they are, their achievements, their game status. Officers see none of the settings,
only the answers in scripts.
