diff --git a/docs/cli/generate/task-stubs.md b/docs/cli/generate/task-stubs.md index acb7b667d6..2a449f06eb 100644 --- a/docs/cli/generate/task-stubs.md +++ b/docs/cli/generate/task-stubs.md @@ -28,7 +28,7 @@ Use `--mise-bin=./bin/mise` to use a mise bin generated from `mise generate boot Examples: ``` -$ mise task add test -- echo 'running tests' +$ mise tasks add test -- echo 'running tests' $ mise generate task-stubs $ ./bin/test running tests diff --git a/docs/cli/index.md b/docs/cli/index.md index fb2f74c686..3531e108cc 100644 --- a/docs/cli/index.md +++ b/docs/cli/index.md @@ -11,7 +11,7 @@ Task to run. -Shorthand for `mise task run `. +Shorthand for `mise tasks run `. ## Global Flags diff --git a/docs/cli/tasks/add.md b/docs/cli/tasks/add.md index e40b3cea0b..fe5547e9ef 100644 --- a/docs/cli/tasks/add.md +++ b/docs/cli/tasks/add.md @@ -34,7 +34,7 @@ Create a file task instead of a toml task ### `-H --hide` -Hide the task from `mise task` and completions +Hide the task from `mise tasks` and completions ### `-q --quiet` @@ -79,5 +79,5 @@ Do not print the command or its output Examples: ``` -mise task add pre-commit --depends "test" --depends "render" -- echo pre-commit +mise tasks add pre-commit --depends "test" --depends "render" -- echo pre-commit ``` diff --git a/docs/cli/tasks/validate.md b/docs/cli/tasks/validate.md index f1c5c50505..3852946a77 100644 --- a/docs/cli/tasks/validate.md +++ b/docs/cli/tasks/validate.md @@ -27,16 +27,16 @@ Examples: ``` # Validate all tasks -$ mise task validate +$ mise tasks validate # Validate specific tasks -$ mise task validate build test +$ mise tasks validate build test # Output results as JSON -$ mise task validate --json +$ mise tasks validate --json # Only show errors (skip warnings) -$ mise task validate --errors-only +$ mise tasks validate --errors-only ``` Validation Checks: diff --git a/docs/tasks/architecture.md b/docs/tasks/architecture.md index 118335ae87..3406606022 100644 --- a/docs/tasks/architecture.md +++ b/docs/tasks/architecture.md @@ -235,8 +235,8 @@ This automatically reruns tasks when their source files change. ### Visualize Dependencies ```bash -mise task deps build # Show build's dependencies -mise task deps --dot > deps.dot # Generate graphviz diagram +mise tasks deps build # Show build's dependencies +mise tasks deps --dot > deps.dot # Generate graphviz diagram ``` ### Execution Tracing @@ -267,7 +267,7 @@ Solution: Define the missing task or remove the dependency. **Slow Parallel Execution**: - Check if tasks have unnecessary dependencies -- Use `mise task deps` to verify dependency graph +- Use `mise tasks deps` to verify dependency graph - Consider increasing `--jobs` if you have CPU cores available The task architecture is designed to scale from simple single-task projects to complex multi-service applications with intricate build dependencies. diff --git a/docs/tasks/file-tasks.md b/docs/tasks/file-tasks.md index 6ebee629e5..7cc4f2504c 100644 --- a/docs/tasks/file-tasks.md +++ b/docs/tasks/file-tasks.md @@ -96,7 +96,7 @@ Write-Host "Hello from Powershell, current directory is $current_directory" ## Editing tasks -This script can be edited with by running `mise task edit build` (using `$EDITOR`). If it doesn't exist it will be created. +This script can be edited by running `mise tasks edit build` (using `$EDITOR`). If it doesn't exist it will be created. This is convenient for quickly editing or creating new scripts. ## Task Grouping diff --git a/docs/tasks/running-tasks.md b/docs/tasks/running-tasks.md index d7fa36fe2e..626a7b4bfc 100644 --- a/docs/tasks/running-tasks.md +++ b/docs/tasks/running-tasks.md @@ -2,9 +2,9 @@ See available tasks with `mise tasks`. To show tasks hidden with property `hide=true`, use the option `--hidden`. -List dependencies of tasks with `mise task deps [tasks]...`. +List dependencies of tasks with `mise tasks deps [tasks]...`. -Run a task with `mise task run `, `mise run `, `mise r `, or just `mise `—however +Run a task with `mise tasks run `, `mise run `, `mise r `, or just `mise `—however that last one you should never put into scripts or documentation because if mise ever adds a command with that name in a future mise version, the task will be shadowed and must be run with one of the other forms. diff --git a/docs/tasks/toml-tasks.md b/docs/tasks/toml-tasks.md index a3fa008b05..e64aec5569 100644 --- a/docs/tasks/toml-tasks.md +++ b/docs/tasks/toml-tasks.md @@ -74,7 +74,7 @@ run = './scripts/test-e2e.sh {{vars.e2e_args}} $VERBOSE_ARGS' You can edit the `mise.toml` file directly or using [`mise tasks add`](/cli/tasks/add) ```shell -mise task add pre-commit --depends "test" --depends "render" -- echo pre-commit +mise tasks add pre-commit --depends "test" --depends "render" -- echo pre-commit ``` will add the following to `mise.toml`: diff --git a/e2e/generate/test_generate_bootstrap b/e2e/generate/test_generate_bootstrap index 8e0ee1fbe5..193f67c2fe 100644 --- a/e2e/generate/test_generate_bootstrap +++ b/e2e/generate/test_generate_bootstrap @@ -3,7 +3,7 @@ assert "mise generate bootstrap -w" assert "./bin/mise version" -assert "mise task add xxx -- echo 'running xxx'" +assert "mise tasks add xxx -- echo 'running xxx'" assert "mise generate task-stubs --mise-bin ./bin/mise" assert "./bin/xxx" "running xxx" diff --git a/e2e/generate/test_generate_task_stubs b/e2e/generate/test_generate_task_stubs index 354aa05d7b..2640c0e146 100644 --- a/e2e/generate/test_generate_task_stubs +++ b/e2e/generate/test_generate_task_stubs @@ -1,5 +1,5 @@ #!/usr/bin/env bash -assert "mise task add xxx -- echo 'running xxx'" +assert "mise tasks add xxx -- echo 'running xxx'" assert "mise generate task-stubs" assert "./bin/xxx" "running xxx" diff --git a/e2e/tasks/test_task_add b/e2e/tasks/test_task_add index 98c048ee84..9711e1337a 100644 --- a/e2e/tasks/test_task_add +++ b/e2e/tasks/test_task_add @@ -1,11 +1,11 @@ #!/usr/bin/env bash -mise task add pre-commit --depends "test" --depends "render" -- echo pre-commit +mise tasks add pre-commit --depends "test" --depends "render" -- echo pre-commit assert "cat mise.toml" '[tasks.pre-commit] depends = ["test", "render"] run = "echo pre-commit"' -mise task add --file pre-commit --depends "test" --depends "render" -- echo pre-commit +mise tasks add --file pre-commit --depends "test" --depends "render" -- echo pre-commit assert "cat mise-tasks/pre-commit" '#!/usr/bin/env bash #MISE depends=["test", "render"] set -euxo pipefail diff --git a/e2e/tasks/test_task_default b/e2e/tasks/test_task_default index 06f1031d81..7f8d7d36e6 100644 --- a/e2e/tasks/test_task_default +++ b/e2e/tasks/test_task_default @@ -1,10 +1,10 @@ #!/usr/bin/env bash -assert "mise task add --file foo:bar:baz -- echo baz" -assert "mise task add --file foo:bar -- echo bar" +assert "mise tasks add --file foo:bar:baz -- echo baz" +assert "mise tasks add --file foo:bar -- echo bar" ls -lR . assert "mise tasks" "foo:bar foo:bar:baz" -assert "mise task run foo:bar:baz" "baz" -assert "mise task run foo:bar" "bar" +assert "mise tasks run foo:bar:baz" "baz" +assert "mise tasks run foo:bar" "bar" diff --git a/e2e/tasks/test_task_depends_post b/e2e/tasks/test_task_depends_post index e4123ff138..550b2cba14 100644 --- a/e2e/tasks/test_task_depends_post +++ b/e2e/tasks/test_task_depends_post @@ -13,7 +13,7 @@ run = "echo two" depends_post = ["two"] run = "echo three" EOF -assert "mise task deps" "one +assert "mise tasks deps" "one three two ├── three diff --git a/e2e/tasks/test_task_depends_post_multiple b/e2e/tasks/test_task_depends_post_multiple index e5ec334e74..1d3055511f 100644 --- a/e2e/tasks/test_task_depends_post_multiple +++ b/e2e/tasks/test_task_depends_post_multiple @@ -15,7 +15,7 @@ EOF # Test that task dependencies are resolved correctly # With depends_post, the dependencies appear as children in the tree -assert "mise task deps" "bar +assert "mise tasks deps" "bar └── baz baz foo @@ -40,7 +40,7 @@ run = "echo main" depends_post = ["one", "two", "three"] EOF -assert "mise task deps" "main +assert "mise tasks deps" "main one └── main three diff --git a/e2e/tasks/test_task_deps b/e2e/tasks/test_task_deps index 40359231e1..192c71dd8a 100644 --- a/e2e/tasks/test_task_deps +++ b/e2e/tasks/test_task_deps @@ -36,12 +36,12 @@ depends = ["hello:*"] EOF assert_contains "mise run hello:all" "[hello:1] Hello from 1" assert_contains "mise run hello:all" "[hello:2] Hello from 2" -assert "mise task deps" "hello:1 +assert "mise tasks deps" "hello:1 hello:2 hello:all ├── hello:2 └── hello:1" -assert "mise task hello:all" 'Task: hello:all +assert "mise tasks hello:all" 'Task: hello:all Description: Hello from all Source: ~/workdir/mise.toml Depends on: hello:* @@ -53,5 +53,5 @@ Usage Spec: echo '' >mise.toml mkdir -p mise-tasks && echo "" >mise-tasks/build.sh && chmod +x mise-tasks/build.sh -assert "mise task deps build" "build" -assert "mise task deps build.sh" "build" +assert "mise tasks deps build" "build" +assert "mise tasks deps build.sh" "build" diff --git a/e2e/tasks/test_task_display_truncation b/e2e/tasks/test_task_display_truncation index 9e91af238e..2dba258366 100644 --- a/e2e/tasks/test_task_display_truncation +++ b/e2e/tasks/test_task_display_truncation @@ -23,10 +23,10 @@ run = 'echo "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam n EOF # Test task listing shows full names (not truncated at 60 chars) -assert_contains "mise task ls" "short" -assert_contains "mise task ls" "medium-length-task-name" -assert_contains "mise task ls" "very-long-task-name-that-exceeds-sixty-characters-to-test-truncation" -assert_contains "mise task ls" "super-duper-ultra-mega-extremely-long-task-name-that-definitely-exceeds-the-old-sixty-character-hard-limit" +assert_contains "mise tasks ls" "short" +assert_contains "mise tasks ls" "medium-length-task-name" +assert_contains "mise tasks ls" "very-long-task-name-that-exceeds-sixty-characters-to-test-truncation" +assert_contains "mise tasks ls" "super-duper-ultra-mega-extremely-long-task-name-that-definitely-exceeds-the-old-sixty-character-hard-limit" # Test that we can still run tasks with long names assert_succeed "mise run short" diff --git a/e2e/tasks/test_task_edit_nested_names b/e2e/tasks/test_task_edit_nested_names index d80e8968dc..9a892b31f0 100755 --- a/e2e/tasks/test_task_edit_nested_names +++ b/e2e/tasks/test_task_edit_nested_names @@ -20,8 +20,8 @@ EDITOR_EOF chmod +x fake-editor # Test 1: Create a task with nested colons using task edit -echo "Running: mise task edit foo:bar:baz --path" -TASK_PATH=$(mise task edit foo:bar:baz --path 2>&1) +echo "Running: mise tasks edit foo:bar:baz --path" +TASK_PATH=$(mise tasks edit foo:bar:baz --path 2>&1) # Verify the file was created if [ ! -f "$TASK_PATH" ]; then @@ -48,7 +48,7 @@ assert_contains "mise run foo:bar:baz" "nested task executed" assert_contains "mise tasks ls" "foo:bar:baz" # Test 3: Try editing an existing nested task (should not create duplicates) -TASK_PATH2=$(mise task edit foo:bar:baz --path 2>&1) +TASK_PATH2=$(mise tasks edit foo:bar:baz --path 2>&1) if [ "$TASK_PATH" != "$TASK_PATH2" ]; then echo "ERROR: Editing the same task twice gave different paths" @@ -58,7 +58,7 @@ if [ "$TASK_PATH" != "$TASK_PATH2" ]; then fi # Test 4: Create a task with multiple levels of nesting -TASK_PATH3=$(mise task edit deploy:prod:backend:api --path 2>&1) +TASK_PATH3=$(mise tasks edit deploy:prod:backend:api --path 2>&1) if [ ! -f "$TASK_PATH3" ]; then echo "ERROR: Deeply nested task file was not created at $TASK_PATH3" diff --git a/e2e/tasks/test_task_info b/e2e/tasks/test_task_info index 9b56142109..1da1cb5e06 100644 --- a/e2e/tasks/test_task_info +++ b/e2e/tasks/test_task_info @@ -1,7 +1,7 @@ #!/usr/bin/env bash mkdir -p mise-tasks && echo "" >mise-tasks/build.sh && chmod +x mise-tasks/build.sh -assert "mise task info build" 'Task: build +assert "mise tasks info build" 'Task: build Description: Source: ~/workdir/mise-tasks/build.sh File: ~/workdir/mise-tasks/build.sh @@ -10,16 +10,16 @@ Usage Spec: name build bin build' -assert_contains "mise task info build.sh --json" '"name": "build"' +assert_contains "mise tasks info build.sh --json" '"name": "build"' -assert_json_partial_object "mise task info build --json" "name,source,description" '{ +assert_json_partial_object "mise tasks info build --json" "name,source,description" '{ "name": "build", "source": "'"$PWD"'/mise-tasks/build.sh", "description": "" }' mise tasks add lint --depends "build -v" -- 'echo "linting!"' -assert_json "mise task info lint --json" "$( +assert_json "mise tasks info lint --json" "$( cat <.config/mise/conf.d/confdtask-config.toml run = 'echo "confdtask"' EOF -assert "mise task ls" "confdtask +assert "mise tasks ls" "confdtask filetask2 filetask3 lint test test-with-args" -assert "mise task -x ls" "confdtask ./.config/mise/conf.d/confdtask-config.toml +assert "mise tasks -x ls" "confdtask ./.config/mise/conf.d/confdtask-config.toml filetask2 ./mytasks/filetask2 filetask3 ./mytasks/filetask3.sh lint ./mise.toml test ./tasks.toml test-with-args ./tasks.toml" -assert_json "mise task ls --json" "$( +assert_json "mise tasks ls --json" "$( cat <mise.toml @@ -18,9 +18,9 @@ description = "Task with flags" EOF # Test basic usage output format contains expected tasks -assert_contains "mise task ls --usage" 'cmd simple help="A simple task with no arguments"' -assert_contains "mise task ls --usage" 'cmd with-args help="Task with arguments"' -assert_contains "mise task ls --usage" 'cmd with-flags help="Task with flags"' +assert_contains "mise tasks ls --usage" 'cmd simple help="A simple task with no arguments"' +assert_contains "mise tasks ls --usage" 'cmd with-args help="Task with arguments"' +assert_contains "mise tasks ls --usage" 'cmd with-flags help="Task with flags"' # Test 2: Tasks with aliases and dependencies cat <mise.toml @@ -35,9 +35,9 @@ alias = "c" depends = ["parent"] EOF -assert_contains "mise task ls --usage" 'cmd parent help="Parent task"' -assert_contains "mise task ls --usage" 'cmd child help="Child task"' -assert_contains "mise task ls --usage" 'alias c' +assert_contains "mise tasks ls --usage" 'cmd parent help="Parent task"' +assert_contains "mise tasks ls --usage" 'cmd child help="Child task"' +assert_contains "mise tasks ls --usage" 'alias c' # Test 3: File-based tasks mkdir -p mise-tasks @@ -48,7 +48,7 @@ echo "file task" EOF chmod +x mise-tasks/file-task -assert_contains "mise task ls --usage" 'cmd file-task help="A file-based task"' +assert_contains "mise tasks ls --usage" 'cmd file-task help="A file-based task"' # Test 4: Hidden tasks should not appear cat <mise.toml @@ -62,8 +62,8 @@ description = "Hidden task" hide = true EOF -assert_contains "mise task ls --usage" 'cmd visible help="Visible task"' -assert_not_contains "mise task ls --usage" 'cmd hidden help="Hidden task"' +assert_contains "mise tasks ls --usage" 'cmd visible help="Visible task"' +assert_not_contains "mise tasks ls --usage" 'cmd hidden help="Hidden task"' # Test 5: Task with no description cat <mise.toml @@ -71,7 +71,7 @@ cat <mise.toml run = 'echo "no description"' EOF -assert_contains "mise task ls --usage" 'cmd no-desc' +assert_contains "mise tasks ls --usage" 'cmd no-desc' # Test 6: Performance test - should be fast even with complex environment cat <mise.toml @@ -87,6 +87,6 @@ node = "latest" EOF # This should complete quickly (within 5 seconds) -timeout 5 mise task ls --usage >/dev/null || fail "Usage generation took too long" +timeout 5 mise tasks ls --usage >/dev/null || fail "Usage generation took too long" echo "All usage display tests passed!" diff --git a/e2e/tasks/test_task_project_root b/e2e/tasks/test_task_project_root index e7c1b39211..b551b3ddc6 100644 --- a/e2e/tasks/test_task_project_root +++ b/e2e/tasks/test_task_project_root @@ -1,4 +1,4 @@ #!/usr/bin/env bash -mise task add a:b:c --file -- echo \$MISE_PROJECT_ROOT +mise tasks add a:b:c --file -- echo \$MISE_PROJECT_ROOT assert "mise a:b:c" "$PWD" diff --git a/e2e/tasks/test_task_run_output b/e2e/tasks/test_task_run_output index be47a5b627..d7951c1bc8 100644 --- a/e2e/tasks/test_task_run_output +++ b/e2e/tasks/test_task_run_output @@ -44,7 +44,7 @@ running z" # now the graph isn't linear so it uses prefix assert_contains "mise run a ::: d" "[a] running a" assert_contains "mise run a ::: d" "[d] running d" -assert "mise task deps" "a +assert "mise tasks deps" "a all ├── c │ └── b diff --git a/e2e/tasks/test_task_usage b/e2e/tasks/test_task_usage index 7cba6a7867..d437ac6004 100644 --- a/e2e/tasks/test_task_usage +++ b/e2e/tasks/test_task_usage @@ -1,21 +1,21 @@ #!/usr/bin/env bash # tests that "test.sh" gets mapped to "test" except when an existing task is there named "test" -assert "mise task add --file test.sh --description sh" -assert "mise task ls" "test sh" -assert_json_partial_array "mise task ls --json" "name,description,source" "[ +assert "mise tasks add --file test.sh --description sh" +assert "mise tasks ls" "test sh" +assert_json_partial_array "mise tasks ls --json" "name,description,source" "[ { \"name\": \"test\", \"description\": \"sh\", \"source\": \"$PWD/mise-tasks/test.sh\" } ]" -assert "mise task ls --usage" 'cmd test help=sh' +assert "mise tasks ls --usage" 'cmd test help=sh' -assert "mise task add --file test --description no-sh" -assert "mise task ls" "test no-sh +assert "mise tasks add --file test --description no-sh" +assert "mise tasks ls" "test no-sh test.sh sh" -assert_json_partial_array "mise task ls --json" "name,description,source" "[ +assert_json_partial_array "mise tasks ls --json" "name,description,source" "[ { \"name\": \"test\", \"description\": \"no-sh\", @@ -28,7 +28,7 @@ assert_json_partial_array "mise task ls --json" "name,description,source" "[ } ]" -assert_json_partial_array "mise task ls --json" "name,description,source" "$( +assert_json_partial_array "mise tasks ls --json" "name,description,source" "$( cat <mise.toml @@ -22,9 +22,9 @@ run = "echo b" depends = ["a"] EOF -assert_contains "mise task validate 2>&1 || true" "Circular dependency detected" -assert_contains "mise task validate 2>&1 || true" "circular-dependency" -assert_contains "mise task validate 2>&1 || true" "a -> b -> a" +assert_contains "mise tasks validate 2>&1 || true" "Circular dependency detected" +assert_contains "mise tasks validate 2>&1 || true" "circular-dependency" +assert_contains "mise tasks validate 2>&1 || true" "a -> b -> a" # Test missing dependency cat <mise.toml @@ -36,8 +36,8 @@ run = "echo invalid" depends = ["non-existent"] EOF -assert_contains "mise task validate 2>&1 || true" "Dependency 'non-existent' not found" -assert_contains "mise task validate 2>&1 || true" "missing-dependency" +assert_contains "mise tasks validate 2>&1 || true" "Dependency 'non-existent' not found" +assert_contains "mise tasks validate 2>&1 || true" "missing-dependency" # Test invalid timeout cat <mise.toml @@ -46,8 +46,8 @@ run = "echo test" timeout = "not-a-duration" EOF -assert_contains "mise task validate 2>&1 || true" "Invalid timeout format" -assert_contains "mise task validate 2>&1 || true" "invalid-timeout" +assert_contains "mise tasks validate 2>&1 || true" "Invalid timeout format" +assert_contains "mise tasks validate 2>&1 || true" "invalid-timeout" # Test valid timeout formats cat <mise.toml @@ -64,7 +64,7 @@ run = "echo test" timeout = "1h" EOF -assert_contains "mise task validate" "✓ All 3 task(s) validated successfully" +assert_contains "mise tasks validate" "✓ All 3 task(s) validated successfully" # Test duplicate aliases (should only report once, not for each task) cat <mise.toml @@ -77,10 +77,10 @@ run = "echo 2" alias = "myalias" EOF -assert_contains "mise task validate 2>&1 || true" "Alias 'myalias' is used by multiple tasks" -assert_contains "mise task validate 2>&1 || true" "alias-conflict" +assert_contains "mise tasks validate 2>&1 || true" "Alias 'myalias' is used by multiple tasks" +assert_contains "mise tasks validate 2>&1 || true" "alias-conflict" # Verify the error is only reported once (not duplicated for each task) -error_count=$(mise task validate 2>&1 | grep -c "Alias 'myalias' is used by multiple tasks" || true) +error_count=$(mise tasks validate 2>&1 | grep -c "Alias 'myalias' is used by multiple tasks" || true) [ "$error_count" = "1" ] || (echo "Expected 1 alias conflict error, got $error_count" && exit 1) # Test empty task @@ -89,8 +89,8 @@ cat <mise.toml description = "empty task" EOF -assert_contains "mise task validate 2>&1 || true" "Task has no executable content" -assert_contains "mise task validate 2>&1 || true" "no-execution" +assert_contains "mise tasks validate 2>&1 || true" "Task has no executable content" +assert_contains "mise tasks validate 2>&1 || true" "no-execution" # Test invalid glob pattern cat <mise.toml @@ -99,8 +99,8 @@ run = "echo test" sources = ["[invalid-glob"] EOF -assert_contains "mise task validate 2>&1 || true" "Invalid source glob pattern" -assert_contains "mise task validate 2>&1 || true" "invalid-glob-pattern" +assert_contains "mise tasks validate 2>&1 || true" "Invalid source glob pattern" +assert_contains "mise tasks validate 2>&1 || true" "invalid-glob-pattern" # Test JSON output cat <mise.toml @@ -112,9 +112,9 @@ run = "echo invalid" depends = ["missing"] EOF -assert_contains "mise task validate --json 2>&1 || true" '"tasks_validated": 2' -assert_contains "mise task validate --json 2>&1 || true" '"errors": 1' -assert_contains "mise task validate --json 2>&1 || true" '"category": "missing-dependency"' +assert_contains "mise tasks validate --json 2>&1 || true" '"tasks_validated": 2' +assert_contains "mise tasks validate --json 2>&1 || true" '"errors": 1' +assert_contains "mise tasks validate --json 2>&1 || true" '"category": "missing-dependency"' # Test errors-only flag cat <mise.toml @@ -126,8 +126,8 @@ file = "./non-executable.sh" EOF touch non-executable.sh -assert_contains "mise task validate --errors-only 2>&1 || true" "error-task" -assert_not_contains "mise task validate --errors-only 2>&1 || true" "warning-task" +assert_contains "mise tasks validate --errors-only 2>&1 || true" "error-task" +assert_not_contains "mise tasks validate --errors-only 2>&1 || true" "warning-task" # Test specific task validation cat <mise.toml @@ -138,8 +138,8 @@ run = "echo good" depends = ["missing"] EOF -assert_contains "mise task validate good" "✓ All 1 task(s) validated successfully" -assert_contains "mise task validate bad 2>&1 || true" "Dependency 'missing' not found" +assert_contains "mise tasks validate good" "✓ All 1 task(s) validated successfully" +assert_contains "mise tasks validate bad 2>&1 || true" "Dependency 'missing' not found" # Test validation with file-based tasks mkdir -p mise-tasks @@ -156,7 +156,7 @@ cat <mise.toml run = "echo valid" EOF -assert_contains "mise task validate filetask" "✓ All 1 task(s) validated successfully" +assert_contains "mise tasks validate filetask" "✓ All 1 task(s) validated successfully" # Test missing file cat <mise.toml @@ -164,8 +164,8 @@ cat <mise.toml file = "./does-not-exist.sh" EOF -assert_contains "mise task validate 2>&1 || true" "Task file not found" -assert_contains "mise task validate 2>&1 || true" "missing-file" +assert_contains "mise tasks validate 2>&1 || true" "Task file not found" +assert_contains "mise tasks validate 2>&1 || true" "missing-file" # Clean up before next test rm -rf mise-tasks non-executable.sh @@ -182,8 +182,8 @@ run = [ ] EOF -assert_contains "mise task validate" "✓ All 2 task(s) validated successfully" +assert_contains "mise tasks validate" "✓ All 2 task(s) validated successfully" # Test that command-line validation can use task aliases -assert_contains "mise task validate b" "✓ All 1 task(s) validated successfully" -assert_contains "mise task validate build" "✓ All 1 task(s) validated successfully" +assert_contains "mise tasks validate b" "✓ All 1 task(s) validated successfully" +assert_contains "mise tasks validate build" "✓ All 1 task(s) validated successfully" diff --git a/man/man1/mise.1 b/man/man1/mise.1 index b345f514aa..55711686b0 100644 --- a/man/man1/mise.1 +++ b/man/man1/mise.1 @@ -92,7 +92,7 @@ Sets log level to trace \fB\fR Task to run. -Shorthand for `mise task run `. +Shorthand for `mise tasks run `. .TP \fB\fR Task arguments @@ -2306,7 +2306,7 @@ Run the task in a specific directory Create a file task instead of a toml task .TP \fB\-H, \-\-hide\fR -Hide the task from `mise task` and completions +Hide the task from `mise tasks` and completions .TP \fB\-q, \-\-quiet\fR Do not print the command before running diff --git a/mise.usage.kdl b/mise.usage.kdl index 4f0bd88184..a0de660def 100644 --- a/mise.usage.kdl +++ b/mise.usage.kdl @@ -55,7 +55,7 @@ flag --timings help="Shows elapsed time after each task completes" hide=#true { long_help "Shows elapsed time after each task completes\n\nDefault to always show with `MISE_TASK_TIMINGS=1`" } flag --trace help="Sets log level to trace" hide=#true global=#true -arg "[TASK]" help="Task to run" help_long="Task to run.\n\nShorthand for `mise task run `." required=#false +arg "[TASK]" help="Task to run" help_long="Task to run.\n\nShorthand for `mise tasks run `." required=#false arg "[TASK_ARGS]…" help="Task arguments" required=#false var=#true hide=#true arg "[-- TASK_ARGS_LAST]…" required=#false var=#true hide=#true cmd activate help="Initializes mise in the current shell session" { @@ -370,7 +370,7 @@ cmd generate subcommand_required=#true help="Generate files for various tools/se } cmd task-stubs help="Generates shims to run mise tasks" { long_help "Generates shims to run mise tasks\n\nBy default, this will build shims like ./bin/. These can be paired with `mise generate bootstrap`\nso contributors to a project can execute mise tasks without installing mise into their system." - after_long_help "Examples:\n\n $ mise task add test -- echo 'running tests'\n $ mise generate task-stubs\n $ ./bin/test\n running tests\n" + after_long_help "Examples:\n\n $ mise tasks add test -- echo 'running tests'\n $ mise generate task-stubs\n $ ./bin/test\n running tests\n" flag "-d --dir" help="Directory to create task stubs inside of" default=bin { arg } @@ -904,7 +904,7 @@ cmd tasks help="Manage tasks" { flag --usage hide=#true global=#true arg "[TASK]" help="Task name to get info of" required=#false cmd add help="Create a new task" { - after_long_help "Examples:\n\n $ mise task add pre-commit --depends \"test\" --depends \"render\" -- echo pre-commit\n" + after_long_help "Examples:\n\n $ mise tasks add pre-commit --depends \"test\" --depends \"render\" -- echo pre-commit\n" flag "-a --alias" help="Other names for the task" var=#true { arg } @@ -915,7 +915,7 @@ cmd tasks help="Manage tasks" { arg } flag "-f --file" help="Create a file task instead of a toml task" - flag "-H --hide" help="Hide the task from `mise task` and completions" + flag "-H --hide" help="Hide the task from `mise tasks` and completions" flag "-q --quiet" help="Do not print the command before running" flag "-r --raw" help="Directly connect stdin/stdout/stderr" flag "-s --sources" help="Glob patterns of files this task uses as input" var=#true { @@ -1030,7 +1030,7 @@ cmd tasks help="Manage tasks" { mount run="mise tasks --usage" } cmd validate help="Validate tasks for common errors and issues" { - after_long_help "Examples:\n\n # Validate all tasks\n $ mise task validate\n\n # Validate specific tasks\n $ mise task validate build test\n\n # Output results as JSON\n $ mise task validate --json\n\n # Only show errors (skip warnings)\n $ mise task validate --errors-only\n\nValidation Checks:\n\nThe validate command performs the following checks:\n\n • Circular Dependencies: Detects dependency cycles\n • Missing References: Finds references to non-existent tasks\n • Usage Spec Parsing: Validates #USAGE directives and specs\n • Timeout Format: Checks timeout values are valid durations\n • Alias Conflicts: Detects duplicate aliases across tasks\n • File Existence: Verifies file-based tasks exist\n • Directory Templates: Validates directory paths and templates\n • Shell Commands: Checks shell executables exist\n • Glob Patterns: Validates source and output patterns\n • Run Entries: Ensures tasks reference valid dependencies\n" + after_long_help "Examples:\n\n # Validate all tasks\n $ mise tasks validate\n\n # Validate specific tasks\n $ mise tasks validate build test\n\n # Output results as JSON\n $ mise tasks validate --json\n\n # Only show errors (skip warnings)\n $ mise tasks validate --errors-only\n\nValidation Checks:\n\nThe validate command performs the following checks:\n\n • Circular Dependencies: Detects dependency cycles\n • Missing References: Finds references to non-existent tasks\n • Usage Spec Parsing: Validates #USAGE directives and specs\n • Timeout Format: Checks timeout values are valid durations\n • Alias Conflicts: Detects duplicate aliases across tasks\n • File Existence: Verifies file-based tasks exist\n • Directory Templates: Validates directory paths and templates\n • Shell Commands: Checks shell executables exist\n • Glob Patterns: Validates source and output patterns\n • Run Entries: Ensures tasks reference valid dependencies\n" flag --errors-only help="Only show errors (skip warnings)" flag --json help="Output validation results in JSON format" arg "[TASKS]…" help="Tasks to validate\nIf not specified, validates all tasks" required=#false var=#true diff --git a/src/cli/generate/task_stubs.rs b/src/cli/generate/task_stubs.rs index d3c584efaf..daa589a54a 100644 --- a/src/cli/generate/task_stubs.rs +++ b/src/cli/generate/task_stubs.rs @@ -57,7 +57,7 @@ exec {mise_bin} run {display_name} "$@" static AFTER_LONG_HELP: &str = color_print::cstr!( r#"Examples: - $ mise task add test -- echo 'running tests' + $ mise tasks add test -- echo 'running tests' $ mise generate task-stubs $ ./bin/test running tests diff --git a/src/cli/mod.rs b/src/cli/mod.rs index 2121acbcad..d40be06e51 100644 --- a/src/cli/mod.rs +++ b/src/cli/mod.rs @@ -679,7 +679,7 @@ const LONG_ABOUT: &str = const LONG_TASK_ABOUT: &str = r#"Task to run. -Shorthand for `mise task run `."#; +Shorthand for `mise tasks run `."#; static AFTER_LONG_HELP: &str = color_print::cstr!( r#"Examples: diff --git a/src/cli/tasks/add.rs b/src/cli/tasks/add.rs index 0c8590c9f6..fd3de27787 100644 --- a/src/cli/tasks/add.rs +++ b/src/cli/tasks/add.rs @@ -28,7 +28,7 @@ pub struct TasksAdd { /// Create a file task instead of a toml task #[clap(long, short)] file: bool, - /// Hide the task from `mise task` and completions + /// Hide the task from `mise tasks` and completions #[clap(long, short = 'H')] hide: bool, /// Do not print the command before running @@ -222,6 +222,6 @@ impl TasksAdd { static AFTER_LONG_HELP: &str = color_print::cstr!( r#"Examples: - $ mise task add pre-commit --depends "test" --depends "render" -- echo pre-commit + $ mise tasks add pre-commit --depends "test" --depends "render" -- echo pre-commit "# ); diff --git a/src/cli/tasks/validate.rs b/src/cli/tasks/validate.rs index 273d366c8e..a0499a8be1 100644 --- a/src/cli/tasks/validate.rs +++ b/src/cli/tasks/validate.rs @@ -683,16 +683,16 @@ static AFTER_LONG_HELP: &str = color_print::cstr!( r#"Examples: # Validate all tasks - $ mise task validate + $ mise tasks validate # Validate specific tasks - $ mise task validate build test + $ mise tasks validate build test # Output results as JSON - $ mise task validate --json + $ mise tasks validate --json # Only show errors (skip warnings) - $ mise task validate --errors-only + $ mise tasks validate --errors-only Validation Checks: diff --git a/xtasks/fig/src/mise.ts b/xtasks/fig/src/mise.ts index 28ecc77046..32d443d357 100644 --- a/xtasks/fig/src/mise.ts +++ b/xtasks/fig/src/mise.ts @@ -2566,7 +2566,7 @@ const completionSpec: Fig.Spec = { }, { name: ["-H", "--hide"], - description: "Hide the task from `mise task` and completions", + description: "Hide the task from `mise tasks` and completions", isRepeatable: false, }, {