MCPcopy Index your code
hub / github.com/arxanas/scm-record

github.com/arxanas/scm-record @v0.10.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.10.1 ↗ · + Follow
289 symbols 822 edges 16 files 50 documented · 17%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

About

Build status Latest version Docs License

scm-record is a Rust library for a UI component to interactively select changes to include in a commit. It's meant to be embedded in source control tooling.

You can think of this as an interactive replacement for git add -p, or a reimplementation of hg crecord/hg commit -i. Given a set of changes made by the user, this component presents them to the user and lets them select which of those changes should be staged for commit.

The scm-record library is directly integrated into these projects:

  • git-branchless: the git record -i command lets you interactively select and commit changes.
  • Jujutsu: as the built-in diff editor; see the ui.diff-editor configuration option.

Standalone executable

scm-diff-editor is a standalone executable that uses scm-record as the front-end. It can be installed via cargo:

$ cargo install --locked scm-diff-editor

The scm-diff-editor executable can be used with these tools:

Future work

Feature wishlist

Here are some features in the UI which are not yet implemented:

  • [ ] Make the keybindings easier to discover (https://github.com/arxanas/scm-record/issues/25).
  • [ ] Support accessing the menu with the keyboard (https://github.com/arxanas/scm-record/issues/44).
  • [ ] Edit one side of the diff in an editor (https://github.com/arxanas/scm-record/issues/83).
  • [ ] Multi-way split UI to split a commit into more than 2 commits (https://github.com/arxanas/scm-record/issues/73).
  • [ ] Support for use as a mergetool.
  • [ ] Commands to select ours/theirs for diffs representing merge conflicts.

Integration with other projects

Here's some projects that don't use scm-record, but could benefit from integration with it (with your contribution):

Extension points exported contracts — how you extend this code

Component (Interface)
A component which can be rendered on the virtual canvas. All calls to draw components are traced so that it can be deter [14 …
scm-record/src/render.rs
Filesystem (Interface)
Abstraction over the filesystem. [3 implementers]
scm-diff-editor/src/lib.rs
RecordInput (Interface)
Get user input. [2 implementers]
scm-record/src/ui.rs
UsizeExt (Interface)
(no doc) [1 implementers]
scm-record/src/util.rs
IsizeExt (Interface)
(no doc) [1 implementers]
scm-record/src/util.rs

Core symbols most depended-on inside this repo

event
called by 135
scm-record/src/ui.rs
run
called by 43
scm-record/src/ui.rs
unwrap_isize
called by 34
scm-record/src/util.rs
draw_component
called by 28
scm-record/src/render.rs
mask_rect
called by 23
scm-record/src/render.rs
apply_changes
called by 21
scm-diff-editor/src/lib.rs
process_opts
called by 19
scm-diff-editor/src/lib.rs
is_empty
called by 12
scm-record/src/render.rs

Shape

Method 130
Function 92
Class 41
Enum 21
Interface 5

Languages

Rust100%

Modules by API surface

scm-record/src/ui.rs104 symbols
scm-record/tests/test_scm_record.rs46 symbols
scm-record/src/render.rs41 symbols
scm-diff-editor/src/lib.rs32 symbols
scm-record/src/types.rs20 symbols
scm-diff-editor/src/testing.rs11 symbols
scm-diff-editor/tests/test_scm_diff_editor.rs9 symbols
scm-diff-editor/src/render.rs8 symbols
scm-record/src/helpers.rs7 symbols
scm-record/src/util.rs6 symbols
scm-record/examples/load_json.rs2 symbols
scm-record/examples/static_contents.rs1 symbols

For agents

$ claude mcp add scm-record \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact