{"id":9777,"library":"go-task-bin","title":"Go Task Binary Installer","description":"go-task-bin is a Python package that simplifies the installation of the Go-based Task task runner CLI. It ensures a specific, stable version of the `task` executable is available on your system, acting as a simpler alternative to Make or other build tools. The current version is 3.50.0, and it typically releases new versions in sync with major updates to the upstream Task CLI project.","status":"active","version":"3.50.0","language":"en","source_language":"en","source_url":"https://github.com/go-task/task/tree/main/python/go-task-bin","tags":["task runner","cli","build tool","go"],"install":[{"cmd":"pip install go-task-bin","lang":"bash","label":"Install go-task-bin"}],"dependencies":[],"imports":[{"note":"go-task-bin installs the 'task' command-line interface written in Go. It does not provide Python modules for import or direct programmatic interaction from Python code.","wrong":"import task","symbol":"Task CLI (No Python imports)","correct":"This library installs a command-line executable. There are no Python symbols for direct programmatic use."}],"quickstart":{"code":"# 1. Install the binary (if not already done)\npip install go-task-bin\n\n# 2. Ensure ~/.local/bin is in your PATH (if on Linux/macOS)\n# Add this to your ~/.bashrc or ~/.zshrc:\n# export PATH=\"$HOME/.local/bin:$PATH\"\n# Then run: source ~/.bashrc (or ~/.zshrc)\n\n# 3. Create a Taskfile.yml in your project directory\n# (Save this content as Taskfile.yml)\n# version: '3'\n# tasks:\n#   hello:\n#     cmds:\n#       - echo \"Hello from Task!\"\n#   build:\n#     cmds:\n#       - echo \"Building project...\"\n#       - go build -o myapp ./cmd/myapp\n#   run:\n#     deps: [build]\n#     cmds:\n#       - ./myapp\n\n# 4. Run a task from your terminal\ntask hello\ntask build\ntask run","lang":"bash","description":"The quickstart demonstrates installing `go-task-bin`, ensuring the `task` command is available, creating a basic `Taskfile.yml` to define tasks, and then running those tasks from the command line. Remember that `go-task-bin` installs a CLI tool, not a Python library to import."},"warnings":[{"fix":"Manually add the installation directory to your `PATH` variable. For example, add `export PATH=\"$HOME/.local/bin:$PATH\"` to your shell's configuration file (e.g., `.bashrc`, `.zshrc`) and then `source` the file or restart your terminal.","message":"The `task` executable is installed into a user-specific binary directory (e.g., `~/.local/bin` on Linux/macOS, or a Scripts directory in Python's user base on Windows). This directory may not be automatically added to your system's `PATH` environment variable, leading to 'command not found' errors.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Ensure your `PATH` prioritizes the `go-task-bin` managed path, or uninstall other global `task` installations if you intend to solely use the `pip` managed version. Update `go-task-bin` regularly using `pip install --upgrade go-task-bin` to get the latest pinned `Task` version.","message":"`go-task-bin` installs a *pinned* version of the Task CLI. If you have an existing global `task` installation (e.g., via Homebrew, `apt`), using `go-task-bin` might lead to version conflicts or you might inadvertently run the globally installed version instead of the one managed by `pip`.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Remember that `task` commands are executed in your shell environment. To run Python scripts, you would define `cmds` in your `Taskfile.yml` that invoke `python your_script.py`.","message":"It's common for users to misunderstand that `go-task-bin` is an installer for a *Go-based* task runner, not a Python-native task runner. It doesn't integrate directly with Python code execution beyond providing the CLI tool.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-17T00:00:00.000Z","next_check":"2026-07-16T00:00:00.000Z","problems":[{"fix":"Add the installation directory (commonly `~/.local/bin` on Linux/macOS or `C:\\Users\\<User>\\AppData\\Roaming\\Python\\Scripts` on Windows) to your `PATH`. For example, add `export PATH=\"$HOME/.local/bin:$PATH\"` to your `~/.bashrc` or `~/.zshrc` and then `source` the file or restart your terminal.","cause":"The directory where `go-task-bin` installs the `task` executable is not in your system's `PATH` environment variable.","error":"task: command not found"},{"fix":"Create a `Taskfile.yml` in your project's root directory. Ensure it has at least one task defined, e.g., `version: '3'\ntasks:\n  hello:\n    cmds:\n      - echo \"Hello from Task!\"`. Then run `task hello`.","cause":"The `task` command was run without a `Taskfile.yml` present in the current directory or any parent directories. `Task` requires a `Taskfile.yml` to define tasks.","error":"Taskfile not found in current directory or any parent"},{"fix":"Upgrade `go-task-bin` to get a newer, compatible version of the `task` executable: `pip install --upgrade go-task-bin`.","cause":"The `Taskfile.yml` specifies a minimum required version of Task that is newer than the version currently installed by `go-task-bin`.","error":"You are running Task vX.Y.Z, but Taskfile requires at least vA.B.C"}]}