Skip to content

Local packages

Publishing makes a version of your reusable definitions available to other documents through an @local import. It does not publish a public template. In an open project, the dialog separates Publish, This project, and My library so each task has its own view.

Keep shared definitions in a source project, then choose File → Publish & manage packages… in the editor. Local packages in the account menu opens the same tools. The dialog opens on Publish. Choose a lowercase name, a version such as 1.0.0, and the entry point that exports the definitions. Choose Publish to My library. Expand What publishing does when you need to review how snapshots are affected.

In a server account, open the destination document you own. Switch to My library, select the package from the list, then choose Add to this project… on the required version. Review every package in the dependency list, then choose Add reviewed packages. This copies their files and assets into the document, where collaborators and connected tools can read them. Cancel adds nothing.

Review showing the selected style and its helper dependency before adding them to a project

The document can then import it:

#import "@local/tylor-guide:1.0.0": *

This example works after you publish and add a package with that name and version. Device-local projects can still use their browser’s library directly. The screenshot below shows an example library with its package list and the selected version’s actions.

My library with a searchable package list, selected school-style version, and reference count

Search by package, version, or document name to find a dependency. Select a package in the list to inspect its versions and actions. Expand Used by to open a document or see another library package that imports the selected version. The summary shows only reference types with a nonzero count. On a narrow screen, scroll the short package list and inspect the selected package below it.

My library holds reusable account-wide packages in server mode, or browser-local packages in local mode.

Looking for a package created by ChatGPT? Open its document, then choose Account → Local packages…. Switch to This project to see its snapshots. The dashboard’s Local packages view shows only My library.

This project holds independent package snapshots attached to a document, including packages restored from a build bundle. In server mode, these are the only local packages the document can use. An import line alone cannot read My library. Local-mode bundle imports keep snapshots in this browser, where a matching snapshot takes precedence over the device library. Updating My library does not replace project snapshots.

Existing server documents: if an import stops resolving after this security update, the owner must use Add to this project… for the intended versions. Existing references are not approved automatically. This applies to browser, CLI/API exports, copies, backups, and ChatGPT. CLI users can review and attach a version with tylor pkg project add <documentId> <name> <version>, then repeat the command with --revision set to the reviewed fingerprint. Use tylor pkg project list <documentId> to check the result.

Approval is online and counts toward the document owner’s storage. If package contents change after review, reopen the review. A different existing snapshot stops the operation; publish a new library version to add, or use Open to edit on the existing snapshot. Missing dependencies and quota failures add nothing. All listed dependencies must exist in My library for this attachment flow, even if the project has a differently edited version.

This project view showing the approved kids-slides snapshot with Open to edit and Remove from project controls

To remove a version you no longer use, open This project and select Remove from project beside that exact version. Confirm the removal. Tylor refuses it while a saved project file or another attached package still contains an import of that version; remove those references first. This removes only the project’s snapshot, leaving My library unchanged. Unsaved edits may still refer to it, so save and check the document before removal. In the CLI, tylor pkg project rm <documentId> <name> <version> previews the target; repeat with --yes to remove it.

When editing a package source, save your changes and then publish explicitly. Republishing the same library version replaces it in My library; existing server documents keep their approved snapshots. Use a new version and add it to the destination project when you want to upgrade, or publish edits directly to that project’s snapshot.

Under This project, choose Open to edit. Tylor opens the package’s source project. After saving your edits, reopen Local packages and choose Publish to copied project to update that document’s snapshot. The destination is named above the controls.

Publish view for a copied package source, with the destination, name, version, entrypoint, and action visible

Use Add these packages to My library when you also want to reuse the snapshots elsewhere. Review any confirmation before replacing an existing library version.

Opening a document prepares its packages once. Changing an @local import refreshes packages after a short pause, with another check when queued changes finish saving. Publishing packages and reconnecting also refresh dependencies. An unchanged open does not trigger a second timed download. Reopening a document in the same tab can reuse unchanged packages after the server checks your access and their current contents. Updating a project snapshot refreshes those contents on the next check; library replacement does not. The memory cache holds up to eight document registries, with an 8 MiB text budget, and entries expire after five minutes without successful validation. Reloading or changing accounts clears it; large registries may need to download again. This is not an offline package cache: unavailable dependencies can still show a loading error; reconnect and use Retry when needed.

In a document shared with you, choose File → Document packages…. The dialog lists Packages used by this document, resolved from its approved snapshots. Your personal library is shown separately. Only the owner can approve library packages for this document; editing its imports does not grant extra access.

Only the owner can publish the original document as a package. Choose Make a personal copy… in the dialog to create an independent document, then use File → Publish & manage packages… in your copy. A package-loading error is shown explicitly; an empty personal library does not mean the shared document has no dependencies.

Shared documents use their approved package snapshots. A collaborator’s identically named library package does not replace them. Personal copies preserve referenced snapshots so the copy can stand on its own. A missing or unapproved dependency stops copying and must be resolved by the owner first.

Choose Export all in My library to download all library packages as a ZIP backup. Use Import ZIP to restore that archive or bring your reusable styles into another account.

If a package name and version already exist, choose Keep existing or Overwrite for each conflict, then Apply. Overwriting changes My library; server project snapshots stay independent. Device-local documents using the library directly receive the replacement.

This export covers My library. For independent This project snapshots, use a submission snapshot or folder backup to preserve the document and its dependencies together.

With a server account, you can find versions that no saved document or library package references:

  1. Save your documents and let pending changes sync.
  2. Open Local packages and choose Export all to keep a backup.
  3. Enable Unused only under My library. You can also search by package or document name. Expand How package usage is counted for the limits of this filter.
  4. Check each candidate. Clear the filter and expand Used by to see documents or other packages that still use it.
  5. Choose Delete version and review the confirmation before deleting.

References include saved shared work, documents in Trash, and discoverable indirect dependencies. Computed import names and unsynced edits may be missed; literal examples may also count as references. No references found is a useful cleanup signal, not a guarantee that a version is unnecessary. If usage is unavailable, reopen the dialog before deciding what to remove.

Deleting a library version leaves independent project snapshots and archives intact. Unapproved server projects cannot add that version until it is restored with Import ZIP. Device-local documents using it directly need it restored or their imports updated.

Use library backups with the CLI to export My library packages and fonts to a dedicated Git repository. The guide covers config.json, tylor sync, and restoring existing versions. Publish source edits to My library before exporting if you want those changes in the backup.