Skip to content

manual

Installs files from your tool configuration directory (custom scripts, pre-built binaries) or registers configuration-only tools. The manual method can be called with or without params.

import { defineTool } from "@alexgorbatchev/dotfiles";
// Install a custom script
export default defineTool((install, ctx) =>
install("manual", {
binaryPath: "./scripts/my-tool.sh",
}).bin("my-tool"),
);
// Without params (shell-only or dependency wrapper)
export default defineTool((install) =>
install("manual")
.bin("tokscale")
.dependsOn("bun")
.zsh((shell) =>
shell.functions({
tokscale: `bun x tokscale@latest`,
}),
),
);
// Configuration-only tool (no binary)
export default defineTool((install, ctx) => install().zsh((shell) => shell.aliases({ ll: "ls -la" })));
ParameterTypeRequiredDescription
binaryPathstringNoPath to binary relative to .tool.ts file
envRecord<string, string> | (ctx) => Record<...>NoEnvironment variables (static or dynamic function)
export default defineTool((install, ctx) =>
install("manual", {
binaryPath: "./binaries/linux/x64/custom-tool",
}).bin("custom-tool"),
);
export default defineTool((install, ctx) => install().zsh((shell) => shell.aliases({ ll: "ls -la", la: "ls -A" })));
export default defineTool((install, ctx) =>
install("manual", {
binaryPath: "./bin/my-tool.sh",
})
.bin("my-tool")
.zsh((shell) => shell.aliases({ mt: "my-tool" }).completions("./completions/_my-tool")),
);
export default defineTool((install) =>
install("manual", {
binaryPath: "/usr/bin/whoami",
})
.bin("sudo-prompt-test")
.sudo(),
);

Notes:

  • Binary paths are relative to the tool configuration file location
  • Files are copied to the managed installation directory with executable permissions
  • .sudo() acquires sudo credentials interactively before Dotfiles registers the manual binary
  • Configuration-only tools use install() with no arguments and must not define .bin()