Repository navigation
Split the sandfs library out of the command - #167
Merged
Merged
Conversation
Everything the command does moves into a new `sandfs` crate with a typed API (`sandfs::Home` and its methods), so programs can mount, fork, list changes and update workspaces without running `sandfs`. sandfs-cli becomes argument parsing and printing over it. A program that embeds sandfs calls `sandfs::handle_relaunch(prefix)` first in `main`, and sandfs runs it again, with that prefix, to serve mounts, answer git's file monitor and confine shells. Nothing changes for `sandfs` users. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01CboUL9BU7nvDEZKfQBSkkq
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01CboUL9BU7nvDEZKfQBSkkq
This was referenced Oct 26, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Everything the
sandfscommand does moves into a newsandfscrate with a typed API, so a program (Graft first) can mount, fork, list changes and update workspaces withoutsandfsinstalled.sandfs-clibecomes argument parsing and printing over it. Nothing changes for people runningsandfs.What moved
crates/sandfs-cli/src/{copy,fs,git,github,host,mcp,nfs,nfsserve,persist,server,shell,store,update}moved unchanged (git mv) tocrates/sandfs/src/. The command logic that lived in the CLI'smain.rsis nowcrates/sandfs/src/ops.rs, returning values instead of printing.main.rskeeps clap and the output formats.Public API (core API change)
Options (all
Default):MountOptions { name, read_only, foreground },ForkOptions { name, read_only, branch, foreground },ChangesOptions { paths, since, copy_to, force },ServeOptions { name, read_only }.Results:
Mounted { name, dir },Forked { name, from, dir },Changes { changes: Vec<Change { kind, path }>, held_back, git_settings },Updated,WorkspaceInfo { name, source, mounted },Cleaned { repository, outcome: Deleted | Shrunk | Kept }, andChangeKindre-exported fromsandfs-core.Running the program again
sandfs used to run
sandfs daemon,sandfs shell-execandsandfs git-fsmonitor(hidden commands) to serve mounts, confine a shell on macOS and answer git's file monitor. It now runs the current program with the embedder's prefix first:sandfspasses&[], so its commands are unchanged; Graft passes&["sandfs"]and gets run asgft sandfs daemon --serve.handle_relaunchserves those runs and exits, or returns. The git fsmonitor hook written into git mounts carries the prefix words too. Both the mount process and the hook are givenSANDFS_HOME, so a home fromHome::atreaches them.Checks
cargo fmt --check, workspace clippy-D warnings(also--no-default-featuresandaarch64-apple-darwin),cargo doc,cargo package -p sandfs.cargo test -p sandfs -p sandfs-cli: 122 unit, 15 CLI, 34 mount tests, 1 doctest.crates/sandfs/examples/embed.rsis a program with its own commands that mounts a fork of a folder, writes to it, lists changes and deletes it; run on Linux, its mount was served byembed sandfs daemon --serve.sandfsinstalled.CI runs
-p sandfsin clippy, tests and the no-default-features build; release.yml's nfsserve license path follows the move. Changelog has an Unreleased entry.🤖 Generated with Claude Code
https://claude.ai/code/session_01CboUL9BU7nvDEZKfQBSkkq