Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .agents/tasks/2025/06/29-2309-update-readme-usage
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Update the README usage section to mention --format option for the native recorder (json or binary) and use of -- to separate tracer options from program arguments, showing example invocations with these options
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,28 @@ recorder.flush_trace(Dir.pwd)
you can currently use it directly with

```bash
ruby gems/codetracer-pure-ruby-recorder/bin/codetracer-pure-ruby-recorder [--out-dir DIR] <path to ruby file>
ruby gems/codetracer-pure-ruby-recorder/bin/codetracer-pure-ruby-recorder [--out-dir DIR] <path to ruby file> [-- <program args>]
# produces several trace json files in DIR,
# or in `$CODETRACER_RUBY_RECORDER_OUT_DIR` if DIR is not provided.
# Defaults to the current directory.
# Use `--` to stop option parsing and pass arguments to the program.
# Pass --help to list all options.
```

You can also invoke a lightweight CLI that loads the native tracer extension
directly:

```bash
ruby gems/codetracer-ruby-recorder/bin/codetracer-ruby-recorder [--out-dir DIR] <path to ruby file>
ruby gems/codetracer-ruby-recorder/bin/codetracer-ruby-recorder [--out-dir DIR] [--format json|binary] <path to ruby file> [-- <program args>]
# Uses DIR or `$CODETRACER_RUBY_RECORDER_OUT_DIR` to choose where traces are saved.
# `--format` selects the trace format (`json` or `binary`).
# Use `--` to pass arguments to the traced program.
```

Example recording a binary trace while passing arguments to the program:

```bash
ruby gems/codetracer-ruby-recorder/bin/codetracer-ruby-recorder --format=binary --out-dir traces examples/runtime_code_execution.rb -- 2
```

however you probably want to use it in combination with CodeTracer, which would be released soon.
Expand Down
Loading