Загрузка видео...

Не удалось загрузить видео

На главную

Type ! followed by your bash command to run it instantly without leaving Claude Code. The output is injected in the context window. Saves you tokens, time, and keeps you in the flow.

97,424 просмотров • 9 месяцев назад •via X (Twitter)

Комментарии: 34

Фото профиля Sören G.
Sören G.9 месяцев назад

But wait, what if I don't want the output to be injected into the context window? I'd rather have a second command that explicitly does that or vice versa a command that just outputs and bypasses context window.

Фото профиля gerry🗯
gerry🗯9 месяцев назад

This is one of those things where you don't realize how useful it is till you start doing it.

Фото профиля ShrekOverflow
ShrekOverflow9 месяцев назад

Why thanks for turning my blunder into a feature

Фото профиля Either
Either9 месяцев назад

Some it’s bash it won’t work if the command is zsh or executes a zsh script?

Фото профиля Daniel Boone
Daniel Boone9 месяцев назад

Whelp. Don't need those stupid extra tabs now. Thanks.

Фото профиля Viktor Khon
Viktor Khon9 месяцев назад

How many "crazy" people only work with 1 terminal? Haha. Ok ok I know there is a few. But I guess for others that work in IDE, this was never a pain point.

Фото профиля Nik Cubrilovic
Nik Cubrilovic9 месяцев назад

prefix with & to send your prompt + context to the claude cloud ..

Фото профиля NeuralNeko
NeuralNeko9 месяцев назад

This is the "Context Switching" killer. Alt-tabbing between the terminal and the AI breaks the flow state. Being able to run ! npm test and have Claude see the error instantly without copy-pasting? That is peak efficiency.

Фото профиля harsh
harsh9 месяцев назад

@bcherny @bcherny Is there a way to disable this? Claude runs as an elevated user for some workflows while the end user doesn’t have those permissions (enterprise/team contexts)

Фото профиля Sebastian Buzdugan
Sebastian Buzdugan9 месяцев назад

that inline execution is huge for debugging workflows

Фото профиля Kangkang|AI Engineer
Kangkang|AI Engineer9 месяцев назад

Cool trick! I'll definitely try that.

Фото профиля Yoav
Yoav9 месяцев назад

Imagine thinking sending the full verbose output of a command “saves you tokens” vs pasting in relevant parts

Фото профиля 海棠依旧
海棠依旧9 месяцев назад

But, the command log may be very large. It will occupy the context window.🤣

Фото профиля Tim Isenman
Tim Isenman9 месяцев назад

Ooooooh my god, what a lifesaver of a feature 🙏🙏🙏

Фото профиля Keith Doyle
Keith Doyle9 месяцев назад

Great tip!

Фото профиля United Records
United Records9 месяцев назад

interesting

Фото профиля Jamie Street
Jamie Street9 месяцев назад

How didn’t I know about this until now?!

Фото профиля West Decker
West Decker9 месяцев назад

Nice!

Фото профиля JP
JP9 месяцев назад

That is how you do that!?!?

Фото профиля JS
JS9 месяцев назад

Wait this is actually a game changer. Been switching terminals constantly. Thanks for the tip!

Фото профиля Santosh Yadav
Santosh Yadav9 месяцев назад

Nice tip 😊

Фото профиля Wingk
Wingk9 месяцев назад

@bcherny claude code is the new shell.

Фото профиля Eddie
Eddie9 месяцев назад

Wow, yes there are sometimes that I only need to run a very short command and still need open the second tab. Thanks for the tip.

Фото профиля Drew
Drew9 месяцев назад

@bcherny What if the cmd outputs a quadrillion tokens?

Фото профиля ExecPsychology
ExecPsychology9 месяцев назад

Please explain easier

Фото профиля Timur Yessenov
Timur Yessenov8 месяцев назад

The real power move: chain it with grep !grep -r "TODO" src/ Instantly shows Claude exactly what needs work without parsing the whole codebase first. Saved me ~30% tokens on a refactor. Bonus: !git diff --stat before asking Claude to review - now it knows the scope without reading files it won't touch.

Фото профиля Himanshu Kumar
Himanshu Kumar9 месяцев назад

@adocomplete, this method truly boosts productivity by allowing quicker command execution within Claude.

Фото профиля Vasilije
Vasilije9 месяцев назад

Instant commands without context switching. Flow state unlocked.

Фото профиля Sergi
Sergi9 месяцев назад

Awesome. Also would be ideal to make this optional --> "output is injected in the context window"

Фото профиля ian
ian9 месяцев назад

finally !!

Фото профиля Jake North
Jake North9 месяцев назад

@bcherny Omg yes finally!

Фото профиля toni
toni9 месяцев назад

Faster commands + visible output = better flow, right? But hidden context costs add up quietly. Sometimes the slow way of checking a separate terminal keeps your token budget honest.

Фото профиля 𝛼
𝛼9 месяцев назад

@bcherny the fact there is no Linux binary for Claude Desktop can only mean 2 things.

Фото профиля friedrich
friedrich9 месяцев назад

fuck u make me happy

Похожие видео

install these before your next long Claude Code session if your Opus 5.5 bill hurts and you don’t know where to start, copy this: claude-code-router: sits in front of Claude Code and sends each request to the cheapest model that can do it. Haiku does the grep, Opus only gets the hard part. 37k stars rtk: shrinks test, build and git output before the model sees it. one binary, up to 90% less bash output in your context. 83k stars claude-mem: remembers what happened in your past sessions and feeds back only the relevant part, so you stop paying to re-explain your project every morning. 100k stars context-mode: a huge tool output goes into a local database instead of your context window, and Claude pulls out only the lines it needs. 18k stars caveman: makes Claude answer in short telegraphic sentences. code stays identical, and output is the expensive side on Opus 5.5 ($20 per million). 51k stars token-optimizer: a local dashboard that shows where your tokens actually went, and keeps your work alive across compactions. 1.9k stars token-savior: replaces whole-file reads with symbol lookups, so Claude reads the function and not the 2,000 lines around it code-review-graph: maps your repo as a graph and gives Claude only the code connected to the change you’re reviewing jev-ultrafast: a browser agent where Jev picks every click, and a text model wakes up only when something has to be typed. 16,758 stars none of them makes Opus smarter. every one stops it from paying for work it never needed to do the full setup with scripts is in the article. do the measuring step first, so you know what you actually saved

rvaniaaa

24,787 просмотров • 14 дней назад