Skip to content

feat: enable remote taskfiles#2906

Open
pd93 wants to merge 11 commits into
mainfrom
enable-remote-taskfiles
Open

feat: enable remote taskfiles#2906
pd93 wants to merge 11 commits into
mainfrom
enable-remote-taskfiles

Conversation

@pd93

@pd93 pd93 commented Jul 2, 2026

Copy link
Copy Markdown
Member

Not merging until after 1st Aug (after the 30 day period for comments is complete).

Closes #1317

This PR enables the remote taskfile functionality globally without the need for an experiment flag/config. If users continue to attempt to enable the remote taskfile experiment, they will be presented with a warning telling them that they no longer need to do this.

Additionally, large changes have been made to the documentation on the website. Namely:

  • There is a new dedicated page for Remote Taskfiles (consisting mostly of the same content as the experiment doc)
  • The guide has been updated to show a couple of basic things (this then links to the full doc)
  • The configuration that was previously in the experiment doc has been moved to the reference docs for the CLI/envinroment variables/config files respectively.

@vmaerten vmaerten self-requested a review July 2, 2026 18:31

@vmaerten vmaerten left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice !
You need to update completions files :

if __task_is_experiment_enabled "REMOTE_TASKFILES"; then
&
if ($experiments -match '\* REMOTE_TASKFILES:.*on') {
&
complete -c $GO_TASK_PROGNAME -n "__task_is_experiment_enabled REMOTE_TASKFILES" -l offline -d 'use only local or cached Taskfiles'

@pd93

pd93 commented Jul 3, 2026

Copy link
Copy Markdown
Member Author

Nice ! You need to update completions files :

Thanks! Updated. Completion scripts aren't my forte, so please check them 😆

Also fixed the broken links.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Enables Remote Taskfiles as a generally available feature by removing the experiment gate in core code, promoting related CLI flags/completions to always be available, and restructuring website documentation to move content from the experiment page into first-class docs and reference sections.

Changes:

  • Remove the runtime experiment check that previously blocked remote Taskfile nodes.
  • Make remote-related CLI flags and shell completions always available (no experiment gating).
  • Add/update website docs: new Remote Taskfiles page, guide snippets, and expanded reference docs for remote config/env/CLI.

Reviewed changes

Copilot reviewed 18 out of 18 changed files in this pull request and generated 13 comments.

Show a summary per file
File Description
website/src/public/schema-taskrc.json Removes REMOTE_TASKFILES from the experiments schema to reflect GA status.
website/src/docs/remote-taskfiles.md Adds a dedicated Remote Taskfiles documentation page.
website/src/docs/reference/environment.md Adds a “Remote Taskfile Variables” section.
website/src/docs/reference/config.md Documents remote.* configuration keys in reference docs.
website/src/docs/reference/cli.md Documents remote-related CLI flags in the CLI reference.
website/src/docs/guide.md Adds guide-level examples for running/including remote Taskfiles and formatting tweaks.
website/src/docs/experiments/remote-taskfiles.md Replaces experiment content with a pointer to released docs/changelog.
website/.vitepress/config.ts Adds “Remote Taskfiles” to the docs navigation.
taskfile/node.go Removes the experiment-enabled check for remote nodes.
task_test.go Removes test-only experiment enabling for remote include/http tests.
internal/flags/flags.go Registers remote flags unconditionally (previously behind experiment).
experiments/experiments.go Treats RemoteTaskfiles as a released (inactive) experiment for warning-only behavior.
experiments/experiment.go Adds “released/abandoned” inactive experiment helpers and richer inactive reason tracking.
experiments/errors.go Improves inactive experiment error messaging with an optional reason.
completion/zsh/_task Makes remote flags/completions always available in zsh completion.
completion/ps/task.ps1 Makes remote flags/completions always available in PowerShell completion.
completion/fish/task.fish Makes remote flags/completions always available in fish completion.
.taskrc.yml Removes REMOTE_TASKFILES from the repo’s default experiments list.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread internal/flags/flags.go
pflag.BoolVarP(&Failfast, "failfast", "F", getConfig(config, "FAILFAST", func() *bool { return &config.Failfast }, false), "When running tasks in parallel, stop all tasks if one fails.")
pflag.BoolVarP(&Global, "global", "g", false, "Runs global Taskfile, from $HOME/{T,t}askfile.{yml,yaml}.")
pflag.BoolVar(&Experiments, "experiments", false, "Lists all the available experiments and whether or not they are enabled.")
pflag.BoolVar(&Download, "download", false, "Downloads a cached version of a remote Taskfile.")
Comment on lines +306 to +309
If for any reason you lose access to the internet or you are running Task in
offline mode (via the `--offline` flag or `TASK_OFFLINE` environment variable),
Task will run the any available cached files _even if they are expired_. This
means that you should never be stuck without the ability to run your tasks as
Comment on lines +319 to +322
`remote.cache-dir` option in your
[configuration file](./reference/config.md#remotecache-dir), or the
`TASK_REMOTE_DIR` environment variable. This way, you can share the cache
between different projects.
flag or the `--trust` flag. The `--trust` flag allows you to specify trusted
hosts for remote Taskfiles, while `--yes` applies to all prompts in Task. You
can also configure trusted hosts in your
[taskrc configuration](./reference/config.md#remotetrusted-hosts) using
Comment on lines +331 to +332
It is also possible to adjust remote Taskfile functionality can be edited via a
configuration file. Check out the
Comment on lines +242 to +244
- **Environment variable**:
[`TASK_REMOTE_CACHE_EXPIRY`](./environment.md#task_remote_cache_expiry)

Comment on lines +257 to +259
- **Environment variable**:
[`TASK_REMOTE_CACHE_DIR`](./environment.md#task_remote_cache_dir)

Comment on lines +272 to +274
- **Environment variable**:
[`TASK_REMOTE_TRUSTED_HOSTS`](./environment.md#task_remote_trusted_hosts)
(comma-separated)
Comment thread website/src/docs/guide.md
Comment on lines +2259 to +2261
Using wildcards with aliases Wildcards also work with aliases. If a task has an
alias, you can use the alias name with wildcards to capture arguments. For
example:
Comment thread website/src/docs/guide.md
Comment on lines 2335 to +2337
- defer:
echo '{{if .EXIT_CODE}}Failed with {{.EXIT_CODE}}!{{else}}Success!{{end}}'
echo '{{if .EXIT_CODE}}Failed with
{{.EXIT_CODE}}!{{else}}Success!{{end}}'

@vmaerten vmaerten left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! 🔥

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remote Taskfiles experiment

3 participants