Skip to content

Automation

You can automate Alcove with Shortcuts on Mac and iPad, and with AppleScript on Mac.


Shortcuts

Alcove adds actions to the Shortcuts app, such as:

  • Open Book — opens a book in Alcove's reader
  • Show Book — selects a book in its library and shows its details
  • Search — searches your library (macOS 27 and iPadOS 27)

Open Book and Show Book also work with Siri: say "Read book title in Alcove" or "Show book title in Alcove".

In Shortcuts, find them under Alcove in the list of apps, or search for "Alcove". Choose the book when you add the action — the list shows books from the library open in Alcove, and typing part of a title or author searches the whole library — or pass one in from an earlier step.


AppleScript (Mac)

Alcove has a full AppleScript dictionary for automating imports, querying and updating metadata, managing tags and series, and controlling library operations.

Opening the Dictionary

In Script Editor, choose File → Open Dictionary… and select Alcove from the list of scriptable applications. The dictionary documents every object, property, and command.


Object Model

Object What it represents Elements
application The Alcove app —
document An open library book, tag, series
book A book in a library tag
tag A tag defined in a library book
series A series defined in a library book

The front document property on application returns the frontmost open library.

The selection property on document returns the currently selected books as a list and accepts a book or list of books to change the selection programmatically.


Commands

A few of the commands, to show what's possible:

Command Description
import books Import a file or folder of books into a library
read book Open a book in Alcove's reader, optionally at page "112" or at page "50%"
search book Search a book's text; returns the matches
look up metadata Look up a book's metadata
export archive Save a library as an .alcovex archive

There are many more, for libraries, books, tags, series, and cleanup. The dictionary lists them all.


Examples

List all books in the frontmost library

tell application "Alcove"
    tell front document
        set bookList to name of every book
    end tell
end tell

Get books by reading status

tell application "Alcove"
    tell front document
        set unread to every book whose reading status is "unread"
    end tell
end tell

Set a rating

tell application "Alcove"
    tell front document
        set rating of book "Dune" to 5
    end tell
end tell

Assign tags to a book

tell application "Alcove"
    tell front document
        set tag names of book "Dune" to {"Science Fiction", "Classic"}
    end tell
end tell

Create a new tag and assign it

tell application "Alcove"
    tell front document
        make new tag with properties {name: "To Read", color: "#FF5733"}
        set tag names of book "Dune" to (tag names of book "Dune") & {"To Read"}
    end tell
end tell

Set series name and position

tell application "Alcove"
    tell front document
        set series name of book "Dune" to "Dune Chronicles"
        set series index of book "Dune" to 1
    end tell
end tell

Get all books in a series

tell application "Alcove"
    tell front document
        set duneBooks to every book of series "Dune Chronicles"
    end tell
end tell

Import a folder of books

tell application "Alcove"
    tell front document
        set count to import books from POSIX file "/Users/me/Downloads/ebooks"
    end tell
end tell

Export a book file

tell application "Alcove"
    tell front document
        export book "Dune" to POSIX file "/Users/me/Desktop/Dune.epub"
    end tell
end tell

Export the library catalog

tell application "Alcove"
    tell front document
        export library to POSIX file "/Users/me/Downloads/Library Backup.json"
    end tell
end tell

Note: Due to App Sandbox restrictions, the export destination must be in ~/Downloads, ~/Desktop, or a location the user has previously granted access to.

Replace a cover from a file

tell application "Alcove"
    tell front document
        replace cover of book "Dune" from file POSIX file "/Users/me/covers/dune.jpg"
    end tell
end tell

Create a new library

tell application "Alcove"
    set newLib to create library named "Work Reading" syncing via icloud true
end tell

Reading Status Values

Use these tokens in scripts regardless of the app's display language:

Token Meaning
"unread" Not started
"reading" In progress
"read" Finished
"did not finish" Abandoned

Book Properties

Books have properties such as name, author, rating, reading status, series name, tag names and reader layout; most can be both read and set. The dictionary lists them all, with their types.