tilt-dev / tilt-dev/tilt

ability to set "watch=true|false" (and other CLI params?) from Tiltfile

Open
#3,064 2 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Go
Stars
10.1k
Forks
413
Avg merge
1d 10h
Merged PRs (30d)
6

Description

A user should be able to specify the value of --watch=true|false (and possibly other CLI params) from the Tiltfile, in addition to being able to set them by passing them to tilt up.

Specific use case: @kollender wants to avoid wrapping Tilt in a shell script, but wants access to two different modes specified by args: tilt -- --foo=[bar|baz]. Depending on the value of the flag, a different chunk of Tiltfile code will be executed. if baz mode must always run with --watch=false, ideally this could be set in the tiltfile:

if foo == 'bar':
    < bar workflow >
elif foo == 'baz':
    tilt_options(watch=false)
    < baz workflow >

to avoid the user having to remember extra details about the invocation (i.e. tilt up --watch=false -- --foo=baz)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading how tilt up CLI arguments and Tiltfile evaluation are currently handled. Trace the existing --watch and passthrough -- --foo=... behavior, then define how Tiltfile-set options should interact with command-line values; done means the requested mode can select its workflow without an extra wrapper script and the behavior is covered by tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.