关于
An open-source, offline-first Anki-compatible iOS flashcard client with sync server support, powered by the official Anki Rust backend via C FFI.
网站与应用开发可以做什么
- The real FSRS engine — scheduling, templates, search and sync are the upstream Rust code, not a reimplementation.
- Offline-first — everything works without a connection; sync when you have one.
- Any sync server — AnkiWeb or self-hosted, with a safe merge when collections diverge.
- Built-in EPUB reader — with offline Yomitan-compatible dictionary lookup, so cards come from what you are reading.
实测星标增长
- 24小时
- +1
- 7天
- +15
- 15天
- +32
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文Amgi
암기 (amgi) — Korean for "memorization"
An open-source, offline-first Anki-compatible iOS flashcard client with sync server support.
Amgi wraps the official ankitects/anki Rust backend via C FFI, giving you a native SwiftUI experience backed by the same battle-tested engine that powers Anki Desktop and AnkiDroid. Sync your decks with any compatible sync server (including self-hosted), study with FSRS scheduling, and keep your review history in perfect sync across all your devices.
Screenshots
Highlights
- The real FSRS engine — scheduling, templates, search and sync are the upstream Rust code, not a reimplementation.
- Offline-first — everything works without a connection; sync when you have one.
- Any sync server — AnkiWeb or self-hosted, with a safe merge when collections diverge.
- Built-in EPUB reader — with offline Yomitan-compatible dictionary lookup, so cards come from what you are reading.
- Beyond the phone — home-screen widgets, an Apple Watch app that runs the engine on-device, and Shortcuts/Siri actions.
- Image occlusion, card templates, FSRS simulator — the power-user surface, not a cut-down mobile client.
The full list is in Documentation/FEATURES.md.
Quick start
Install the toolchain first — Xcode 26, Rust (stable and nightly, for the
watchOS slice), protoc and Tuist (pinned in mise.toml).
Documentation/BUILDING.md has the exact
commands, plus how to run the tests.
git clone --recursive https://github.com/antigluten/amgi.git
cd amgi
./scripts/build-xcframework.sh # Rust engine → xcframework
./scripts/generate-protos.sh # protobuf → Swift types
mise install # install the pinned Tuist version
mise exec -- tuist install # resolve packages for native Xcode targets
mise exec -- tuist generate --path AmgiApp --no-open
open AmgiApp/AmgiApp.xcworkspace
Documentation
| Document | What it covers |
|---|---|
| Features | Everything the app does today |
| Building | Requirements, setup, build, tests, the watch target |
| Architecture | Layers, package layout, design decisions |
| Rust bridge | The C FFI seam, protobuf dispatch, the build pipeline |
| Data flows | Sync, study, browse, stats and widgets, RPC by RPC |
| Code style | Swift conventions and the module boundaries that matter |
| Contributing | Issues, branches, commits, pull requests |
| Changelog | What changed in each release |
AGENTS.md at the repo root routes a coding agent to a per-package guide
(AmgiFeatures/AGENTS.md, Sources/AGENTS.md, …) plus the reference notes in
agents/.
Architecture in one diagram
SwiftUI feature modules (AmgiFeatures)
|
@DependencyClient structs (AnkiClients)
|
Service facades (AnkiServices)
|
Typed protobuf requests (AnkiProtoBridge)
|
AnkiBackend (Swift wrapper)
|
C FFI (4 functions)
|
Rust dynamic framework (ankitects/anki rslib)
Swift owns the UI. Rust owns everything else — database, sync, FSRS scheduling, card templates, search, import/export, statistics.
Tech stack
- UI: SwiftUI with strict concurrency (Swift 6.2, language mode v6)
- Dependency Injection: swift-dependencies (
@DependencyClientstruct-closure pattern) - Backend: ankitects/anki Rust crate via C FFI
- Serialization: Protocol Buffers (25 .proto service definitions)
- Database: SQLite (owned by Rust backend)
- EPUB: vendored EPUBKit (MIT), with
hoshidictsfor Yomitan dictionaries - Build: Tuist generates the app, widget, watch, library and test targets from Swift manifests
License
This project is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0) because it incorporates ankitects/anki (copyright Ankitects Pty Ltd), which is also AGPL-3.0. See LICENSE for the full license text.
The AGPL requires that if you distribute this software or run it as a network service, you must make the complete source code available under the same license.
Contributing
Contributions are welcome. See CONTRIBUTING.md for guidelines, code style, and the development setup. A list of contributors is maintained in CONTRIBUTORS.md.
Acknowledgments
- Damien Elmes and the ankitects/anki contributors for the Rust backend that powers this app
- DreamAfar for the v0.0.3 fork that contributed Image Occlusion, the multi-theme system, the Settings tab, the card template editor, retrievability stats, tag management, the rich note editor, and the GitHub Actions IPA workflow
- AnkiDroid for pioneering the Rust backend bridge pattern on mobile
- Point-Free for swift-dependencies
探索相关项目
加载中…