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.
Basic Usage
Section titled “Basic Usage”import { defineTool } from "@alexgorbatchev/dotfiles";
// Install a custom scriptexport 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" })));Parameters
Section titled “Parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
binaryPath | string | No | Path to binary relative to .tool.ts file |
env | Record<string, string> | (ctx) => Record<...> | No | Environment variables (static or dynamic function) |
Examples
Section titled “Examples”Pre-built Binary
Section titled “Pre-built Binary”export default defineTool((install, ctx) => install("manual", { binaryPath: "./binaries/linux/x64/custom-tool", }).bin("custom-tool"),);Configuration-Only Tool
Section titled “Configuration-Only Tool”export default defineTool((install, ctx) => install().zsh((shell) => shell.aliases({ ll: "ls -la", la: "ls -A" })));With Shell Configuration
Section titled “With Shell Configuration”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")),);With Sudo Prompt
Section titled “With Sudo Prompt”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()