Simple script manager for creating, running, and syncing scripts.
uv tool install taku-clior
uv tool install "taku-cli[bling]" # just adds some colorstaku new <name> [--template/-t <name>]- Create a new script from templatetaku list- List all scripts, add-tto also list templatestaku get <name>- Show script detailstaku edit <name>- Edit a script (auto-pushes to git if repository)taku run <name> [args...]- Run a script with optional argumentstaku rm <name>- Remove a script (auto-pushes to git if repository)taku install <name|all>- Install script to~/.local/bintaku uninstall <name|all>- Remove script from~/.local/bin
Set the scripts directory:
export TAKU_SCRIPTS=~/my-scriptsDefault: ~/scripts
Create templates in <scripts-dir>/.templates/ and use with:
taku new myapp --template pythonTemplate resolution order:
<scripts-dir>/.templates/<template-name>./<template-name>(current directory)
Templates can use ${script_name} variable for substitution.
Example Python template (~/.scripts/.templates/python):
#!/usr/bin/env -S uv run --script
# /// script
# requires-python = ">=3.12"
# dependencies = []
# ///
def main() -> None:
print("Hello from $script_name!")
if __name__ == "__main__":
main()If your scripts directory is a Git repository, taku will automatically commit and push changes whenever you edit or remove scripts.
This keeps your changes synced, but to complete the auto-sync feature you also need to set up each machine to regularly pull the latest scripts.
-
Open your crontab:
crontab -e
-
Add a line to pull updates every 15 minutes (adjust the path to your scripts directory):
*/15 * * * * cd /home/tobi/scripts && git pull >/dev/null 2>&1
-
Create a service file
/etc/systemd/system/scripts-sync.service(adjust the path to your scripts directory):[Unit] Description=Synchronize scripts from remote [Service] Type=oneshot User=tobi WorkingDirectory=/home/tobi/scripts ExecStart=/usr/bin/git pull
-
Create a timer file
/etc/systemd/system/scripts-sync.timer:[Unit] Description=Periodic synchronization of scripts [Timer] OnBootSec=1min OnUnitActiveSec=15min Persistent=true [Install] WantedBy=timers.target
-
Enable the timer:
sudo systemctl daemon-reload sudo systemctl enable --now scripts-sync.timer
This will run a git pull in your scripts directory every 15 minutes.