Skip to main content

Simple script manager for creating, running, and syncing bash scripts

Project description

Taku

Simple script manager for creating, running, and syncing scripts.

Publish to PyPIPyPI - Version PyPI - Python Version MIT License Status Ruff uv

Installation

uv tool install taku-cli

or

uv tool install "taku-cli[bling]" # just adds some colors

Quick Start

asciicast

Commands

  • taku new <name> [--template/-t <name>] - Create a new script from template
  • taku list - List all scripts, add -t to also list templates
  • taku get <name> - Show script details
  • taku edit <name> - Edit a script (auto-pushes to git if repository)
  • taku run <name> [args...] - Run a script with optional arguments
  • taku rm <name> - Remove a script (auto-pushes to git if repository)
  • taku install <name|all> - Install script to ~/.local/bin
  • taku uninstall <name|all> - Remove script from ~/.local/bin

Configuration

Set the scripts directory:

export TAKU_SCRIPTS=~/my-scripts

Default: ~/scripts

Templates

Create templates in <scripts-dir>/.templates/ and use with:

taku new myapp --template python

Template resolution order:

  1. <scripts-dir>/.templates/<template-name>
  2. ./<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()

Git Integration

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.

Using cron

  1. Open your crontab:

    crontab -e
    
  2. 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
    

Using systemd-timers

  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
    WorkingDirectory=/home/tobi/scripts
    ExecStart=/usr/bin/git pull
    
  2. 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
    
  3. 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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

taku_cli-0.4.4.tar.gz (7.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

taku_cli-0.4.4-py3-none-any.whl (8.6 kB view details)

Uploaded Python 3

File details

Details for the file taku_cli-0.4.4.tar.gz.

File metadata

  • Download URL: taku_cli-0.4.4.tar.gz
  • Upload date:
  • Size: 7.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for taku_cli-0.4.4.tar.gz
Algorithm Hash digest
SHA256 7c67681e1f483b4514d1437777765877a823233b8d67b4f64d0f3527a76c3ee4
MD5 2b37b0a57ccae7894431d0dd8ba24403
BLAKE2b-256 2a323e1f9e10f1ca3282bbc975adac2116a1883d72a6b294e5b647845fcf6edd

See more details on using hashes here.

Provenance

The following attestation bundles were made for taku_cli-0.4.4.tar.gz:

Publisher: publish.yml on Tobi-De/taku

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file taku_cli-0.4.4-py3-none-any.whl.

File metadata

  • Download URL: taku_cli-0.4.4-py3-none-any.whl
  • Upload date:
  • Size: 8.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for taku_cli-0.4.4-py3-none-any.whl
Algorithm Hash digest
SHA256 68078029dd886145ff0a2ecd69b429489c3247b250e64f3b3e31bdbbbd77e6b6
MD5 9ea09a34730195162ee0130f01879dfd
BLAKE2b-256 2d23557ebd6a43b29e46bdbc26fcf76c8b1e1ba35809d810917d974b2ea13a12

See more details on using hashes here.

Provenance

The following attestation bundles were made for taku_cli-0.4.4-py3-none-any.whl:

Publisher: publish.yml on Tobi-De/taku

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page