A long line of ABAP, folded into shape.
origami formats ABAP and CDS. It changes line breaks, indentation, spaces and letter case, nothing else, and it checks its own output token by token before it writes a file.
brew install nimble-123/tap/origami
DATA(ls_rule) = zcl_flight_rules=>get( iv_carrier = is_flight-carrid
iv_date = sy-datum
iv_mode = 'A' ).
ABAP-CALL-001: one parameter per line, because the call would end at column 103 (limit 72)
Try it on your code
Paste ABAP or CDS. It runs in your browser: origami compiled to WebAssembly, nothing is uploaded.
Loading origami…
It never changes what your code means
After formatting, origami reads its own output back and compares every token and every comment with your file. Only whitespace, line breaks and letter case may differ.
- A statement origami does not understand keeps its own line breaks. It is re-indented with its block and reported as W003.
- A file with a structural error, such as a missing period or an unclosed
IF, is never touched. You get the line and column instead. - Embedded languages (AMDP, native SQL, macros) are copied byte for byte.
Every fold has a reason
origami --review shows what would change before anything is written, and below each construct it broke, the rule and the column the line would have ended at. In VS Code, origami: Preview Changes opens the same changes in the diff view.
Fast enough for every save
A median file takes 0.08 ms in a running editor or agent and 2.2 ms as a new process, start included; 99 % of files take under 5 ms. The 2,100-file test corpus takes 0.2 s, so format-on-save and pre-commit hooks stay out of your way.
Install
origami is a single binary for macOS, Linux and Windows. It reads origami.toml for line width, indentation and keyword case.
- Homebrew
brew install nimble-123/tap/origami- Format a repository
origamiformats every ABAP and CDS file below the current folder;origami --checkonly reports.- Only what you changed
origami --changed mainformats the lines you touched sincemain.- VS Code
- The extension in every release formats on save, works with ADT for VS Code and adds Preview Changes.
- GitHub Actions
uses: nimble-123/origami@v0.2.3withargs: --check; GitLab, Azure Pipelines and pre-commit in the CI guide.- AI agents
origami --mcpruns an MCP server; agents get compact diagnostics with a next step.