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

@appilot-labs/appilot-headless

v1.3.0

Published

Appilot headless core — SQLite store + scheduler lease, transport-agnostic; shared scheduled jobs. Embedded by Electron / DSH / CLI / MCP shells.

Downloads

921

Readme

@appilot-labs/appilot-headless

共享数据与调度核心:单一 SQLite(appilot.db,WAL)+ 实例任务引擎 + 基于租约的单主调度。所有 Appilot 壳读写同一数据库、执行同一批任务实例。

亮点

  • 单一共享库 — 默认路径 ~/Library/Application Support/Appilot/appilot.db (可用 APPILOT_DB_FILE 覆盖);WAL + busy_timeout 保证多进程安全
  • store 命名空间 — projects、products、snapshots、tasks、lease、 meta(repo 状态)、releaseCache
  • 稳定项目身份 — schema v14 以 projects.id 为主键;名称只是唯一展示名, 改名无需重写关联行
  • 租约单主 — acquire / heartbeat / release;心跳新鲜度决定接管;同 id 互斥 防双 daemon;TTL 窗口由调用方传入(各壳统一 60s)
  • 实例任务引擎 — DB 中 kind + instance 行(github-sync / rank…)由租约主通过 注册执行器运行;内置 403/429 限流退避与执行并发上限
  • 查询服务 — createHeadlessService 提供只读视图(任务、rank 进度…)
  • 旧版迁移 — importLegacyRegistry 一次性导入旧 JSON 注册表

安装

npm i @appilot-labs/appilot-headless

用法

import { openStore, defaultDbPath } from '@appilot-labs/appilot-headless';
const store = openStore(process.env.APPILOT_DB_FILE || defaultDbPath());

store.lease.acquire('worker', 60_000);           // 成为主
store.lease.heartbeat('worker');                 // 主持续续租
store.projects.save({ id: 'demo-id', name: 'demo', path: '/x', githubUrl: null, platform: 'ios',
  languages: ['en'], lastResolvedAt: new Date().toISOString(), artworkUrl: null,
  updatedAt: new Date().toISOString() });
store.tasks.upsert({ id: 'github-sync:demo-id', title: 'GitHub 发布同步', intervalMinutes: 60,
  lastRunAt: null, nextRunAt: new Date().toISOString(), lastStatus: 'never',
  lastSummary: null, runCount: 0, source: 'worker', kind: 'github-sync',
  instance: { projectId: 'demo-id', projectName: 'demo', path: '/x' } });
store.snapshots.add([{ projectId: 'demo-id', projectName: 'demo', productId: 'x:ios', keyword: 'kw',
  language: 'en', storefront: 'us', rank: 1, totalResults: 9,
  checkedAt: new Date().toISOString() }]);
store.lease.release('worker');
store.close();

CLI:@appilot-labs/appilot-headless-cli。

相关

  • @appilot-labs/appilot-scheduler — 驱动本引擎的常驻守护进程
  • 仓库文档:docs/headless-architecture.md、docs/architecture-scheduler-daemon.md