Docs Getting started
The manifest
Every BifrOSt app package has a manifest.toml that names the app, its version, how the shell starts it, and what it may do. This chapter lists every key the packer and the shell read, the permissions, the window options, default-app declarations and App Intents.
Required keys
The packer, tools/aap.py, refuses a package that lacks one of these keys. The shell reads the same keys when it installs the app.
| Key | Meaning |
|---|---|
id | Reverse-DNS name with at least one dot. Use letters, digits, ., - and _. It must match the value your app returns from id(). |
name | The name shown on the home screen and in the App Store. |
version | Semantic version in the form x.y.z. The changelog must have a matching entry. See Versioning. |
exec | The executable, as a relative path inside the package. It may not start with / or contain ... Optional only for kind = "system". |
icon | A relative path to a 180 × 180 PNG inside the package. The packer checks the size. |
min_shell | The lowest shell version that can run the app. |
summary | One line for the store listing. |
category | Required. The packer does not check the value. The first-party apps use values such as Productivity, Utilities, Entertainment, Books, Music and Graphics & Design. |
The PC tooling also requires architecture. See Architecture and window.
The shell reads a small subset of TOML. Write each string value on one line, write each list on one line, and use # only for comments. Multi-line arrays and inline tables are not read. Unknown top-level keys are ignored without an error, so check the spelling of every key.
Kind
The optional kind key says what the package is. Most apps omit it, which means app. An unknown value is rejected by both the packer and the shell.
kind | Use it for | Exec | Provides |
|---|---|---|---|
app (default) | An app that a user opens and can remove. The App Store updates it without a restart of the shell. | Required | No |
system-app | A stock app that ships with the system. It is preinstalled and cannot be removed. It is otherwise the same as app. | Required | No |
system | A package with no screen of its own, such as the keyboard's emoji font and word lists. It is never on the home grid. A system package may omit exec. | Optional | Yes |
service | A background program with no screen. The bifrostd supervisor keeps it running and restarts it when it exits. | Required | No |
Only a system package may declare provides. Use provides = ["keyboard"] to name what the package supplies. The packer rejects provides on any other kind.
Within the source tree, the packer also checks where a package lives. Apps and system apps belong under springboard/apps/. System packages and services belong under springboard/system/. Services are described in the system services chapter.
Architecture and window
Set architecture = "x86_64-linux" for every PC app. The PC tooling, tools/pc-app.py, refuses any other value, and the consistency check reports the same error. The packer does not read the key.
The optional window key selects how the shell draws the window.
window | Meaning |
|---|---|
| Omitted | The app draws its content in an SDK frame, and the shell draws the title row. |
"full-size" | The app draws to the top edge of the window, like NSWindowStyleMaskFullSizeContentView in AppKit. The shell draws no title row, and the traffic-light controls sit over the app's sidebar. Your toolbar band must drag the window. Use this for sidebar apps. |
"native" | A native Wayland app owns its GPU surfaces instead of sending SDK frames. The shell matches its window to the app with wayland_app_id. |
The size keys take the form "WxH", in points. They set the window size the way NSWindow content sizes do.
- window_size = "WxH"
- The initial content size.
- window_size = "fixed:WxH"
- A fixed size. The window cannot be resized or zoomed, like Calculator. A
fixed:value also overridesmin_sizeandmax_size. - min_size = "WxH"
- The smallest content size, like
contentMinSize. - max_size = "WxH"
- The largest content size, like
contentMaxSize. - wayland_app_id = "name"
- For
window = "native"only. The Waylandapp_idthe compositor reports for the app's windows.
Permissions
The permissions list says what the app may use. The packer rejects any name it does not know. The shell applies the policy when it launches the app and refuses to start an app with an unknown or invalid permission. Declare only what the app needs.
| Permission | What it allows |
|---|---|
network | The host network. Without it, the app runs in its own empty network namespace. |
storage | The local account's whole home folder. The shell does not narrow it to individual files. |
audio | The sound devices and the audio service. |
notifications | Sending notifications. |
documents | Asking for files through the shell's open and save panels. It grants no folder access. Each file arrives as a descriptor for the one file the user chose. |
keychain | Storing secrets with the shell. It grants no file access. |
remote-desktop | Reserved for the built-in Remote app. The shell refuses it for any other app ID. It also needs network and storage. |
The packer accepts camera and photos, but the shell has no policy for either one, and an app that declares either permission does not launch. Camera and photo access are Not yet available. Do not declare them.
An app always runs as the local user, not as root, and inside separate namespaces. A launch fails rather than falling back to fewer restrictions when the policy cannot be applied.
Default apps: handles and schemes
Declare the types your app opens and the URL schemes it handles. This is the BifrOSt equivalent of CFBundleDocumentTypes and CFBundleURLTypes in an Info.plist. The shell collects the declarations when it scans installed packages.
handles lists uniform type identifiers. Each entry may end with a rank after a colon: owner, default, alternate or none. Without a rank the entry is default. An entry with an unknown rank is ignored. none means the app can open the type but is never chosen for it by itself.
handles = ["public.png:owner", "public.text"]
schemes = ["https"]
A manifest's declarations take precedence over the shell's built-in table for the first-party apps. The user chooses the default for each family of types in General > Default Apps, and that choice wins over any rank.
Some parts of default apps are not yet available: opening a file from Files through the default app, the Open With menu, and routing a link by scheme. Until they are, the shell does not send files or links to an app from those places.
App Intents: the [[intent]] tables
An app can declare actions that the shell offers in Spotlight, like App Intents with AppShortcut in Apple's frameworks. Each action is a [[intent]] table. Declare the same intents in your app with the SDK, so the app can run them.
- id = "name"
- The intent's name. Use letters, digits,
-and_. The shell callsintent.<id>on the app's control socket. - title = "text"
- The name shown in Spotlight.
- description = "text"
- What the intent does.
- shortcut = true
- Offer the intent in Spotlight's Shortcuts section. Spotlight runs it only when it is marked as a shortcut, its ID is safe, and every parameter is optional.
- params = ["name:type", "name:type?"]
- The parameters. A trailing
?marks an optional parameter. The first-party apps usestringanddate.
[[intent]]
id = "new-note"
title = "New Note"
description = "Starts a new note in Notes."
shortcut = true
params = []
Keys inside an [[intent]] table belong to that intent. Other tables, such as [[log.subsystem]], are read by their own parsers and ignored here.
Versioning
Each release has one version. The same value appears in three places, and the tools check them against each other.
versioninmanifest.toml, in the formx.y.z.versionin the crate'sCargo.toml.tools/pc-app.pystops with “Cargo and app manifest versions must match” when the two differ.- A
## x.y.zheading inCHANGELOG.mdwith at least one note line that starts with-. The packer refuses a package without it.
Raise min_shell only when your app needs a newer shell. Leave it alone for changes that do not need one.
Build and publish an app with tools/pc-app.py. The publishing chapter covers the release steps.
A complete example
This manifest describes a sidebar app with one default-app declaration and one App Intent. The values are an example. The id must match the value your app returns from id().
# Identity. The id must match the app's id().
id = "is.example.journal"
name = "Journal"
version = "0.2.0" # CHANGELOG.md needs a "## 0.2.0" section with a note
summary = "Daily entries with search and reminders."
category = "Productivity"
architecture = "x86_64-linux" # required for PC apps
# How the shell starts the app. Paths are relative to the package.
exec = "bifrost-journal"
icon = "icon.png" # 180 x 180 PNG
min_shell = "0.5.4" # lowest shell that runs this version
kind = "app" # optional; "app" is the default
# The window. A sidebar app uses the full-size style.
window = "full-size"
min_size = "480x320"
# What the app may use. Declare only what it needs.
permissions = ["storage", "notifications"]
# Default-app declarations: the types it opens, and the URL schemes it handles.
handles = ["public.text:alternate"]
schemes = []
# An App Intent that Spotlight offers as a shortcut.
[[intent]]
id = "new-entry"
title = "New Journal Entry"
description = "Starts a new entry."
shortcut = true
params = []
Delete schemes = [] if the app opens no URLs. Omitting a key gives it the default described above.