Buckets:
37 GB
4,042,753 files
Updated about 1 month ago
Ctrl+K
| Name | Size | Uploaded | Xet hash |
|---|---|---|---|
| src | 1 items | ||
| tests | 1 items | ||
| CHANGELOG.md | 2.47 kB xet | 192d8fca | |
| README.md | 1.85 kB xet | 2774d55f | |
| deno.json | 368 Bytes xet | e1eb23f2 | |
| mod.ts | 747 Bytes xet | f8bbfa77 |
@zuke/cmd
Run any external command as a Zuke task — a generic, injection-safe tool wrapper for tools without a dedicated package.
import { CmdTasks } from "@zuke/cmd";
await CmdTasks.exec("git", (s) => s.args("rev-parse", "HEAD"));
Paths
Every path argument accepts either a string or an AbsolutePath from
@zuke/core, so a path built with absolutePath can be passed in directly.
API
Full typed API — generated from deno doc
`@zuke/cmd` — generic command execution for Zuke builds: the fallback for
tools that have no dedicated wrapper package.
Check the package catalogue in `llms.txt` before reaching for it. A tool with
a `@zuke/<tool>` wrapper should be driven through that wrapper — running it
here instead gives up typed flags and the wrapper's tool resolution, so the
example below deliberately uses a tool Zuke does not wrap.
```ts
import { CmdTasks } from "@zuke/cmd";
await CmdTasks.exec("shellcheck", (s) => s.args("--severity", "warning"));
```
@module
const CmdTasks: CmdTasksApi
Task functions for running arbitrary tools.
class CmdSettings extends ToolSettings
Settings for a generic command: the tool name plus raw arguments.
constructor(tool: PathLike)
Create settings for `tool`; the tool name is required.
override protected defaultTool(): string
The command to run — the tool name passed to the constructor.
override protected buildArgs(): string[]
No implicit arguments; the caller supplies them via `.args(...)`.
interface CmdTasksApi
The shape of {@link CmdTasks}.
exec(tool: PathLike, configure?: Configure<CmdSettings>): Promise<CommandOutput>
Run `tool` with the configured settings.
- Total size
- 37 GB
- Files
- 4,042,753
- Last updated
- Oct 24
- Pre-warmed CDN
- US EU US EU