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

@silo-code/git-api

v0.6.0

Published

Published types for Silo's silo.git provider — GitAPI plus the live GitRepoStore watch session, consumed via ctx.getExtension("silo.git").

Readme

@silo-code/git-api

Published types for Silo's silo.git provider: the one-shot GitAPI (status, diff, commit, branches, remotes, worktrees, …) and the live GitRepoStore watch session (GitAPI.watchRepo). Import types from this package at build time; retrieve the live implementation at runtime through @silo-code/sdk's ctx.getExtension.

Install

npm i -D @silo-code/git-api

Install it as a devDependency — you need it to compile, not to ship.

Do not mark it external. Unlike @silo-code/sdk and react, this package is not one of the modules the Silo host hands to a loaded extension (SHARED_DEPS is react, react/jsx-runtime, @silo-code/sdk — nothing else). An external bare import … from "@silo-code/git-api" survives into your bundle with nothing to resolve it, and the extension fails to load. Leave it bundled: the type-only imports erase to nothing, and the one runtime export (NULL_GIT_REPO_STORE, a small null-object literal) inlines. The real implementation still arrives at runtime through ctx.getExtension("silo.git") — that's unaffected either way.

@silo-code/sdk is a peer dependency (>=0.34.0, a floor only — the same additive-only shape silo.engine uses), not a hard one: the only thing this package takes from the SDK is two types (Disposable, Event). Depending on it directly would pin an exact SDK version into every consumer's tree and give them a second, older nested copy to resolve those types out of. You already depend on the SDK yourself, and that copy is the one that gets used.

Usage

import type { GitAPI } from "@silo-code/git-api";
import { NULL_GIT_REPO_STORE } from "@silo-code/git-api";
import { useServiceState } from "@silo-code/sdk";

const git = ctx.getExtension<GitAPI>("silo.git")?.api;
const repo = git?.watchRepo(folder) ?? NULL_GIT_REPO_STORE;
const { status, worktrees } = useServiceState(repo);

Which Silo version ships which member

GitAPI is implemented by silo.git, which is bundled into the Silo app — so the version that matters at runtime is the host's, not this package's. A newer @silo-code/git-api in your devDependencies will happily typecheck against a member the running host has never heard of; the failure lands at runtime as api.newThing is not a function.

Declare the floor in your extension's manifest so Silo can warn the user:

{ "silo": { "id": "you.your-extension", "engine": "^0.50.0" } }

| @silo-code/git-api | First Silo release | Added | | -------------------- | ------------------ | -------------------------------------------------- | | 0.4.0 | 0.50.0 | remotes, GitRemote | | 0.3.0 | 0.49.0 | lockWorktree, unlockWorktree | | 0.2.0 | 0.47.0 | watchRepo, GitRepoStore, NULL_GIT_REPO_STORE |

This package releases independently of the app, so a version can sit on npm for a while before any Silo release implements it — 0.3.0 sat on npm from 0.48.0 until 0.49.0 exactly that way. Check this table, not npm's "latest", when picking your engine floor.

Note what silo.engine does and doesn't do: it's advisory. An incompatible extension shows a warning at install and in the extensions list, but the user can still install it, and the host still loads it. If you want a newer member without hard-breaking users on an older host, feature-detect it and keep a fallback:

const git = ctx.getExtension<GitAPI>("silo.git")?.api;
const remotes =
  typeof git?.remotes === "function"
    ? await git.remotes(folder)
    : await legacyRemotesViaExec(folder);

See ADR 0009 and ADR 0037 in silo-code/silo for the rationale.