Functions
Write and deploy functions in the panel's editor, configure triggers, imports, dependencies and environment, and browse logs.
The editor
Open Functions in the navigation rail. The sidebar lists your functions; Add New Function creates one.

The code editor gives you syntax highlighting, type information for TypeScript and the devkit, and formatting. The panel on the right configures the function:
| Panel | Purpose |
|---|---|
| Imported Functions | Import other functions as @spica-fn/<name>. See Sharing code. |
| Triggers | Add, configure, enable or disable triggers. Each trigger points to an exported handler. |
| Dependencies | Install, update and remove npm packages. |
| Environment | Attach environment variables and secrets. |
Save builds and deploys the function. The Logs drawer at the bottom shows the function's latest logs while you work.
Logs
The function logs page, opened from the functions sidebar header, shows the logs of all functions on a timeline. Filter by level, function, time range or text, and expand entries for details.

Variables
The Function variables page, also opened from the sidebar header, is where you manage the environment variables and secrets available to functions.

Working with the CLI
Editing in the panel is great for experiments. For team work, keep functions in a repository and use spica dev, which applies your local edits to an instance as you save.