# Overview

SleekByte runs code snippets you write, PHP, CSS, SCSS and JavaScript, without
a child theme and without editing plugin files. A snippet is a folder of
ordinary files with a `snippet.json` beside them, stored on disk rather than in
the database, so it can be copied, versioned and deployed like any other code.

Byte is part of the suite, where it opens from the workspace sidebar, and it
also ships as the standalone SleekByte plugin, which adds a **Byte** entry to
the **SleekWP** admin menu. Both run the same snippets from the same folders.

## How it works

- **Snippets are folders.** Every folder that holds a `snippet.json` is a
  snippet, and every PHP, CSS, SCSS and JavaScript file inside it loads
  automatically. Snippets live in `wp-content/uploads/sleek-byte/` unless you
  add [more sources](/docs/byte/snippets/sources.md).
- **Loading is declared, not coded.** `snippet.json` says where and when the
  files load: the contexts, the hook PHP runs on, environments, a schedule
  and conditions, per snippet or per file. See
  [Configuration](/docs/byte/snippets/configuration.md).
- **PHP is checked before it is saved.** The workspace parses every changed
  PHP file for syntax errors and refuses to save while one is broken.
- **Drafts can be previewed.** The preview shows the site's front end with the
  unsaved draft running in place of your saved snippets. See
  [Preview](/docs/byte/snippets/preview.md).
- **Failures are contained.** Each snippet keeps a runtime error log, a
  snippet that hits three fatal errors in an hour stops loading, and a safe
  mode turns every snippet off. See
  [Errors and safe mode](/docs/byte/snippets/errors.md).
- **History is optional.** With the `sleekByte/snippets/git` filter on, every
  save records a Git commit per snippet. See
  [History](/docs/byte/snippets/history.md).
- **Snippets can leave Byte.** Any selection of snippets exports as an
  installable plugin that runs without Byte. See
  [Export to a plugin](/docs/byte/snippets/export.md).

The [workspace](/docs/byte/workspace.md) is where you write and manage snippets,
the [assistant](/docs/byte/ai/chat.md) can read and edit them for you, and
everything the workspace does is also available to scripts through
[WP-CLI](/docs/byte/cli.md) and the [REST operations](/docs/byte/reference/rest.md).

## Updating from the standalone plugin

A site running a published SleekByte release updates in place to the current
one from the Plugins screen. The current release requires WordPress 6.5 and
PHP 8.2; a site below either stays on its release. The administration is
rebuilt inside the SleekWP menu and snippets stay where they always were. A
snippet whose `snippet.json` is not valid JSON, or holds a list rather than an
object, no longer runs with default settings: it waits until the file is
fixed. [Uninstalling](/docs/byte/activating.md#uninstalling) keeps the snippets,
which are the site's own code. The built-in AI chat and the standalone
recovery editor are retired: the [assistant](/docs/byte/ai/chat.md) replaces the
chat, and [safe mode](/docs/byte/snippets/errors.md#safe-mode) recovers a site a
snippet broke. To roll back, install the previous release's ZIP again.
