Read from stdout as a string.
Automatically calls quiet to disable echoing to stdout.
Search the reference...
/
method
Read from stdout as a string.
Automatically calls quiet to disable echoing to stdout.
The encoding to use when decoding the output
A promise that resolves with stdout as a string
Read as UTF-8 string
const output = await $`echo hello`.text(); console.log(output); // "hello\n"
Read as base64 string
const output = await $`echo ${atob("hello")}`.text("base64");
console.log(output); // "hello\n"
Resources
ReferenceDocsGuidesDiscordMerch StoreGitHubBlogToolkit
RuntimePackage managerTest runnerBundlerPackage runnerProject
Bun 1.0Bun 1.1Bun 1.2Bun 1.3RoadmapContributingLicenseBaked with ❤️ in San Francisco
We're hiring →