[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-82748":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":8,"htmlUrl":8,"language":9,"languages":8,"totalLinesOfCode":8,"stars":10,"forks":11,"watchers":12,"openIssues":13,"contributorsCount":13,"subscribersCount":13,"size":13,"stars1d":14,"stars7d":15,"stars30d":16,"stars90d":13,"forks30d":13,"starsTrendScore":17,"compositeScore":18,"rankGlobal":8,"rankLanguage":8,"license":8,"archived":19,"fork":19,"defaultBranch":20,"hasWiki":21,"hasPages":19,"topics":22,"createdAt":8,"pushedAt":8,"updatedAt":23,"readmeContent":24,"aiSummary":25,"trendingCount":13,"starSnapshotCount":13,"syncStatus":26,"lastSyncTime":27,"discoverSource":28},82748,"rift","anomalyco\u002Frift","anomalyco",null,"Rust",566,11,4,0,1,62,252,10,73.24,false,"dev",true,[],"2026-06-12 04:01:38","> **Warning: Experimental repository**\n>\n> This repository is experimental and is not ready for use. We are exploring a variety of ideas here, and behavior, interfaces, and implementation details may change without notice.\n\nrift: better alternative to git worktrees\n\n- copy on write (saves space)\n- instant (\u003C 0.1s on 10gb folder)\n- fast cli\n- use as FFI lib with bun or node\n\nmac and linux+btrfs for now\nmore support soon\n\n## Install\n\n```bash\nnpm install -g rift-snapshot\n# or\nbun add -g rift-snapshot\n```\n\nRelease archives are available from [GitHub Releases](https:\u002F\u002Fgithub.com\u002Fanomalyco\u002Frift\u002Freleases\u002Flatest).\n\n## Platforms\n\n| Platform          | Backend                  | Behavior                                                           |\n| ----------------- | ------------------------ | ------------------------------------------------------------------ |\n| Linux x64         | Writable btrfs snapshots | `rift init` converts an ordinary directory into a btrfs subvolume. |\n| macOS arm64 \u002F x64 | APFS `clonefile`         | `rift init` registers the source directory.                        |\n| Windows x64       | None                     | The package is published; workspace creation is not implemented.   |\n\n## CLI\n\n### Initialize\n\n```bash\ncd ~\u002Fcode\u002Fapp\nrift init\n```\n\n`rift init` selects an existing Rift root above the current directory, or the nearest Git root when no Rift root exists. Use `--here` to initialize exactly the selected directory.\n\nOn Linux, first initialization of an ordinary btrfs directory performs a reflink import into a new btrfs subvolume and swaps it into the same path. If the selected root is registered already, no conversion occurs. If its `.rift` marker is missing, `rift init` restores it and completes any required conversion.\n\n### Create\n\n```bash\nrift create\nrift create --name parser-fix\nrift create --into \u002Ffast\u002Frifts\n```\n\n`rift create` searches upward for `.rift`, copies that managed workspace, records the immediate parent, and prints the new workspace path to stdout.\n\nOn Linux, it creates a writable btrfs snapshot. On macOS, it uses APFS `clonefile`.\n\nWhen the workspace is a Git repository, the new workspace has detached `HEAD` and retains index and working-tree state.\n\n### List And Ancestors\n\n```bash\nrift list\nrift ancestors\n```\n\n`list` prints direct active child workspaces. `ancestors` prints parent workspaces, nearest first.\n\n### Remove And Garbage Collection\n\n```bash\nrift remove                         # trash the current created rift subtree\nrift remove -f ~\u002Fcode\u002Fapp           # unregister a source root\nrift remove --children ~\u002Fcode\u002Fapp   # trash descendants, preserve the selected workspace\nrift gc                             # physically delete trash and prune missing entries\n```\n\nRemoving a created rift moves its active subtree into adjacent `.trash` storage. `rift gc` deletes that storage later.\n\nRemoving a source root requires `-f` in the CLI. The source directory remains on disk. Its `.rift` marker is removed. Existing registered descendants are moved into trash. Missing descendants are removed from the registry.\n\n### Shell Integration\n\n```bash\neval \"$(rift shell-init zsh)\" # or bash\n```\n\nThe shell wrapper changes directory after `init` conversion, `create`, or removal of the current created rift.\n\n## Storage\n\nEach managed workspace has a `.rift` marker containing its identifier. An SQLite registry stores paths, parent identifiers, and trash entries.\n\nDefault created-workspace storage is adjacent to the registered source root:\n\n```text\n~\u002Fcode\u002Fapp\u002F                         source workspace\n~\u002Fcode\u002F.rifts\u002Fapp\u002Fparser-fix\u002F       created workspace\n~\u002Fcode\u002F.rifts\u002Fapp\u002F.trash\u002F            removed workspace storage\n```\n\n## JavaScript API\n\nThe package selects a Bun or Node FFI binding through conditional exports.\n\n```ts\nimport { create, list, remove, gc } from \"rift-snapshot\";\n\nconst workspace = create({ from: process.cwd(), name: \"schema-work\" });\nconsole.log(list({ of: process.cwd() }));\nremove({ at: workspace });\ngc();\n```\n\n### Node.js\n\nThe Node binding requires the experimental FFI API in Node.js 26.1 or later:\n\n```bash\nnode --experimental-ffi app.mjs\n```\n\nWith Node's permission model, also pass `--allow-ffi`.\n\n### Functions\n\n```ts\ninit(options?: { at?: string; database?: string }): null\ncreate(options?: { from?: string; name?: string; into?: string; database?: string }): string\nremove(options?: { at?: string; all?: false; database?: string }): void\nremove(options: { at?: string; all: true; database?: string }): string[]\nlist(options?: { of?: string; database?: string }): string[]\nancestors(options?: { of?: string; database?: string }): string[]\ngc(options?: { database?: string }): string[]\n```\n\nThe JavaScript `init` function initializes exactly `at`; Git-root selection and `--here` are CLI behavior.\n\nOperation failures throw `RiftError` with a `code` and, when relevant, `path`.\n\n## Development\n\n```bash\ncargo test --workspace --locked\n.\u002Fscripts\u002Finstall.sh\n```\n\n`scripts\u002Finstall.sh` installs an optimized CLI binary to `${CARGO_HOME:-$HOME\u002F.cargo}\u002Fbin\u002Frift`.\n\n### Benchmark\n\nBenchmark a single real `rift create` operation against a directory:\n\n```bash\ncargo bench --bench create -- \u002Fpath\u002Fto\u002Flinux\n```\n\nThe benchmark initializes the supplied directory before timing, times only creation of the new rift, and then removes the created workspace outside the measured interval. On first use, initialization of an ordinary Linux btrfs directory converts it into a subvolume before measurement. The benchmark uses the production filesystem strategy, so results on macOS measure APFS cloning and results on Linux require and measure btrfs snapshots.\n\nEstablish a baseline by measuring multiple independent rift creations and writing an aggregate machine-readable result file. Keep results outside the source workspace so they do not alter future measurements:\n\n```bash\ncargo bench --bench create -- \u002Fpath\u002Fto\u002Flinux --samples 10 --output \u002Fpath\u002Fto\u002Fresults\u002Fbaseline.json\n```\n\nThe JSON result includes each timing sample and the median, minimum, and maximum elapsed time. A future experiment loop can run the same command in candidate workspaces and compare their median results to this baseline.\n\nCompare multiple candidate `rift` code workspaces that contain this benchmark target:\n\n```bash\ncargo bench --bench compare -- \u002Fpath\u002Fto\u002Flinux \\\n  --candidate \u002Fpath\u002Fto\u002Frift-baseline \\\n  --candidate \u002Fpath\u002Fto\u002Frift-candidate-a \\\n  --candidate \u002Fpath\u002Fto\u002Frift-candidate-b \\\n  --samples 10 \\\n  --output \u002Fpath\u002Fto\u002Fresults\u002Fcreate-run-01\n```\n\nThe comparison runner invokes each candidate's optimized `create` benchmark against the same workload, writes `candidate-01.json`, `candidate-02.json`, and so on, then writes `summary.json` with candidates ranked by median creation time. Include the unchanged workspace as one candidate when you need a baseline in the ranking.\n\n## License\n\nMIT\n","rift 是一个实验性的项目，旨在提供比 Git worktrees 更优的解决方案。它采用写时复制技术来节省空间，并能在不到0.1秒内对10GB文件夹进行操作，具有快速的命令行界面。rift 支持通过 FFI 与 Bun 或 Node.js 集成。当前支持 macOS（使用 APFS `clonefile`）和 Linux（使用 btrfs 快照），未来将增加更多平台支持。适用于需要高效管理和快速切换多个工作区的开发场景。请注意，此项目仍在试验阶段，行为、接口及实现细节可能会随时更改。",2,"2026-06-11 04:09:07","CREATED_QUERY"]