Stacks

Self-review Your Working Diff Before Committing in Erlang with Atlas in 2026

Updated 8 min read

Erlang developers in 2026 can catch their own mistakes in uncommitted diffs before they reach a reviewer or CI by leveraging Atlas's terminal-native AI capabilities alongside the familiar `rebar3` build tool, `rebar3 eunit` test runner, and `erlfmt` formatter. Atlas integrates directly with your Erlang/OTP system, providing a comprehensive review workflow that surfaces every change and allows for precise corrections.

How to Generate and Review Your Erlang Working Diff with Atlas

In 2026, Erlang developers using Atlas can efficiently review their uncommitted changes by first generating a comprehensive diff with bash. This initial step ensures visibility into every modification across the `rebar3` project, preventing overlooked alterations before they reach a reviewer or CI.

Atlas empowers Erlang developers to produce and scrutinize their working diffs directly within the terminal. Instead of relying on memory for touched files, Atlas can execute `atlas bash --command 'git diff'` to generate a complete, unified diff of all uncommitted changes across your `rebar3` application. This command provides a holistic view, ensuring that no subtle change in a `src/my_module.erl` file or an update to `rebar.config` is missed. Atlas then uses its `read` tool to ingest this diff, allowing you to navigate and inspect every line. This process is crucial for Erlang systems where changes in one `gen_server` module might have cascading effects on a `supervisor` tree, making a full diff review indispensable before any commit is staged.

Inspecting Erlang File Changes and Context with Atlas

Every Erlang file change should be reviewed in its full context, not just as isolated diff lines, a practice Atlas facilitates in 2026. A modification to a `handle_call` clause in `src/my_server.erl` might appear minor in a diff, but its impact on surrounding logic is critical.

Atlas allows Erlang developers to read each changed file in full, providing the necessary context that a raw diff might obscure. After identifying modified files through the `git diff` output, Atlas can use its `read` tool to display the entire content of files like `src/my_module.erl` or `test/my_suite.erl`. This capability is vital for Erlang/OTP applications, where the interplay between modules, `gen_server` callbacks, and `supervisor` specifications is complex. By reviewing the complete file, you can verify that your changes align with the module's overall design, that new functions integrate correctly, and that no unintended side effects are introduced. Atlas's ability to index code by AST declarations using tree-sitter further enhances this, allowing it to understand the structure of your Erlang code beyond mere lines, providing a deeper contextual awareness during review.

How Atlas Greps for Debugging Leftovers in Erlang Code

Debugging leftovers, such as temporary `io:format/2` calls or skipped `eunit` tests, can inadvertently ship with Erlang code, but Atlas helps prevent this in 2026. Atlas's `grep` tool efficiently scans your working tree for common debugging patterns before you commit.

Atlas assists Erlang developers in cleaning up their code by grepping for common debugging artifacts. Before committing, you can instruct Atlas to run `atlas grep --pattern 'io:format'` or `atlas grep --pattern '%% TODO: remove'` across your working directory. This helps identify temporary logging statements in `src/*.erl` files, commented-out blocks, or `eunit` tests marked with `?SKIP` that were meant for transient debugging. Atlas's hybrid semantic and keyword retrieval, fused by reciprocal rank fusion, ensures a thorough search. This proactive step is particularly important in Erlang, where hot code loading means even minor debugging statements could impact production systems if not properly removed, maintaining the integrity of your `rebar3` project.

Reverting Unwanted Erlang Changes with Atlas's Session Revert

If an Erlang change should not have been made, Atlas offers a robust session revert mechanism, backed by snapshots, to restore your working tree. This feature, available in 2026, ensures that unwanted modifications to files like `src/my_gen_server.erl` can be undone safely and efficiently.

Atlas provides a powerful `session revert` tool to undo unwanted changes, restoring your Erlang codebase from a previous snapshot. This is invaluable when you realize a modification to a `rebar.config` or a new `gen_server` implementation in `src/my_module.erl` is incorrect or unnecessary. Atlas snapshots file changes as git patches, meaning every edit Atlas made is recoverable. The `session revert` flow is backed by these snapshots, allowing you to roll back to a clean state. Crucially, Atlas asserts that the session is not busy before running a revert, preventing a half-written turn from being rolled back mid-flight and ensuring data integrity. This safety mechanism provides confidence when experimenting with complex Erlang/OTP changes, knowing you can always return to a stable point.

Running Erlang Tests and Formatting with Atlas Before Committing

Before committing any Erlang code in 2026, running tests and applying formatting are essential steps, fully supported by Atlas. Atlas can execute `rebar3 eunit` and `erlfmt` behind a permission prompt, ensuring your `rebar3` project adheres to quality and style standards.

Atlas integrates direct with the Erlang toolchain to ensure code quality before committing. You can instruct Atlas to run your tests using `atlas bash --command 'rebar3 eunit'` for unit tests or `atlas bash --command 'rebar3 ct'` for Common Test suites located under the `test/` directory. Atlas's permission-gated tool calls mean you approve these actions before they execute. Following successful tests, Atlas can apply the project's formatting rules by running `atlas bash --command 'erlfmt src/my_module.erl'` on touched modules. This ensures that your diff matches the project's style, preventing formatting-related feedback during code review. Atlas's ability to build its code index with local Ollama embeddings means these operations are performed with full context of your Erlang application, including `supervisor` callbacks and `release` configurations in `relx`, all while keeping your code off third-party servers.

Step by step

  1. 01Use `atlas bash --command 'git diff'` to produce the working diff for your Erlang `rebar3` project and read it end to end, not just the files you remember touching.
  2. 02Instruct Atlas to `read` each changed Erlang file, such as `src/my_gen_server.erl`, in full to check the change against its surroundings, since a diff hides everything it did not touch.
  3. 03Ask Atlas to `grep` for debugging leftovers you introduced, like `io:format` calls or `?SKIP` markers in `test/my_suite.erl`.
  4. 04If an Erlang change should not have been made, use `atlas session revert` to restore from a snapshot, asserting the session is not busy first.
  5. 05Run your Erlang unit tests with `atlas bash --command 'rebar3 eunit'` and approve the permission prompt.
  6. 06Execute your Erlang Common Test suites with `atlas bash --command 'rebar3 ct'` if applicable, and approve the permission prompt.
  7. 07Have Atlas run the `erlfmt` formatter on the touched Erlang modules using `atlas bash --command 'erlfmt src/my_module.erl'` so the diff matches project style.
  8. 08Review the final unified diff presented by Atlas for approval before writing the changes and creating a commit.

Frequently asked questions

How does Atlas ensure I review all changes in my Erlang project?
Atlas ensures you review all changes by allowing you to run `atlas bash --command 'git diff'`, which produces a complete, unified diff of your entire Erlang working tree. This prevents overlooking modifications in any `src/*.erl` file or `rebar.config` before they are committed, providing a holistic view of your `rebar3` project's state.
Can Atlas help me find debugging code like `io:format` in my Erlang modules?
Yes, Atlas can help you find debugging code. You can use `atlas grep --pattern 'io:format'` or `atlas grep --pattern '%% DEBUG'` to scan your Erlang source files, such as `src/my_gen_server.erl`, for temporary logging or commented-out debugging blocks. This ensures a clean codebase before committing.
How does Atlas handle reverting unwanted changes in an Erlang codebase?
Atlas handles reverting unwanted changes in an Erlang codebase through its `session revert` feature. This tool restores your working tree from a previous snapshot, effectively undoing any modifications you deem incorrect. Atlas ensures the session is not busy before reverting, preventing data loss during active operations on files like `src/my_module.erl`.
Does Atlas run `rebar3 eunit` and `erlfmt` for Erlang projects?
Yes, Atlas runs `rebar3 eunit` and `erlfmt` for Erlang projects. You can use `atlas bash --command 'rebar3 eunit'` to execute your unit tests and `atlas bash --command 'erlfmt src/my_module.erl'` to format your code. Atlas uses permission-gated tool calls, meaning you approve these actions before they run, maintaining control over your `rebar3` build process.
How does Atlas understand the structure of my Erlang/OTP application?
Atlas understands the structure of your Erlang/OTP application by indexing code using AST declarations via tree-sitter. This allows it to map `supervisor` callbacks, `gen_server` modules, and `relx` release configurations. This deep understanding provides better context for code review and agent operations, especially within `rebar3` projects containing `src/*.app.src` files.
Is Atlas's code indexing secure for my Erlang code?
Yes, Atlas's code indexing is secure for your Erlang code. Atlas can build its code index with local Ollama embeddings, keeping your proprietary Erlang code off third-party servers. This ensures that sensitive `rebar3` project details and module implementations remain within your local development environment.
Can Atlas help me review changes to my `rebar.config` file?
Absolutely. Atlas can read and present changes to your `rebar.config` file as part of the overall working diff. By using `atlas bash --command 'git diff'` and then `atlas read rebar.config`, you can meticulously review modifications to dependencies, compiler options, or `relx` configurations, ensuring they align with your Erlang project's requirements before committing.

Try Atlas in your terminal

The terminal-native AI coding agent. Free core, single binary.

Install Atlas

Related guides

Self-Review Your Working Diff Before Committing with Atlas (2026 Workflow)

How to self-review your working diff before committing with Atlas in 2026: bash produces the diff, read checks each file, grep finds leftovers, session revert undoes bad edits.

Atlas for Erlang in 2026

Atlas is a terminal-native AI coding agent for Erlang/OTP in 2026. Run it in an app with a rebar.config, map supervisors and gen_server modules, review every diff.

Automate GitHub Issue and Pull Request Triage in Erlang with Atlas in 2026

Automate GitHub issue and pull request triage for Erlang projects using Atlas. Integrate with rebar3 and erlfmt, ensuring safe, permission-gated responses from trusted users in your CI/CD pipeline.

Refactor a Legacy Erlang Module with Atlas in 2026

Safely refactor Erlang modules in 2026 using Atlas, the terminal-native AI coding agent. Map callsites, verify behavior with rebar3 eunit, and apply changes with precision, all while maintaining Erlang code style with

Run the Erlang Test Suite and Triage Failures with Atlas in 2026

Erlang developers in 2026 use Atlas to efficiently triage rebar3 eunit test failures, transforming extensive red output into a prioritized list of distinct root causes for rapid resolution.

Run Atlas Headless in CI in Erlang with Atlas in 2026

Automate Erlang development in CI/CD with Atlas. Run Atlas headless, integrate with rebar3 and erlfmt, and get machine-readable output for Erlang/OTP projects in 2026.

Plan a Multi-File Change Before Editing in Erlang with Atlas in 2026

In 2026, Erlang developers use Atlas to plan and review complex multi-file changes, ensuring design approval before modifying a single line of code or running rebar3. Securely design Erlang system updates.

Onboard to an unfamiliar codebase in Erlang with Atlas in 2026

Erlang developers in 2026 can use Atlas to quickly build a mental model of unfamiliar rebar3 projects. Understand supervision trees, gen_server modules, and application structure without reading every file, leveraging

Browse this resource hub