Is your feature request related to a problem? Please describe.
There is no quick way to hand a request from Trufos to the terminal or a colleague. The full code generator (#775) covers this eventually, but a lightweight "copy as cURL" needs no modal, no language selector and no new UI surface — it fits into the existing request context menu (Rename / Copy / Delete Request).
Describe the solution you'd like
Add a "Copy as cURL" entry to the request context menu in the sidebar (RequestDropdown), between "Copy Request" and "Delete Request". Clicking it builds a cURL command from the request and writes it to the clipboard, with a success toast.
Generated command:
curl -X <METHOD> '<url>' with the URL built from base + query params.
- One
-H 'Key: value' per active header.
- Body:
- Text body:
--data-raw '<content>' (content read from the request body file via the existing IPC stream; missing/empty body file → no data flag). Adds -H 'Content-Type: <mimeType>' when no active Content-Type header is set.
- File body:
--data-binary @'<path>' when a file path is set.
- Form-data:
-F 'key=value' / -F 'key=@path' per active field.
- Values are single-quote shell-escaped (
' → '\''), multi-part commands are joined with \ line continuations for readability.
- Template variables (
{{...}}) are copied unresolved — the command is meant to be portable and must not leak resolved secrets.
Describe alternatives you've considered
Acceptance criteria
Is your feature request related to a problem? Please describe.
There is no quick way to hand a request from Trufos to the terminal or a colleague. The full code generator (#775) covers this eventually, but a lightweight "copy as cURL" needs no modal, no language selector and no new UI surface — it fits into the existing request context menu (Rename / Copy / Delete Request).
Describe the solution you'd like
Add a "Copy as cURL" entry to the request context menu in the sidebar (
RequestDropdown), between "Copy Request" and "Delete Request". Clicking it builds a cURL command from the request and writes it to the clipboard, with a success toast.Generated command:
curl -X <METHOD> '<url>'with the URL built from base + query params.-H 'Key: value'per active header.--data-raw '<content>'(content read from the request body file via the existing IPC stream; missing/empty body file → no data flag). Adds-H 'Content-Type: <mimeType>'when no active Content-Type header is set.--data-binary @'<path>'when a file path is set.-F 'key=value'/-F 'key=@path'per active field.'→'\''), multi-part commands are joined with\line continuations for readability.{{...}}) are copied unresolved — the command is meant to be portable and must not leak resolved secrets.Describe alternatives you've considered
Acceptance criteria