npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

svartz

v2.3.0

Published

Svartz CLI for building static Obsidian vault sites.

Readme

svartz

svartz builds and serves configured vaults through SvelteKit. It uses an existing SvelteKit app at the config root, or the repository's apps/web shell.

It loads svartz.config.ts, resolves the selected vault, injects @svartz/vite into the app build, and prepares a vault-scoped workspace under .svartz/vaults/<vaultId>/.

Commands

svartz init
svartz build
svartz build --vault docs
svartz build:all
svartz dev --vault docs

svartz build now builds every configured vault sequentially.

Parallel CLI processes also share a project build lock. A crashed build's lock recovers automatically on the next build. If a crash occurs during the brief recovery step, the CLI names the abandoned .svartz/.vault-build.lock.recover guard. Check that no Svartz build is running before removing that guard and retrying.

npx svartz@latest init initializes the directory where it runs. A new project gets an editable SvelteKit shell, a vault/index.md starter note, the minimal theme dependency, and svartz.config.ts. It installs with npm unless an existing package manager is declared. It initializes Git for a new standalone project unless already inside a Git worktree. --no-install and --no-git skip those steps.

In an existing SvelteKit app, init keeps routes, layouts, adapter, and existing scripts. It adds Svartz dependencies and scripts, wraps the existing Vite export with withSvartzHost, and preserves any existing Svartz config and vault definitions. It adds the published Vite virtual-module type reference to src/app.d.ts while preserving host declarations. The wrapper supplies virtual-module aliases and adds Tailwind when the host has no Tailwind plugin. The generated catchall imports the CSS entry that scans the packed theme and UI components. If a file cannot be safely integrated, init reports the conflict before writing.

Rerun npx svartz@latest init after upgrading a scaffolded host. It updates the older virtual-module type reference and only exact older generated route/layout files; custom files remain yours.

Use svartz build --vault <id> to target one standalone vault. A SvelteKit host always builds all configured host vaults together, because they share one Vite build and adapter output.

Turbo task sync

For the repository shell, the CLI syncs a managed Turbo/package surface at the config root:

  • package.json scripts: svartz:build, svartz:build:<vault-id>, svartz:dev:<vault-id>, svartz:preview:<vault-id>, plus svartz:dev/svartz:preview fan-out scripts.
  • turbo.json tasks: //#svartz:build, //#svartz:build:<vault-id>, //#svartz:dev:<vault-id>, and //#svartz:preview:<vault-id>.

The CLI only rewrites those managed svartz:* / //#svartz:* entries, so existing non-Svartz scripts and Turbo tasks stay untouched.

After initialization, build and dev leave the host's package.json, turbo.json, routes, Vite config, adapter, and .svelte-kit alone. Set target: { type: "host" } on each mounted vault. Host commands compose only host-target vaults, so standalone targets in the same config stay separate. The host's adapter controls its final output, and its route files continue to take precedence. The host can import virtual:svartz/host to select published vault data. A custom route rendering SvartzRuntimePage awaits prepareHostVault in universal load, after removing SvelteKit's deployment base from the pathname. Import virtual:svartz/tailwind-sources.css in that custom route to load Svartz theme utilities. The generated catchall already does both; @svartz/ui has the loader example.

Per-Vault Workspace Contract

For a vault like docs, the CLI now prepares:

.svartz/vaults/docs/
├── .svelte-kit/   # SvelteKit internal dev/build state for this vault only
├── artifacts/     # generated Svartz runtime modules and page artifacts
├── dist/          # final adapter output for static builds
└── node_modules   # symlink to apps/web/node_modules for isolated prerender output

The repository shell keeps parallel vault builds from sharing apps/web/.svelte-kit. Existing hosts keep their own .svelte-kit and adapter output; Svartz only creates the vault-scoped artifacts and dependency bridge.

Build Env Passed To apps/web

The CLI derives and sets:

  • SVARTZ_OUT_DIR
  • SVARTZ_KIT_OUT_DIR
  • SVARTZ_BASE_PATH
  • SVARTZ_TARGET_TYPE
  • SVARTZ_THEME_MODULE_PATH
  • SVARTZ_ARTIFACTS_MODULE_PATH
  • SVARTZ_HOST_MODULE_PATH for the generated host registry, including single-vault builds
  • SVARTZ_TAILWIND_SOURCES_PATH

For provider-style targets that rely on adapter-auto, the CLI also sets the matching platform environment variables for the selected vault before invoking Vite.