The cds REPL is a powerful facility that helps us explore and debug. It's based on the regular Node.js REPL, which has a number of REPL-level commands:
; node
Welcome to Node.js v24.15.0.
Type ".help" for more information.
> .help
.break Sometimes you get stuck, this gets you out
.clear Alias for .break
.editor Enter editor mode
.exit Exit the REPL
.help Print this help message
.load Load JS from a file into the REPL session
.save Save all evaluated commands in this REPL session to a file
Press Ctrl+C to abort current expression, Ctrl+D to exit the REPLThe cds REPL extends the Node.js REPL with various commands, two of which have been available for a good while:
.inspect Sets options for util.inspect, e.g. `.inspect .depth=1`.
.run Runs a cds server from a given CAP project folder, or module name like @capire/bookshop.Recently (in a CAP release earlier this year) the cds REPL gained a new "query mode" command, which enables us to write queries directly. In other words, instead of this:
> await cds.ql`SELECT from Books {title, price}`we can, within the new query mode, write simply:
cql> select from Books {title, price}What is the cds REPL command to enter this new query mode?
This is a question from the June Developer Challenge on CAP Knowledge. And don't forget: always submit your answer as a hash, on its own - read the Taking part section of the intro post for more info. At the end of today, this question will be updated with links to further reading on this topic.
Further info:
- The new command was announced in the Query Mode in cds repl section of the February 2026 release notes.
- You can read more about this new mode in the Trying it with cds repl section of the CXL topic.
- For an introduction to the cds REPL, see the blog post Level up your CAP skills by learning how to use the cds REPL.
- For a deeper dive into the cds REPL, with examples, see the blog post A reCAP intro to the cds REPL.