Skip to contents

These instructions require the development checkout containing install/; the maintenance tools described here have not yet been published in the repository distribution.

The source repository is private. Obtain an authorized clone before running these commands; the maintenance scripts do not clone repositories or configure credentials. The R package source is the clone’s lib/ directory.

Install a recorded package

The public entry is install/install.sh on macOS/Linux and install/install.ps1 on Windows. One operation installs the R package and the zot command together; supply a selected tarball with its adjacent .rds record to install that artifact instead of building lib/:

bash install/install.sh --library "/absolute/path/to/R/library" --prefix "/absolute/path/to/prefix" --tarball "/absolute/path/to/zot_<version>.tar.gz"
powershell -NoProfile -ExecutionPolicy Bypass -File install/install.ps1 -Library "C:\path to\R library" -Prefix "C:\path to\prefix" -Tarball "C:\path to\zot_<version>.tar.gz"

These entries install the selected R package, its missing runtime dependencies and the command. The prefix defaults to /usr/local, which is why the usual invocation is sudo bash install/install.sh; choose a writable prefix to install without privileges. There are no partial component modes. Keep the selected library visible to subsequent R sessions. The operations below prepare and check an artifact when starting from package source.

Prepare and install from source

Install R and make Rscript available. Source builds may require compiler tools and system libraries; building the manual requires LaTeX. These system prerequisites are separate from R package dependencies.

Choose a writable R library and a new build directory outside lib/. Replace every example path below with your chosen absolute path. Use the same R library throughout: R_LIBS_USER makes it visible to each new R process.

cd "/absolute/path/to/zot/lib"
R_LIBS_USER="/absolute/path/to/R/library" Rscript ../install/setup.R "/absolute/path/to/R/library"
R_LIBS_USER="/absolute/path/to/R/library" Rscript ../install/build.R "/absolute/path/to/new-build-directory"

setup.R prepares missing maintenance tools and the package’s development dependencies, including Suggests. It can install a needed incompatible dependency into the selected library; compatible visible dependencies are reused. It does not install zot itself.

build.R prints the source tarball path and SHA-256 and writes an adjacent .tar.gz.rds record. For version 0.1.2 the file is zot_0.1.2.tar.gz; use the actual path printed by the build if the version differs. Keep the tarball and its record together, then install that exact artifact:

R_LIBS_USER="/absolute/path/to/R/library" Rscript ../install/install.R "/absolute/path/to/new-build-directory/zot_0.1.2.tar.gz" "/absolute/path/to/R/library"

Installation checks the recorded hash, installs the package and needed runtime R dependencies, and verifies the installed version. It does not rebuild the checkout, run release checks, generate the website, or submit to CRAN.

After installation, R can load the package from any working directory. Keep the chosen library in R_LIBS_USER, or add it in the R session:

.libPaths(c("/absolute/path/to/R/library", .libPaths()))
library(zot)

Documentation and checks are separate

For source maintenance, document.R regenerates the roxygen-owned package documentation and checks spelling. Run it before building when documentation changes are intended, then review its source diff.

cran-check.R takes the exact tarball and a new check directory. It runs the local CRAN-style check and retains its logs and result in the artifact record. Run it separately from installation:

R_LIBS_USER="/absolute/path/to/R/library" Rscript ../install/cran-check.R "/absolute/path/to/new-build-directory/zot_0.1.2.tar.gz" "/absolute/path/to/new-check-directory"

Errors and warnings fail the check; NOTEs require review. A successful local check is neither a CRAN submission nor certification on other platforms. The checkout’s install/MAINTENANCE.md documents the maintenance and release steps.

Installed contents and optional components

install/ contains checkout maintenance tools; it is outside the package and is not installed with zot. Package runtime resources belong in lib/inst/. The installed R package does not depend on the sibling checkout directories.

The CLI is implemented. install/install.sh installs the zot command under the prefix, alongside the R package: the command is a generated launcher in PREFIX/bin/ that resolves the system’s current R and runs the payload in PREFIX/libexec/zot/. The zot command line vignette documents its verbs.

Python is optional and is used only by ztSemantic(). That operation needs the companion zotero-mcp-server Python environment and an existing compatible Chroma index. The R maintenance scripts do not install Python or create or refresh the index. See the external integrations article for its explicit path arguments and prerequisites.

The documentation website is built separately with pkgdown from lib/: articles come from lib/vignettes/ and the R reference from lib/man/. Installing the R package does not publish GitHub Pages.