### Install p on Debian/Ubuntu Source: https://github.com/codetease/p/blob/main/docs/installation.md Configure the APT repository and install the 'p' package. Ensure you have sudo privileges. ```bash curl -1sLf 'https://dl.cloudsmith.io/public/codetease/tools/setup.deb.sh' | sudo -E distro=ubuntu codename=noble bash sudo apt install p ``` -------------------------------- ### Install p with Homebrew on macOS/Linux Source: https://github.com/codetease/p/blob/main/docs/installation.md Tap the custom Homebrew repository and install the 'p' package. ```bash brew tap codetease/homebrew-tap brew install p ``` -------------------------------- ### Install p with Scoop Source: https://github.com/codetease/p/blob/main/docs/installation.md Add the custom Scoop bucket and install the 'p' package. ```powershell scoop bucket add scoop-bucket https://github.com/codetease/scoop-bucket scoop install scoop-bucket/p ``` -------------------------------- ### Configuration Extension Example Source: https://context7.com/codetease/p/llms.txt Illustrates using a 'p.local.toml' file for local developer overrides, merging with the base 'p.toml'. ```toml # p.local.toml (add to .gitignore) [env] DATABASE_URL = "postgres://localhost:5432/my_local_dev_db" DEBUG = "true" [runner.dev-server] cmds = ["cargo run -- --port 3001 --watch"] ``` -------------------------------- ### Example Task Output Source: https://github.com/codetease/p/blob/main/docs/getting-started.md The expected output when running the 'hello' task. ```text Hello, Pavidi! ``` -------------------------------- ### Running a Release Task Source: https://context7.com/codetease/p/llms.txt Example of executing the 'release' task and the output when the task is up-to-date. ```bash p release # ⚡ Running task: release # ✨ Task 'release' is up-to-date. Skipping. ← if inputs unchanged ``` -------------------------------- ### Install p on RHEL/CentOS/Fedora Source: https://github.com/codetease/p/blob/main/docs/installation.md Configure the YUM/DNF repository and install the 'p' package. Requires sudo privileges. ```bash curl -1sLf 'https://dl.cloudsmith.io/public/codetease/tools/setup.rpm.sh' | sudo -E distro=el codename=9 bash sudo dnf install p ``` -------------------------------- ### Install p with PowerShell Gallery Source: https://github.com/codetease/p/blob/main/docs/installation.md Register the Cloudsmith PowerShell repository and install the 'p' package or module. ```powershell Register-PackageSource -Name 'codetease/tools' -ProviderName NuGet -Location "https://nuget.cloudsmith.io/codetease/tools/v2/" -Trusted Register-PSRepository -Name 'codetease/tools' -SourceLocation "https://nuget.cloudsmith.io/codetease/tools/v2/" -InstallationPolicy 'trusted' Install-Package p -Source 'codetease/tools' # Or Install-Module p -Repository 'codetease/tools' ``` -------------------------------- ### Executing the Clean Task Source: https://context7.com/codetease/p/llms.txt Example of running the 'clean' task, with a comment explaining its effect. ```bash p clean # Removes target/, dist/, and .cache/ recursively without error if absent ``` -------------------------------- ### Install p on Alpine Linux Source: https://github.com/codetease/p/blob/main/docs/installation.md Configure the APK repository and install the 'p' package. Requires sudo privileges. ```bash curl -1sLf 'https://dl.cloudsmith.io/public/codetease/tools/setup.alpine.sh' | sudo -E distro=alpine codename=any-version bash apk add p ``` -------------------------------- ### Install Pavidi from Source Source: https://github.com/codetease/p/blob/main/README.md Build and install Pavidi using Cargo. Ensure the cargo bin directory is in your system's PATH. ```bash cargo install --path . ``` -------------------------------- ### Install p with Chocolatey Source: https://github.com/codetease/p/blob/main/docs/installation.md Add the Cloudsmith Chocolatey source and install the 'p' package. ```powershell choco source add -n codetease/tools -s https://nuget.cloudsmith.io/codetease/tools/v3/index.json choco install p -s codetease/tools ``` -------------------------------- ### Basic Pavidi Configuration (`p.toml`) Source: https://github.com/codetease/p/blob/main/README.md Example p.toml file defining project metadata, environment variables, and basic tasks for building, testing, and cleaning. ```toml [project] name = "my-awesome-project" version = "0.1.0" [env] RUST_LOG = "info" PORT = "8080" [runner.build] cmds = ["cargo build --release"] description = "Build the project" [runner.test] cmds = ["cargo test"] deps = ["build"] ignore_failure = false [runner.clean] cmds = ["p:rm -rf target/"] description = "Clean build artifacts" ``` -------------------------------- ### Install p via NuGet in PowerShell Source: https://github.com/codetease/p/blob/main/docs/installation.md Register the Cloudsmith NuGet feed and install the 'p' package using PowerShell. ```powershell Register-PackageSource -Name 'codetease/tools' -ProviderName NuGet -Location "https://nuget.cloudsmith.io/codetease/tools/v3/index.json" Install-Package p -Source 'codetease/tools' ``` -------------------------------- ### Install p on Arch Linux Source: https://github.com/codetease/p/blob/main/docs/installation.md Build and install the 'p' package from the provided PKGBUILD artifact. Requires tar and makepkg. ```bash curl -LO https://github.com/CodeTease/p/releases/download/v0.2.0/p-0.2.0-archlinux-pkgbuild.tar.gz tar -xzf p-0.2.0-archlinux-pkgbuild.tar.gz makepkg -si ``` -------------------------------- ### Command Argument Expansion with Bash Examples Source: https://context7.com/codetease/p/llms.txt Illustrates how positional arguments and splat arguments are expanded in bash commands. ```bash # Positional argument p greet -- Alice # → echo Hello, Alice! Running on port 8080. # Splat all args p deploy-env -- --region us-east-1 --force # → ./deploy.sh --region us-east-1 --force ``` -------------------------------- ### Define a Pavidi Task Source: https://github.com/codetease/p/blob/main/docs/getting-started.md Create a `p.toml` file in your project root to define project metadata and tasks. This example sets up a simple 'hello' task. ```toml [project] name = "hello-pavidi" version = "0.1.0" [runner.hello] cmds = ["echo 'Hello, Pavidi!'"] description = "Prints a greeting" ``` -------------------------------- ### Pavidi Portable Command Example Source: https://github.com/codetease/p/blob/main/README.md Example of using Pavidi's built-in portable 'p:rm' command for cross-platform file removal. ```toml clean = "p:rm -rf target/ dist/" ``` -------------------------------- ### Run a Pavidi Task Source: https://github.com/codetease/p/blob/main/README.md Execute a defined task using the Pavidi CLI. This example runs the 'build' task. ```bash p build ``` -------------------------------- ### Run a Pavidi Task Source: https://github.com/codetease/p/blob/main/docs/getting-started.md Execute a defined task by running `p ` in your terminal. This example runs the 'hello' task. ```bash p hello ``` -------------------------------- ### Show Info with CLI Source: https://github.com/codetease/p/blob/main/README.md Display loaded configuration and extensions information using the CLI. ```bash p -i ``` ```bash p --info ``` -------------------------------- ### Applying Configuration Extensions Source: https://context7.com/codetease/p/llms.txt Shows how to view applied configuration extensions using the '--info' flag. ```bash p --info # Extensions Applied # - p.local.toml: Local developer overrides ``` -------------------------------- ### Portable Command for Creating Directories Source: https://context7.com/codetease/p/llms.txt Configures a 'setup-dirs' task using the portable 'p:mkdir' command, which automatically creates parent directories. ```toml [runner.setup-dirs] cmds = [ "p:mkdir build/logs", "p:mkdir dist/assets/images", ] ``` -------------------------------- ### List Available Tasks with Pavidi CLI Source: https://context7.com/codetease/p/llms.txt Display all defined task names and their descriptions from the p.toml configuration file, sorted alphabetically. ```bash p --list # Output: # 📦 my-project (Project) # # Available Tasks: # build Build the release binary # clean Remove build artifacts # deploy Deploy to production # test Run the test suite ``` -------------------------------- ### Show Project Information with Pavidi CLI Source: https://context7.com/codetease/p/llms.txt Display project metadata from p.toml and list all loaded extension configuration files. ```bash p --info # Output: # Project Information # Name: my-project # Version: 1.0.0 # Description: A sample project # # Extensions Applied # - p.local.toml (v1.0): Local developer overrides ``` -------------------------------- ### List Tasks with CLI Source: https://github.com/codetease/p/blob/main/README.md Display a list of available tasks using the CLI. ```bash p -l ``` ```bash p --list ``` -------------------------------- ### Executing Cached Build Task Source: https://context7.com/codetease/p/llms.txt Demonstrates running the 'build' task, showing the output for the first run and subsequent runs when inputs are unchanged. ```bash p build # First run: builds normally, saves hash # Second run: ✨ Task 'build' is up-to-date. Skipping. p build --trace # 🔍 [TRACE] Cache miss for 'build': Hash mismatch (sources or env changed). # Current: a3f1c9... # Cached: 7d02b8... ``` -------------------------------- ### Executing CI Pipeline with Parallel Dependencies Source: https://context7.com/codetease/p/llms.txt Demonstrates running the 'ci' task, showing the output for parallel dependency execution and the task completion. ```bash p ci # 🚀 Running dependencies in parallel: ["lint", "test", "audit"] # ⚡ Running task: ci # All checks passed ``` -------------------------------- ### Copy Files and Directories with p:cp Source: https://github.com/codetease/p/blob/main/docs/portable-commands.md Employ `p:cp` for consistent file and directory copying across platforms. Use the `-r` flag to copy directories recursively. ```toml backup = "p:cp -r src/ src_backup/" ``` -------------------------------- ### Smart Caching Configuration with Sources and Outputs Source: https://context7.com/codetease/p/llms.txt Configures 'build' and 'bundle' tasks with 'sources' and 'outputs' to enable Pavidi's incremental build cache. ```toml [runner.build] cmds = ["cargo build --release"] sources = ["src/**/*.rs", "Cargo.toml", "Cargo.lock"] outputs = ["target/release/myapp"] [runner.bundle] cmds = ["node esbuild.config.js"] sources = ["src/**/*.ts", "package.json", "package-lock.json"] outputs = ["dist/bundle.js", "dist/bundle.css"] ``` -------------------------------- ### Create Directories with p:mkdir Source: https://github.com/codetease/p/blob/main/docs/portable-commands.md The `p:mkdir` command creates directories, similar to `mkdir -p`, automatically creating parent directories as needed for cross-platform compatibility. ```toml setup = "p:mkdir -p build/logs" ``` -------------------------------- ### Preview Commands with Dry Run Source: https://github.com/codetease/p/blob/main/docs/advanced.md Use the `--dry-run` flag with commands like `p build` to preview the commands that would be executed without actually running them. ```bash p build --dry-run ``` -------------------------------- ### Configure Task Caching in p.toml Source: https://github.com/codetease/p/blob/main/docs/smart-caching.md Define 'sources' and 'outputs' for a task in p.toml to enable caching. 'sources' specify files to watch for changes, and 'outputs' list files created by the command. ```toml [runner.build] cmds = ["cargo build --release"] # Files to watch for changes sources = ["src/**/*.rs", "Cargo.toml", "Cargo.lock"] # Files created by the command outputs = ["target/release/pavidi"] ``` -------------------------------- ### Enable Trace Mode for Detailed Logs Source: https://github.com/codetease/p/blob/main/docs/advanced.md Use the `--trace` flag with commands like `p build` to view detailed execution logs, including environment variable resolution history. ```bash p build --trace ``` -------------------------------- ### Define Simple Tasks Source: https://github.com/codetease/p/blob/main/docs/task-runner.md Use a string or a list of strings for tasks that run a single command or multiple commands sequentially. ```toml [runner] clean = "rm -rf target/" format = ["cargo fmt", "prettier --write ."] ``` -------------------------------- ### List Available Pavidi Tasks Source: https://github.com/codetease/p/blob/main/docs/getting-started.md View all tasks defined in your project by running `p --list` or `p -l`. ```bash p --list ``` -------------------------------- ### Pavidi TOML Configuration: Project Section Source: https://context7.com/codetease/p/llms.txt Define project-wide metadata and execution settings in the [project] section of p.toml. This section is mutually exclusive with [module]. ```toml [project] name = "my-project" version = "1.0.0" authors = ["Alice "] description = "Sample project using Pavidi" # Force a specific shell (defaults: sh on Unix, pwsh/cmd on Windows) shell = "bash" # Log task output: "always" | "error-only" | "none" log_strategy = "always" # Disable colored output log_plain = false # Regex patterns whose matched values are redacted in logs secret_patterns = ["API_KEY_.*", "PASSWORD_.*", "TOKEN"] ``` -------------------------------- ### Inspect Environment Variables with Pavidi CLI Source: https://context7.com/codetease/p/llms.txt View resolved environment variables from p.toml, extension files, and .env files, grouped by their source. Use '--trace' to see the full override history. ```bash # Show resolved env grouped by source layer p --env # Show full provenance (who set what and what was overridden) p -e --trace # Output example with --trace: # DATABASE_URL: # ├── p.toml = postgres://localhost/dev (overridden) # └── .env = postgres://prod-host/db (active) ``` -------------------------------- ### Execute Simple Tasks with Pavidi CLI Source: https://context7.com/codetease/p/llms.txt Run tasks defined as simple strings or sequential command lists in the [runner] section of p.toml using the Pavidi CLI. ```bash p lint p format ``` -------------------------------- ### Trace Environment Variables with CLI Source: https://github.com/codetease/p/blob/main/README.md Show the origin of each environment variable using the CLI with the trace option. ```bash p -e --trace ``` -------------------------------- ### Pavidi Project Metadata Configuration Source: https://github.com/codetease/p/blob/main/README.md Configure project-specific settings like name, version, authors, shell, logging, and secret patterns. ```toml [project] name = "my-project" version = "1.0.0" authors = ["Alice "] description = "A sample project" shell = "bash" # Optional: Force a specific shell (defaults to system default) log_strategy = "always" # Options: "always", "error-only", "none" log_plain = false # Disable colored logs if true secret_patterns = ["API_KEY_.*"] # Regex patterns to redact in logs ``` -------------------------------- ### Inspect Resolved Environment Variables Source: https://github.com/codetease/p/blob/main/docs/advanced.md Run `p --env` to see the final environment variables available to your tasks. Combine with `--trace` to understand the origin of each variable. ```bash p --env ``` ```bash p -e --trace ``` -------------------------------- ### Pavidi TOML Configuration: Simple Task Definitions Source: https://context7.com/codetease/p/llms.txt Define tasks in the [runner] section using a single string for a simple command or a list of strings for sequential execution. ```toml [runner] # Single command lint = "cargo clippy -- -D warnings" # Sequential command list (runs in order, stops on first failure) format = ["cargo fmt", "prettier --write ."] ``` -------------------------------- ### Inspect Environment Variables with CLI Source: https://github.com/codetease/p/blob/main/README.md Show resolved environment variables using the CLI. ```bash p --env ``` -------------------------------- ### Run a Task with CLI Source: https://github.com/codetease/p/blob/main/README.md Execute a specific task using the CLI. Arguments can be passed to the task after a '--' separator. ```bash p [TASK] [ARGS...] ``` ```bash p build ``` ```bash p run -- --port 9000 ``` -------------------------------- ### List Directory Contents with p:ls Source: https://github.com/codetease/p/blob/main/docs/portable-commands.md The `p:ls` command lists the contents of directories, offering a consistent way to view file system information regardless of the operating system. ```toml check = "p:ls dist/" ``` -------------------------------- ### Basic `p.toml` Structure Source: https://github.com/codetease/p/blob/main/docs/configuration.md Defines the fundamental sections of a `p.toml` file: project metadata, environment variables, and runner configurations. ```toml [project] name = "my-project" version = "1.0.0" shell = "bash" # Optional: Force a specific shell (defaults to system default) [env] PORT = "8080" APP_ENV = "dev" [runner] # Task definitions go here ``` -------------------------------- ### Enable Parallel Dependency Execution Source: https://github.com/codetease/p/blob/main/docs/task-runner.md Set `parallel = true` to run all listed dependencies simultaneously, speeding up workflows. ```toml [runner.ci] cmds = ["echo 'CI Finished'"] deps = ["lint", "test", "audit"] parallel = true ``` -------------------------------- ### Configure Advanced Tasks Source: https://github.com/codetease/p/blob/main/docs/task-runner.md For complex scenarios, use a table to define task properties like dependencies, conditions, and timeouts. ```toml [runner.deploy] cmds = ["./deploy.sh"] description = "Deploy to production" timeout = 600 ``` -------------------------------- ### Define Task Dependencies Source: https://github.com/codetease/p/blob/main/docs/task-runner.md Specify dependencies to ensure tasks run in the correct order. Pavidi executes dependencies before the main task. ```toml [runner.test] cmds = ["cargo test"] deps = ["build"] ``` -------------------------------- ### Full Task Definition with TOML Source: https://context7.com/codetease/p/llms.txt Defines a 'release' task with commands, dependencies, conditional execution, smart caching, OS overrides, and error handling. ```toml [runner.release] description = "Build, test, and package a release" cmds = ["cargo build --release", "./scripts/package.sh"] deps = ["lint", "test"] # Run before this task parallel = false # Run deps sequentially (default) # Conditional gates run_if = "test -f CHANGELOG.md" # Only run if file exists skip_if = "git diff --quiet" # Skip if working tree is clean # Smart caching sources = ["src/**/*.rs", "Cargo.toml", "Cargo.lock"] outputs = ["target/release/myapp"] # OS-specific command override (replaces cmds on matching OS) windows = ["cargo build --release", "powershell ./package.ps1"] linux = ["cargo build --release", "./scripts/package.sh"] macos = ["cargo build --release", "./scripts/package.sh"] # Error handling ignore_failure = false retry = 3 # Retry up to 3 times on failure retry_delay = 5 # Wait 5 seconds between retries timeout = 600 # Kill and fail after 600 seconds # Always runs after cmds, even on failure finally = ["p:rm -rf /tmp/build-scratch"] ``` -------------------------------- ### Pavidi Task Configuration - Full Control Source: https://github.com/codetease/p/blob/main/README.md Advanced task configuration including dependencies, parallel execution, conditional execution, smart caching, OS-specific commands, error handling, and cleanup. ```toml [runner.deploy] cmds = ["./deploy.sh"] deps = ["build", "test"] # Tasks to run before this one parallel = false # Run dependencies in parallel? (default: false) description = "Deploy the application" # Conditional Execution run_if = "test -f dist/app.bin" # Run only if command succeeds (exit code 0) skip_if = "git diff --quiet" # Skip if command succeeds # Smart Caching (Skip if inputs/outputs are up-to-date) sources = ["src/**/*.rs", "Cargo.toml"] outputs = ["target/release/app"] # OS-Specific Overrides windows = ["powershell ./deploy.ps1"] linux = ["./deploy.sh"] macos = ["./deploy.sh"] # Error Handling ignore_failure = false # Fail if command fails? (default: false) retry = 3 # Number of retries retry_delay = 5 # Seconds between retries timeout = 600 # Timeout in seconds # Cleanup finally = ["p:rm tmp_file"] # Always runs after task (even on failure) ``` -------------------------------- ### Portable Command for Copying Files and Directories Source: https://context7.com/codetease/p/llms.txt Defines a 'backup' task using the portable 'p:cp' command for recursive directory copying and individual file copying. ```toml [runner.backup] cmds = ["p:cp -r src/ src_backup/", "p:cp config.toml config.bak.toml"] ``` -------------------------------- ### Remove Files and Directories with p:rm Source: https://github.com/codetease/p/blob/main/docs/portable-commands.md Use `p:rm` for cross-platform file and directory removal. The `-r` flag enables recursive deletion, and `-f` forces the operation, ignoring nonexistent files. ```toml clean = "p:rm -rf target/ dist/" ``` -------------------------------- ### Pavidi TOML Configuration: Environment Variables Source: https://context7.com/codetease/p/llms.txt Define environment variables for tasks in the [env] section. Supports static values, dynamic shell commands, and overrides from .env files. Use P_ENV to select specific .env files. ```toml [env] # Static value PORT = "8080" DATABASE_URL = "postgres://localhost:5432/mydb" # Dynamic: evaluated at load time via the configured shell GIT_HASH = "$(git rev-parse --short HEAD)" BUILD_DATE = "$(date +%Y-%m-%d)" # In .env (overrides p.toml at runtime): # DATABASE_URL=postgres://prod-host:5432/proddb ``` -------------------------------- ### Pavidi Task Definitions - Simple Commands Source: https://github.com/codetease/p/blob/main/README.md Define tasks using simple string commands or arrays of commands for sequential execution. ```toml [runner] lint = "cargo clippy" format = ["cargo fmt", "prettier --write ."] ``` -------------------------------- ### OS-Specific Command Overrides Source: https://github.com/codetease/p/blob/main/docs/task-runner.md Define different commands for Windows, Linux, and macOS to ensure cross-platform compatibility. ```toml [runner.open_browser] cmds = ["echo 'Opening browser...'"] windows = ["start http://localhost:8080"] linux = ["xdg-open http://localhost:8080"] macos = ["open http://localhost:8080"] ``` -------------------------------- ### Pavidi Environment Variables Configuration Source: https://github.com/codetease/p/blob/main/README.md Define static and dynamic environment variables for tasks. Pavidi also automatically loads .env files. ```toml [env] DATABASE_URL = "postgres://localhost:5432/mydb" API_KEY = "secret-123" # Dynamic variables (executed at runtime) GIT_HASH = "$(git rev-parse --short HEAD)" ``` -------------------------------- ### Define Cleanup Commands (`finally`) Source: https://github.com/codetease/p/blob/main/docs/task-runner.md Use the `finally` block to specify commands that run after the main commands, regardless of their success or failure. ```toml [runner.integration_test] cmds = ["./run_tests.sh"] finally = ["./cleanup_db.sh"] ``` -------------------------------- ### Concatenate and Display Files with p:cat Source: https://github.com/codetease/p/blob/main/docs/portable-commands.md Utilize `p:cat` to read and display the content of files. This command is useful for quickly viewing file contents in a cross-platform manner. ```toml show_config = "p:cat p.toml" ``` -------------------------------- ### Load Specific .env File with Pavidi Source: https://context7.com/codetease/p/llms.txt Specify which .env file to load for environment variable overrides by setting the P_ENV variable before executing a Pavidi command. ```bash # Load .env.staging instead of .env P_ENV=staging p deploy ``` -------------------------------- ### Command Argument Expansion with TOML Source: https://context7.com/codetease/p/llms.txt Define commands with placeholders for positional arguments and environment variables. Positional arguments are filled from CLI arguments after '--', and environment variables are substituted from the '[env]' section. ```toml [runner.greet] cmds = ["echo Hello, $1! Running on port ${PORT}."] [runner.deploy-env] cmds = ["./deploy.sh $@"] ``` -------------------------------- ### Task Dependencies and Parallel Execution Source: https://context7.com/codetease/p/llms.txt Defines multiple tasks ('lint', 'test', 'audit') and a 'ci' task that depends on them, running dependencies in parallel. ```toml [runner.lint] cmds = ["cargo clippy -- -D warnings"] [runner.test] cmds = ["cargo test --workspace"] [runner.audit] cmds = ["cargo audit"] [runner.ci] description = "Full CI pipeline" cmds = ["echo 'All checks passed'"] deps = ["lint", "test", "audit"] parallel = true # lint, test, audit run simultaneously ``` -------------------------------- ### Run a Task with Pavidi CLI Source: https://context7.com/codetease/p/llms.txt Execute a named task from p.toml. Pass extra arguments using '--' and use '--dry-run' for a simulation or '--trace' for detailed execution information. ```bash p build ``` ```bash p deploy -- --env production ``` ```bash p build --dry-run ``` ```bash p build --trace ``` -------------------------------- ### File System Capability Restrictions with TOML Source: https://context7.com/codetease/p/llms.txt Configure allowed file system paths for portable commands. Paths are resolved relative to the project root and deduplicated. ```toml [capability] allow_paths = ["dist/", "build/", "/tmp/ci-workspace"] ``` -------------------------------- ### Move or Rename Files with p:mv Source: https://github.com/codetease/p/blob/main/docs/portable-commands.md Use `p:mv` to move or rename files and directories. This command provides a reliable way to manage file locations across different operating systems. ```toml rename = "p:mv output.txt final_output.txt" ``` -------------------------------- ### Dynamic Environment Variables in `p.toml` Source: https://github.com/codetease/p/blob/main/docs/configuration.md Utilizes dynamic variable resolution by executing shell commands within `$(command)` syntax to capture their standard output as variable values. ```toml [env] # Capture the current git commit hash GIT_HASH = "$(git rev-parse --short HEAD)" # Capture the current date BUILD_DATE = "$(date +%Y-%m-%d)" ``` -------------------------------- ### Environment Variables in `p.toml` Source: https://github.com/codetease/p/blob/main/docs/configuration.md Sets environment variables that will be available to all tasks executed by Pavidi. Variables defined here can be overridden by `.env` files. ```toml [env] DATABASE_URL = "postgres://localhost:5432/mydb" API_KEY = "secret-123" ``` -------------------------------- ### Dry Run with CLI Source: https://github.com/codetease/p/blob/main/README.md Print commands without executing them for a dry run using the CLI. ```bash p --dry-run ``` -------------------------------- ### Portable Commands for File Operations Source: https://context7.com/codetease/p/llms.txt Defines a 'finalize' task using portable commands 'p:mv' for renaming/moving, 'p:ls' for listing contents, and 'p:cat' for displaying file content. ```toml [runner.finalize] cmds = [ "p:mv target/release/myapp dist/myapp", # rename/move "p:ls dist/", # verify contents "p:cat dist/VERSION", # print a file ] ``` -------------------------------- ### Portable Command for Recursive Removal Source: https://context7.com/codetease/p/llms.txt Configures a 'clean' task using the portable 'p:rm' command to recursively remove directories. ```toml [runner.clean] cmds = ["p:rm -rf target/ dist/ .cache/"] # Flags: -r / -R / --recursive (remove directories) # -f / --force (ignore missing files) ``` -------------------------------- ### Conditional Task Execution (`run_if`) Source: https://github.com/codetease/p/blob/main/docs/task-runner.md Use `run_if` with a command to execute the task only if the command succeeds (exit code 0). ```toml [runner.migrate] cmds = ["./migrate_db.sh"] run_if = "test -f db/migrations.sql" ``` -------------------------------- ### Conditional Task Skipping (`skip_if`) Source: https://github.com/codetease/p/blob/main/docs/task-runner.md Use `skip_if` with a command to skip the task if the command succeeds (exit code 0). ```toml [runner.setup] cmds = ["./install_deps.sh"] skip_if = "test -d node_modules" ``` -------------------------------- ### Configure Custom Secret Redaction Patterns Source: https://github.com/codetease/p/blob/main/docs/advanced.md Define custom regex patterns in `p.toml` under the `[project]` section to redact sensitive information like API keys or passwords from logs. ```toml [project] secret_patterns = ["API_KEY_.*", "PASSWORD_.*"] ``` -------------------------------- ### Ignore Task Failure Source: https://github.com/codetease/p/blob/main/docs/task-runner.md Set `ignore_failure = true` to allow the workflow to continue even if this task fails. ```toml [runner.flaky_task] cmds = ["./sometimes_fails.sh"] ignore_failure = true ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.