Claude and GPT Shell One-Liners in Two Terminal Panes
Ten minutes, two models, one shell task
I like asking two models for the same shell command before trusting either answer. Not because a second opinion makes a command safe, but because disagreements expose assumptions: GNU utilities, filename handling, hidden directories, and whether “largest” means bytes or disk usage.
We will ask Claude Sonnet 5.5 and GPT-6 Astra for a read-only one-liner, save their answers, and compare them side by side. Nothing generated will execute automatically. You need Bash, curl, jq, and a directory containing a few files.
Fluxo gives this experiment one key and one base URL, https://api.fluxorelay.com, across Claude, GPT, Gemini, DeepSeek, Kimi, GLM, Qwen, Grok, and more. That keeps the request plumbing constant while we change the model.
Minutes 0–2: configure one key and two model IDs
If you want to follow along, create a Fluxo account and get your API key. Copy the exact API model identifiers for Claude Sonnet 5.5 and GPT-6 Astra from the model listing; display names are not necessarily request identifiers.
Run this in Bash, replacing the model placeholders. The key prompt avoids putting the credential directly into your shell history.
read -rsp 'Fluxo API key: ' FLUXO_API_KEY; printf '\n'; export FLUXO_API_KEY; export FLUXO_BASE_URL='https://api.fluxorelay.com'; export MODEL_CLAUDE='PASTE_CLAUDE_MODEL_ID'; export MODEL_GPT='PASTE_GPT_MODEL_ID'; set -o pipefail
Keep the key out of committed files and terminal screenshots. If something blocks setup, you can leave a note on the contact page after signing in.
Minutes 2–5: send identical prompts through curl
Use a deliberately constrained task. “Find big files” sounds simple until one answer assumes Linux and another includes Git object storage. This prompt makes those decisions explicit.
PROMPT='Write one read-only Bash one-liner for macOS and Linux that lists the ten largest regular files under the current directory by allocated disk usage in KiB, excluding every directory named .git. Handle spaces in filenames. Use standard installed utilities. Return the command on the first line without Markdown, then briefly explain assumptions and limitations. Do not install anything or modify files.'
The helper below builds JSON with jq instead of interpolating prompt text into a hand-quoted payload. It calls the OpenAI-compatible chat completions endpoint and extracts the first text response. Pipefail prevents a failed HTTP request from being masked by a successful downstream process.
ask() { jq -n --arg model "$1" --arg prompt "$PROMPT" '{model: $model, messages: [{role: "user", content: $prompt}]}' | curl --fail-with-body -sS "$FLUXO_BASE_URL/v1/chat/completions" -H "Authorization: Bearer $FLUXO_API_KEY" -H 'Content-Type: application/json' --data-binary @- | jq -er '.choices[0].message.content'; }
Now make two requests. Separate output files make the comparison repeatable without mixing responses into your terminal scrollback.
ask "$MODEL_CLAUDE" > claude.txt && ask "$MODEL_GPT" > gpt.txt
Minutes 5–8: compare commands, not personalities
Open both files in editor splits, or use the terminal comparison below. A diff exit status of one means the files differ; it does not mean the API requests failed.
diff -y -W 160 claude.txt gpt.txt — Do not pick a winner by answer length. Check the operational details first.
- Check whether Git directories are actually pruned before traversal.
- Check whether filenames containing spaces survive every pipeline stage.
- Check whether the size measurement matches allocated disk usage.
- Check whether utility flags exist on both target platforms.
- Check whether either answer acknowledges filenames containing newline characters.
A command can handle spaces correctly and still misrepresent newline-containing filenames. Neither model should get a free pass because its explanation sounds confident. If the answers disagree, ask a narrow follow-up about that exact difference.
Minutes 8–10: test locally before keeping the one-liner
Read the proposed command, then manually run it inside a disposable fixture directory with nested folders, a filename containing spaces, and a .git directory. Verify the exclusions and ordering yourself. Never pipe model output into Bash or pass it to eval.
Fluxo bills per real token, including cache reads and writes, with no monthly fee; two requests are still two billable requests. The same service works with Claude Code, Codex, Gemini CLI, and any OpenAI SDK. Users also earn a referral share when people they invite pay.
Keep the reviewed command and its platform assumptions together. The useful artifact is not a model ranking: it is a shell shortcut you understand well enough to maintain.