You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* feat: adds uv and pnpm support
* chore: patching test
* chore: patching test
* chore: patching tests
* fix: enhances project bootstrapping logic
Refactors project bootstrapping to improve package manager selection and installation.
- Streamlines PNPM installation by leveraging its automatic CI environment detection.
- Improves UV installation on Unix systems using `proc.run` with `sh -c` for safer pipe handling.
- Enhances package manager selection by clarifying fallback behavior for interactive prompts and saving user preferences.
- Adds unit tests to validate package manager precedence hierarchy logic.
* refactor: global poetry version output scrubber; git output scrubber
* ci: retrigger workflow
Copy file name to clipboardExpand all lines: docs/features/project/bootstrap.md
+31-2Lines changed: 31 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,12 +6,41 @@ This is useful to allow for expedited initial setup for each developer e.g. when
6
6
7
7
It can bootstrap one or all of the following (with other options potentially being added in the future):
8
8
9
-
- Python Poetry projects - Installs Poetry via pipx if its not present and then runs `poetry install`
10
-
- Node.js project - Checks if npm is installed and runs `npm install`
9
+
- Python projects - Supports Poetry and uv package managers. Installs the configured package manager if not present and runs the appropriate install command.
10
+
-JavaScript/Node.js projects - Supports npm and pnpm package managers. Runs the appropriate install command for the configured package manager.
11
11
- dotenv (.env) file - Checks for `.env.template` files, copies them to `.env` (which should be in `.gitignore` so developers can safely make local specific changes) and prompts for any blank values (so the developer has an easy chance to fill in their initial values where there isn't a clear default).
12
12
13
13
> **Note**: Invoking bootstrap from `algokit bootstrap` is not recommended. Please prefer using `algokit project bootstrap` instead.
14
14
15
+
You can configure which package managers are used by default via:
For more details, see the [configuration documentation](../config.md).
20
+
21
+
## Package Manager Override
22
+
23
+
You can override the default package manager settings on a per-project basis by adding configuration to your project's `.algokit.toml` file:
24
+
25
+
```toml
26
+
[package_manager]
27
+
python = "uv"# Override Python package manager (poetry or uv)
28
+
javascript = "pnpm"# Override JavaScript package manager (npm or pnpm)
29
+
```
30
+
31
+
This project-specific configuration takes precedence over your global settings, allowing different projects to use different package managers as needed.
32
+
33
+
### Configuration Precedence
34
+
35
+
The bootstrap command follows this precedence order when determining which package manager to use:
36
+
37
+
1.**Project override** - Configuration in `.algokit.toml` (highest priority)
38
+
2.**User preference** - Global configuration set via `algokit config` (respects your explicit choice)
39
+
3.**Smart defaults** - Based on project structure (e.g., `poetry.toml` → Poetry, `pnpm-lock.yaml` → PNPM)
40
+
4.**Interactive prompt** - Asked on first use if no preference is set
41
+
42
+
This means if you set a global preference (e.g., `algokit config py-package-manager uv`), it will be used across all projects unless explicitly overridden at the project level. Smart defaults only apply when you haven't set a preference yet.
0 commit comments