Skip to content
项目

关于

支持自行部署、以本地为先的网页存档应用。

网站与应用开发

这些数字如何统计

实测星标增长

24小时
0
7天
0
15天
0
1个月
正在收集历史

各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。

README.md

原文

HamsterBase

HamsterBase is a local-first library for saving and reading web pages. Libraries are end-to-end encrypted and can sync through any S3-compatible storage. This project contains the Web, macOS, Android, iOS and HarmonyOS apps and the folder library CLI.

Requirements

  • Node.js 22 or newer
  • pnpm 10.14.0
  • macOS with Xcode for the desktop and iOS apps, plus CocoaPods for iOS
  • JDK and Android SDK for the Android app
  • JDK and HarmonyOS Command Line Tools for the HarmonyOS app

Install

pnpm install --frozen-lockfile

Web

pnpm dev
pnpm build

pnpm build writes the web app to dist/, the Electron main process to dist-electron/ and the CLI to packages/cli/dist/.

The macOS, Android and iOS apps bundle libsimple and the Jieba dictionaries for local full-text search. You can rebuild the precompiled libraries for macOS, Windows, Linux, Android and iOS on a Mac. Supported architectures and build commands

macOS

pnpm electron:dev
pnpm electron:pack

pnpm electron:pack builds a local test DMG (ad-hoc signed, not notarized) for the current architecture in release/local/. Pass --arch arm64 or --arch x64 to choose the architecture.

pnpm electron:pack --release signs and notarizes the app and the DMG. It needs a Developer ID Application certificate in the keychain and notarization credentials in electronPackEnv.json or in environment variables with the same names:

  • APPLE_KEYCHAIN_PROFILE, a profile created with xcrun notarytool store-credentials, or
  • NOTARIZE_APPLE_ID, NOTARIZE_APPLE_ID_PASSWORD and NOTARIZE_APPLE_TEAM_ID.

Set CSC_NAME to pick a certificate when several are installed. The output is release/HamsterBase-<version>-darwin-<arch>.dmg.

Android

pnpm android:build
pnpm android:bundle

pnpm android:build builds a debug APK. pnpm android:bundle builds a release AAB and reads the signing key from the Gradle properties hamsterbaseSigningStoreFile, hamsterbaseSigningStorePassword, hamsterbaseSigningKeyAlias and hamsterbaseSigningKeyPassword.

iOS

pnpm ios:build
pnpm ios:archive

pnpm ios:build builds the app for the iOS Simulator. To run on a device or archive, copy ios/App/DevelopmentTeam.xcconfig.example to ios/App/DevelopmentTeam.xcconfig and set your Apple Developer Team ID.

HarmonyOS

With JAVA_HOME set to your JDK and the HarmonyOS Command Line Tools bin/ directory on your PATH, build the debug HAP from this directory:

pnpm harmony:build

The HAP bundles the mobile app in ArkWeb and uses a JSBridge for native file and network access. Install harmony/entry/build/default/outputs/default/entry-default-unsigned.hap on a running HarmonyOS emulator with hdc install -r. For DevEco Studio, run pnpm harmony:prepare first, then open harmony/ and run the entry module.

CLI

pnpm --filter @hamsterbase/cli build
node packages/cli/bin/hamsterbase.mjs --help

The CLI reads and edits folder libraries offline. Its agent skill is in packages/cli/skill/.

UI components

The app uses the published @hamsterbase/ui package. When packages/ui/ is present, it contains the source of the exact version listed in package.json.

License

HamsterBase is licensed under the GNU Affero General Public License v3.0 or later. See LICENSE. Third-party code under packages/hamsterbase-vendor/ keeps the license files in its own directory.

探索相关项目

加载中…