- Kotlin 99.9%
- Nix 0.1%
| androidApp | ||
| composeApp | ||
| gradle | ||
| icons | ||
| iosApp | ||
| .gitignore | ||
| build.gradle.kts | ||
| default.nix | ||
| deps.json | ||
| flake.lock | ||
| flake.nix | ||
| gradle.properties | ||
| gradlew | ||
| gradlew.bat | ||
| README.md | ||
| settings.gradle.kts | ||
| updateNixMitm | ||
A digital DnD character sheet app
Spellbook
About
Spellbook is an application that allows users to keep track of their character's health, abilities, spells, spell slots, items and more in a simple and hopefully intuitive way. Spellbook can also be used as a simple searchable offline spell list for both 5e (2014) and 2024 spells.
Install Spellbook on your device
Searching Spells
A single word will be fuzzy matched against the spell name in-order, meaning that e.g. fball will show the Fireball spell
while something like abfll will not. Words separated by spaces can be matched in any order (so Acid Melf will match
Melf's Acid Arrow, but AcidMelf will not).
If you only want to search for content that matches the a word precisely (with no letters in between), you can prefix it
with ' (e.g. acid will match Antimagic Shield but 'acid will not).
You can also search the spell list using a number of specific queries. All queries have the form tag:search.
In particular, the name query can be accessed using the empty tag (such that writing :fball in the empty text field
is exactly equivalent typing fball). A query begins after each : and ends with the next tag that is followed by a :.
(this means that e.g. l:3 fball searches for spells with the level 3 fball (none) while l:3 :fball precisely matches the spell Fireball).
If you want a query to contain :, write ': instead. (e.g. word: Kill is exactly the same as word Kill but word': Kill only matches the e5 spell Power Word: Kill)
It is possible to repeat queries with the same tag.
In such a case, only spells that match both queries are shown (e.g. l:1 l:2 (see 'Level' below) will not match any spells
as there is no spell that is both of level 1 and level 2 simultaneously). Many queries also support the complementary
functionality with the syntax tag:search1|search2, which can be used to search for spells that match at least one of
tag:search1 or tag:search2 (for example, l:2|4|6|8 will show all spells of level 2, 4, 6 or 8).
- Level: You can use the tag
level,lvlor the shorthandlfollowed by a number to limit the search to spells of the given level. - Class: Use
class,learneror the shorthandcas a tag to filter for spells that can be learned by any class or subclass that matches the search (e.g.c:druid|arcane trickster c:sorcererwill match all spells that can be learned by both a sorcerer and either an Arcane Trickster Rogue or a Druid) - School: You can use the tag
school,schoolsor the shorthandsto filter for spells whose school (Conjuration, Abjuration, Evocation, Necromancy, Transmutation, Enchantment, Divination or Illusion) matches the searched word(s) - Description: Use
content,descriptionor the shorthanddas a tag to filter for spells that contain the searched word in their description. (Note: This tag does not support the|syntax, sod:a|bwill only match spells that contain anaand abin their description that are separated by a|)
Content Descriptions
Many text fields (like a character's language entry or a follower's traits, attacks, etc.) in Spellbook are so-called descriptions, this is a special type of text field that allows for the following annotations:
Marking text
- Bold: Writing
[[Text]]inside a description displays bold text - Italic:
[[Italic|Text]]results in italic text
Links
- Spell reference:
[[Spell|Spell Name]],[[5eSpell|Spell Name]]and[[2024Spell|Spell Name]]each produce a link to a 2024, 5e or 2024 spell of the nameSpell Name. The spell name must match exactly, including capitalization and special characters. - Weblink:
[[Website|https://git.phantomphoenix.ch/PhoenixPhantom/spellbook |Link]]will show the textLinklinking to the specified address.
Units
The annotations can also be used to specify units for values, using the notation [[Unit|Amount]],
where amount must be positive and has to be an integer unless otherwise specified. The use of unit annotation
allows the unit system to interact with the value such that the value is automatically expressed
according to the users units settings (and converted accordingly; e.g. [[Foot|5]] will be displayed
as 5ft. or 1.5m depending on the user's settings). The following units are supported:
- Distance
- Inch (allows floating point values (e.g. 0.1))
- Feet, Foot
- Miles (allows floating point values (e.g. 0.1))
- Weight
- Pounds
- Volume
- Gallons
Link to Spellbook Content
You can reference your Spellbook content using links of the form spellbook://Category/Object. Opening such a link
automatically takes you to the corresponding item in Spellbook. The following categories are supported:
- Spell: You can either use a spell link directly or use one of the subcategories to explicitly specify the spell's version. For example, spellbook://Spell/Fireball refers to the 2024 version of
Fireball- 2024, DnD2024 (e.g. spellbook://Spell/2024/Fireball)
- 5e (e.g. spellbook://Spell/5e/Fireball)
- Character (e.g. spellbook://Character/MyCharacter_name refers to a character with the name
My Character name) - Monster* (e.g spellbook://Monster/SomeMonster_name)
- Item* (e.g spellbook://Item/SomeItem_name)
- Encounter* (e.g. spellbook://Encounter/SomeEncounter_name)
* These links refer to categories that can only be viewed and edited if the DM Options setting is enabled.
Installation
For many targets, we provide recommended installation methods below, but you can always manually compile spellbook from source if the recommended methods either don't work for you or we don't yet provide a recommended method for your platform.
Android
For android, we recommend to use the .apk file from the newest release. The .apk should work on any phone running Android 7.0 'Nougat' (released in May 2016) or higher. Older versions of android are not officially supported by Spellbook.
iOS
No official builds - can be compiled from source.
To build and run the development version of the iOS app, use the run configuration from the run widget in your IDE’s toolbar or open the /iosApp directory in Xcode and run it from there.
Windows
For windows, we recommend to use the .msi installer from the newest release.
The installer has been tested on Windows 11 but should also work on at least Windows 10.
MacOS
Warning
The packaging for macOS is still in an experimental state. As on other platforms, you can also build spellbook from source.
For macOS, we recommend using nix to install Spellbook. Install with nix
Linux
For Linux, we also recommend the use of nix to install Spellbook. Install with nix
Nix
Nix is a package manager that can be used on any Linux distribution and on macOS and provides reproducability for builds. This greatly simplifies the testing required and makes it feasible to provide up-to-date packages for these platforms.
Spellbook provides both a flake and standard package, though the flake generally easier to use and thus recommended.
To use the Spellbook flake, add the following to the inputs of your flake.nix:
spellbook = {
url = "git+https://git.phantomphoenix.ch/PhoenixPhantom/Spellbook?ref=refs/tags/1.0.9-Beta";
inputs = {
nixpkgs.follows = "nixpkgs";
};
};
Then add spellbook to the available packages with nixpkgs.overlays = [ spellbook.overlays.default ];. This enables you to install spellbook as you would install any other application using nix (i.e. by adding pkgs.spellbook to your packages)
A simple working configuration for x86_64-linux could look like
# flake.nix
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11";
Spellbook = {
url = "git+https://git.phantomphoenix.ch/PhoenixPhantom/Spellbook?ref=refs/tags/1.0.9-Beta";
inputs = {
nixpkgs.follows = "nixpkgs";
};
};
};
outputs = {
nixpkgs,
Spellbook,
...
}:
let
system = "x86_64-linux";
in
{
packages."${system}".default = let
pkgs = import nixpkgs {
stdenv.hostPlatform.system = system;
overlays = [
Spellbook.overlays.default
];
};
in pkgs.symlinkJoin {
name = "My nix packages";
paths = [
pkgs.spellbook
];
};
};
}
This configuration can be run using nix profile install .# from the directory where the above flake.nix file is located.
Development version
Caution
Note that while the development version (
master) has the newest features and bugfixes, it has not undergone any testing and as such may sometimes break completely (possibly destroying saved data). Thus it is generally not reccomended to use this option unless you know what you are doing.
The instructions above show how to use nix flakes to install the latest release of Spellbook. To use the latest development version, you can simply replace refs/tags/1.0.9-Beta with master wherever it occurs in the instructions.
Build from Source
Note
We recommend using
jbr-21as the jdk, but any java 21 development kit should do. However, other jdk releases (including newer ones) are not guaranteed to work without issues.
From the Command Line
For manual compilation, you should have Gradle and a jdk option installed (see the above note on the use of jbr-21). Then, in the folder you extracted source code from the newest release to, run (on macOS or Linux):
./gradlew :composeApp:run
or (on Windows):
.\gradlew.bat :composeApp:run
to compile and run Spellbook.
Using an Editor
Instead of using the command line, you can also install JetBrain's IntelliJ IDEA. You should be able to open the folder from the extracted release data with IDEA. You should then install the relevant plugins. Kotlin Multiplatform, Jetpack Compose and Gradle should usually be everything you need.
You can then choose the desired build config in the dropdown on the top right, next to the green play symbol (Run) and the green bug symbol (Debug). To run the app on your desktop, composeApp [jvm] should be fine.
Then navigate to IDE and Project Settings (the gear symbol somewhere to the right of the dropdown), choose Project Structure and then Project Settings/Project. There, click the SDK dropdown, choose Add SDK and select Download JDK. In the following popup, set Version to 21 and choose JetBrains Runtime as the vendor. Then click download and ensure the dropdown shows something like jbr-21.
You can now exit the settings and run Spellbook by clicking the green play symbol (Run).