Safety & permissions
Inspired by fx.sh from Vercel Labs, tiny-agent pauses before executing risky operations to protect your codebase and environment.
What tiny-agent asks before it acts
Actions that inspect the codebase execute immediately without user intervention, while state-changing actions require interactive confirmation:
read_file and search_files are strictly read-only. Before executing, they print a dimmed status line (e.g. ↳ read_file: path) for full visibility while executing instantly without blocking for confirmation.
- write_file: Shows the destination path and a preview of file contents before creation.
- edit_file: Shows an exact red/green diff preview (- old / + new) prior to replacement.
- run_shell_command: Shows the exact command string and arguments before process execution.
An approval grants execution of the exact action previewed in the terminal. If you enter n, the tool execution is halted and the agent is instructed to suggest alternative approaches rather than retrying in a loop.
Auto-approve mode (--yolo)
When running scripted workflows or operating inside isolated Docker containers, you can disable all interactive prompts using the --yolo or --auto-approve flag:
tiny-agent --yolo "Refactor error handling in src/tools.ts"When active, tiny-agent prints a warning reminding you that actions execute autonomously without confirmation.
Tools reference
read_file(path)Asynchronously reads file text. Automatically performs shallow recursive basename resolution (e.g. bare agent.ts resolves to src/agent.ts).
write_file(path, content)Writes complete content to disk, automatically creating parent directories. Prompts confirmation unless in yolo mode.
edit_file(path, old_string, new_string)Replaces exact substring occurrence. Fails safely if old_string is missing or appears more than once.
run_shell_command(command)Executes shell commands with a 30-second timeout guard to prevent runaway processes.
search_files(pattern, directory)Recursive regex grep ignoring node_modules, .git, and build output.