Changelog
v2.3.0
Released 2025-09-01
Features:
-
Garden variables can now be defined as being required variables. A required variable must evaluate to a non-empty string. If a required variable evaluates to an empty value then an error is reported and execution is aborted. (#21)
-
garden ls -ccnow displays command recipes.
Development:
garden-guiswitched over toegui_autocompletenow that our autocomplete multiple words feature was merged and released.
v2.2.0
Released 2025-05-11
Features:
-
garden lsnow has a-R | --no-remotesoption to disable the display of remotes. -
garden guinow avoids displaying duplicate trees. -
garden --helpnow uses ANSI colors.
Development:
-
The
xdgdependency was upgraded to v3.0. -
The
idna_adapterandmime_guess2crates were pinned to maintain the current MSRV of 1.81.0 forgarden-gui.
v2.1.0
Released 2025-02-23
Features:
-
Commands defined in Garden and Tree scopes are now runnable from the
garden guicommand palette. -
garden growis now runnable from thegarden guicommands and query results. -
garden lsis now runnable from thegarden guicommands and query results. -
Missing trees are now displayed in red in the
garden guiquery results. -
Tree names and paths can now be copied to the system clipboard from the
garden guiquery results. -
Autocompletion was added to the
garden guiquery field. -
Escape and Ctrl-Q hotkeys can now close the
garden guicommand details window. -
The Ctrl-Q hotkey will now close the main
garden guiwindow. -
garden lsnow has-G | --no-groupsand-N | --no-gardensoptions for omitting groups and gardens from its output.
Development:
-
The
v2.0.0release removedCargo.lockand added an entry for it to.gitignore. The.gitignoreentry has now been removed to make it easier for packagers to track their changes. -
The
yaml-rust2dependency was upgraded to v0.10. -
The
eguidependency was upgraded to v0.31.
Documentation:
- Windows support was improved in
v1.10.1to the point where we can now consider Windows as being officially supported. This development has now been documented in the installation section of the Garden User Guide.
Packaging:
- The Nightly Build artifacts from Gitlab CI have been updated to include
garden-gui.
v2.0.0
Released 2025-01-26
Features:
- A new
garden-guigraphical user interface for Garden is now available. Garden GUI is provided as a separatecargo install garden-guicrate.
Development:
-
The
dirsdependency was upgraded to v6.0. -
The
thiserrordependency was upgraded to v2.0. -
The
whichdependency was upgraded to v7.0.
v1.10.1
Released 2025-01-14
Features:
-
garden completionnow includes a comment in its output indicating which version ofgardenwas used to generate the completion script. -
Windows support was improved by avoiding UNC paths. (#20)
v1.10.0
Released 2024-12-14
Features:
-
garden growcan now filter the remotes that will be updated by specifying a glob pattern to the new--remoteoption. -
garden lsnow has a-s | --sortoption that allows you to sort trees by name or modification time.
Development:
- Use of the unmaintained
derivativecrate has been eliminated.
v1.9.1
Released 2024-11-06
Features:
GARDEN_CMD_VERBOSEandGARDEN_CMD_QUIETare now updated when usinggarden <command> -v ...andgarden cmd <command> -v .... Previously, these variables were only set when-vwas used against thegardencommand directly, before any sub-commands, e.g.garden -v ....
Fixes:
garden exec's parallel mode was made more robust.
v1.9.0
Released 2024-10-11
Features:
garden execcan now run commands in parallel using the-j# | --jobs=#option. (#43)
Packaging:
Development:
-
Internal APIs for running commands were refactored.
-
The
yaml-rust2dependency was upgraded to v0.9.
v1.8.0
Released 2024-09-26
Features:
-
garden cmdand custom commands now have a-j# | --jobs=#option for running commands in parallel. Use-j0 | --jobs=0to use all available cores. (#43) (#45) -
garden lsnow has a--reverse | -roption to display trees in reverse order. (#44)
Development:
- The
which,yansiandstrumdependencies were upgraded.yansiwas a new major version and required a fair amount of changes.struminvolved minor changes. (#42)
v1.7.0
Released 2024-06-29
Features:
-
garden lsnow has a--commands | -coption to display just commands. The related--no-commands | -Coption is used to omit commands from being displayed. (#39) (#41) -
garden cmdandgarden <custom-command>now support a--dry-run | -Noption to perform trial runs without actually running any commands. (#39) (#41) -
garden execmade-Nthe short option for its--dry-runoption and the original-nshort option was made an undocumented alias for compatibility. (#41) -
The
garden eval,garden exec,garden cmdand custom sub-commands now accept the same--define | -D name=valueoverride options as the rootgardencommand. -
garden growreports more details about the commands it runs and no longer prints redundantgit configcommands.
Fixes:
garden lsnow prints the list of commands in the same order as they appear ingarden.yaml. (#39) (#41)
Packaging:
-
The nix flake was updated to re-enable llvm coverage. (#38)
-
nix runcan now be used to rungardenandnix shellcan now be used to open a nix shell with garden installed. (#40)
Development:
-
More structs, functions and methods were made private.
-
Several types were renamed from "HashMap" to "Map".
v1.6.0
Released 2024-06-02
Features:
-
zshis now invoked usingzsh +o nomatchfor better portability across shells. This prevents zsh from erroring when wildcard patterns find no matches. Wildcards can be used, for example, to implement a customcleancommand that feedsrm -fusing wildcard patterns, but these commands would generate errors without disablingnomatch. The zshnomatchoption is a less useful option for non-interactive use so we disable it unconditionally. -
The
--verbose | -voption can now be passed to custom and built-in commands. Theverboseoption was previously a global option that had to be specified before sub-commands. The following invocations are all equivalent now:garden -vv buildgarden -v build -vgarden build -vv
(#36)
Packaging:
- The nix flake was updated to use Fenix for the latest stable rustc 1.78.0. (#37)
Development:
- An
.envrcfile was added to enable the nix flake for direnv users. (#37)
v1.5.0
Released 2024-04-14
Features:
-
Running
garden initinside a Git repository will now record the current directory as a tree with its path set to${GARDEN_CONFIG_DIR}. (#34) -
Custom commands skip missing trees by default. A new
-f | --forceoption can be used to makegardenrun commands on missing trees. (#33) -
garden plantnow avoids updating the configuration when a tree is re-planted and its configuration contains expressions that evaluate to the same value as currently exist in git. (#31) (#32)
Packaging:
- Prebuilt binaries are now available!
Development:
-
The original github repository under
davvid's namespace was transferred to the garden-rs organization on github. -
The
yaml-rust2dependency was upgraded to0.8.0to avoid theencodingcrate (RUSTSEC-2021-0153).
v1.4.1
Released 2024-03-22
Features:
- The empty directory detection in
garden growwas improved.
Development:
- The internal APIs were updated to use
AsRef<Path>wherever possible.
v1.4.0
Released 2024-03-21
Features:
-
Custom commands can now specify an interpreter to use on a per-command basis. If a command uses a shebang
#!line then the command's text will be passed as the next argument to the specified command. For example, using#!python3 -cas the first line in a custom command will causepython3 -c <command>to be executed. -
Trees can now use branches defined in separate remotes when configuring the default branch to checkout.
garden growwill now fetch the remote associated with the configured branch switching branches in order to make this possible. -
Trees can now use any upstream branch from any configured remote in the
branchessection. Previously, branches associated with non-default remotes could not be created unless they were fetched beforehand.garden growwill now fetch the associated remote before creating the local branch. -
garden grownow detects empty directories (e.g. the directories that are created when using uninitialized Git submodules) and will properly clone into the empty directories instead of treating them like an already-grown tree. (#30)
Development:
-
gardencan now be built on Windows. Symlink trees and the XDG base directory support is UNIX-only and disabled on Windows. (#17) -
yaml-rust2 is now used instead of the yaml-rust-davvid fork that was being maintained by @davvid for use by garden. (#29)
v1.3.0
Released 2024-02-19
Features:
-
garden evaland garden expressions in general will now resolve variables defined withinenvironmentblocks. Environment blocks were previously not considered when resolving variables. Environment blocks are now resolved and checked for variables when${variable}expressions do not find the variable in scopes with higher precedence. The precedence order, from strongest to weakest, is thevariablesblock in a garden's scope, thevariablesblock in a tree's scope, thevariablesblock in global configuration scope, theenvironmentsblock in a garden's scope, theenvironmentsblock in a tree's scope, theenvironmentsblock in global configuration scope and, lastly, OS environment variables. The first entry found is used when expanding variable expressions. (#23) -
Evaluation cycles (i.e. circular variable dependencies) are now prevented when evaluating garden variables. The evaluation engine will now return empty strings when a variable with a cyclical expression is evaluated. (#24)
-
When
zshis used as thegarden.shell, which happens automatically whenzshis installed,gardenwill now usezsh -o shwordsplitin order to enable word-splitting of$variableexpressions by default. This makeszshbehave just like other shells by default, which improves the portability of commands. Configuregarden.shell-wordsplittofalseor use thegarden <cmd> -z | --no-wordsplitoption to opt-out of this behavior. (#25) -
garden.shellcan now be configured to use arbitrary commands for executing command strings. Garden uses the configuredgarden.shellas-is and does not augment its options (e.g.-eor-o shwordsplit) when a custom command is used. Custom commands are identified as commands that expand to 2 or more command-line arguments. Thus,python3is not considered a custom command andgardenwill runpython3 -c <string>to run commands. On the other hand, specifyingruby -eis considered a custom command because it expands to["ruby", "-e"]under the hood. If you need to use a custom command that takes no additional command-line arguments then you can useenvas an extra argument to have it be considered as a custom shell. For example,env custom-shellwill causegardento runenv custom-shell <string>, which is equivalent tocustom-shell <string>. Using justcustom-shellwould have resulted ingardenrunningcustom-shell -c <string>instead, which may not be desired. (#26) -
The
garden shellcommand can now be configured to use an interactive command shell that is distinct from the command specified in thegarden.shellconfiguration by configuring thegarden.interactive-shellvalue. (#26) -
garden shellcan now be run without any arguments. The tree query now defaults to.so that the tree in the current directory is used when nothing is specified. (#26) -
Custom commands now have access to a
${GARDEN_CMD_VERBOSE}and${GARDEN_CMD_QUIET}variables which can be used to forward the--verboseand--quietarguments down into childgardeninvocations.${GARDEN_CMD_VERBOSE}uses the short-vflag in the value to support the case where the verbose option is specified multiples times to increase the verbosity level (e.g.-vv). (#27)
v1.2.1
Released 2024-02-05
Development:
-
The
yaml-rust-davviddependency was upgraded tov0.6.0. -
Documentation and code maintenance.
v1.2.0
Released 2024-01-27
Features:
-
If a garden file has no trees defined at all then an implicit tree called
.will now be synthesized into existence. The presence of this implicit tree allows garden files that define just the current directory as a tree to omit the entiretreessection altogether. This consequently makes it easier to use garden as a simple command runner because thecommandssection is the only section required in order to rungardencommands. -
When
garden.rootis not configuredgardenwill behave as ifgarden.rootis configured to${GARDEN_CONFIG_DIR}. This allows garden files to omitgarden.rootfrom their configuration in typical scenarios. -
Configuring
garden.rootto an empty string ("") will behave as ifgarden.rootis configured to the current directory from whichgardenwas run. -
When a
garden.yamlfile does not exist in the current directory then garden will walk up the file system searching forgarden.yamlor the name specified usinggarden -c <name>. Garden will behave as if it were launched from the directory containing the garden file when a configuration file is found. -
The
GARDEN_CEILING_DIRSandGIT_CEILING_DIRSenvironment variables can be used to limit thegarden.yamldiscovery by preventinggardenfrom traversing into and beyond the specified directories when discovering garden files. -
garden exec,garden cmdgarden grow,garden lsand custom garden commands can now filter the trees they operate over by passing a glob pattern using-t | --treesoption. These commands will only operate on the trees whose names match the pattern. This allows you to specify a garden as the tree query and use the full set of environment variables from all trees in the query while executing commands over a subset of the trees in that garden. -
garden initwill now add the current directory to thetreesblock when the current directory contains a Git repository. Usegarden init --emptyto disable this behavior.
Development:
- The
shlexdependency was upgraded to1.3.0, which includes fixes for RUSTSEC-2024-0006 a.k.a. GHSA-r7qv-8r2h-pg27.
v1.1.0
Released 2024-01-15
Features:
-
garden lsnow displays information about trees, groups, gardens and commands. -
garden ls -c(i.e.--no-commands) hides command details from the output. -
garden plant -s(i.e.--sort) sorts all of the configuredtreesentries after planting the specified trees. -
garden exec -n(i.e.--dry-run) performs a trial run without executing any commands. -
garden.shell-errexitcan now be configured tofalseingarden.yamlto opt-out of using the-eexit-on-error shell option when running custom commands. -
garden.shellcan now be configured tobun,fish,node,perlandpython3in addition to the traditionalbash,zsh,dash,kshandshshells. This allows you to use these interpreters to run custom commands.
Development:
- Garden is now using shellexpand v3.
v1.0.0
Released 2023-12-23
Features:
-
Commands can now specify pre-commands and post-commands that are run before/after the specified command. (#3) (documentation)
-
The default
originremote name can now be configured usingtree.<tree>.default-remote. (#16) -
Commands now display the tree's current branch alongside the tree name. (#18)
-
garden -vv execandgarden -vv shellnow display the command being run.
Packaging:
gardencan now be installed as anix flakepackage. Aflake.nixfile is now provided. (#16)
v0.9.1
Released 2023-11-19
Fixes:
garden -D name=valuenow overrides variables in all scopes. Variables defined in tree scope were not subject to overrides and will now get properly overridden by the--define/-Dcommand-line options.
v0.9.0
Released 2023-11-02
Features:
garden grownow setsgit config remote.$name.tagopt --no-tagswhen adding additional remotes. This prevents accidentally fetching tags when interacting with remotes.
v0.8.1
Released 2023-07-18
Fixes:
garden growwas fixed to detect existing branches when growinggit worktree-created child worktrees.
Development:
-
strumis now used to implementFromStrforenum ColorMode. -
is-terminal is now used instead of the unmaintained
attycrate.
v0.8.0
Released 2023-07-16
Features:
-
gardennow supports agraftsfeature that allows you to stitch configuration entities from separate garden files into a graft-specific namespace. Trees and variables from grafted configurations can be referenced usinggraft::namespace qualifiers. -
garden growcan now configure upstream branches. -
garden growcan now configure gitconfig settings with multiple values usinggit config --add <name> <value>.
v0.7.0
Released 2023-02-12
Features:
-
Trees, Groups, Gardens and Commands defined in the top-level
garden.yamlcan now override entries defined viagarden.includes. Configuration entities now follow "last one wins" semantics -- if the same entity is defined in multiple includes files then only the final definition will be used. (#14) (#15) -
Trees now sparsely override existing entries. This behavior allows a tree definition to replace just the
urlfield, or to replace individual tree commands while retaining the rest. Usereplace: truein a Tree definition in order to completely replace the existing entry instead of sparsely overriding it. -
Improved shell completions for
garden,garden initandgarden plant.
Packaging:
- 0323pin packaged
gardenfor pkgsrc/NetBSD and merged the package into the main branch! (#13)
v0.6.0
Released 2023-01-20
Features:
- Both names and values in
gitconfigcan now use${var}expressions. Previously only values were evaluated. Names are evaluated now as well.
Fixes:
- The
zshworkaround forgarden completion zshis no longer needed. The documentation for generating zsh completions has been updated. (#10)
v0.5.1
Released 2023-01-15
Fixes:
- Exec expressions were previously run with the current directory set to the directory from which garden was run. Exec expressions are now run in the tree's current directory.
v0.5.0
Released 2023-01-12
Features:
-
Garden configuration files can now include other configuration files by specifying the additional files to include in the
garden.includesfield. Theincludesfeature makes it possible to create modular and reusable garden files. Thetrees,variables,commands,groupsandgardensdefined in the included files are added to the current configuration. (#7) -
Garden commands can now use shell variables using the standard (brace-less) shell
$variablesyntax. The braced${garden}variable syntax remains reserved for resolving Garden Variables. Double-$braces (ex:$${...}) can be used to escape a$${variable}from evaluation so that a literal${variable}value is used in the garden command. (#11) (#12) -
A new
garden completionsubcommand was added for providing shell command-line completion using the clap_complete crate. (#9) -
garden -V | --versionwas added alongside theclaprewrite for displaying thegardencommand version.
Development:
-
The
Makefilehas been replaced by agarden.yamlGarden file. We can now usegarden {build, test, check, fmt, clippy, ...}instead ofmake .... See garden.yaml @ 5ef8d0ab16 for more details. Packagers can usecargo installto installgardenand invokemdbookdirectly to install the user manual. We also providegarden -D DESTDIR=/tmp/stage -D prefix=/usr/local install-docif distros want to install the user manual using our recipe. (#8) -
Garden's command-line parsing has been rewritten to leverage the clap crate and ecosystem.
v0.4.1
Released 2022-12-26
Features:
- The
garden cmd --no-errexitoption was extended to work with commands that are configured using a YAML list of strings. Commands that are specified using lists are now indistinguishable from commands specified using multi-line strings.
v0.4.0
Released 2022-12-23
Breaking Changes:
-
garden cmdnow runs custom commands using<shell> -e -c '<command>'by default. The use of-eis a change in behavior and causes multi-line / multi-statement commands to halt execution when the first non-zero exit code is encountered. Useset +eat the top of of a multi-line command to opt-out of this behavior on a per-command basis, or specify the-n | --no-errexitoption. -
gardenwill now fallback tobash(andsh) as the defaultgarden.shellvalue whenzsh(andbash) are not installed. As before, thegarden.shellconfiguration variable can be used to override the default shell.
Features:
-
garden prunewas added for removing orphaned Git repositories. (#4) -
garden cmdcan now run commands in breadth-first order when the-b/--breadth-firstoption is used. Depth-first tree traversal is the default. Thegarden cmd --breadth-firsttraversal runs all commands on a tree before continuing on to the next tree. The defaultgarden cmddepth-first traversal runs a command across all trees before continuing on to the next command. (#3)
v0.3.0
Released 2022-08-20
Features:
garden plantcan now detectgit worktreerepositories. (#1)
v0.2.0
Released 2022-07-29
Breaking Changes:
garden addwas renamed togarden plant.
Features:
garden growcan now grow trees using "git worktree" (#1).garden growlearned to clone specific branches.garden growandgarden plantcan now handle bare repositories.
v0.1.0
Released 2022-06-13
Features:
This is the initial garden release.
garden growgrows worktrees.garden initinitializes configuration.garden plant(formerlygarden add) adds existing trees.garden cmdandgarden <custom-command>can run custom commands.- Templates, variables, and environment variables are all supported.