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
description: Intelligent package installation with automatic caching and deduplication
3
+
description: Dynamic package manager detection and installation built on top of the caching system
4
4
---
5
5
6
6
import {
@@ -11,38 +11,88 @@ import {
11
11
Card,
12
12
} from'@astrojs/starlight/components';
13
13
14
-
The `packages` feature provides a high-level abstraction for package management that combines intelligent caching with automatic installation commands.
14
+
The `packages` feature provides intelligent package manager detection, installation, and optimization that builds on top of cigen's [cache system](/configuration/cache). It automatically detects which package manager your project uses and generates the correct installation commands.
15
15
16
-
## What Are Packages?
16
+
## Architecture Overview
17
17
18
-
<Asidetype="tip">
19
-
**Packages = Installation + Caching**: The `packages` field automatically
20
-
handles both installing dependencies and caching them efficiently.
18
+
<Asidetype="note">
19
+
**Packages builds on Cache**: The package system leverages the existing cache system for storage and retrieval, while adding package manager detection and installation logic on top.
21
20
</Aside>
22
21
23
-
While the `cache` field handles storage and retrieval, `packages` goes further by:
22
+
The package management system provides:
24
23
25
-
1.**Restoring**the package cache if it exists
26
-
2.**Running**the appropriate install command
27
-
3.**Saving**the updated cache for future runs
28
-
4.**Optimizing**workflows through smart deduplication
24
+
1.**Dynamic package manager detection**- Detects npm vs yarn vs pnpm based on lock files
25
+
2.**Configurable installation commands**- YAML-based definitions for any package manager
26
+
3.**Smart job deduplication**- Optimizes workflows when multiple jobs use the same packages
27
+
4.**Extensible definitions**- Built-in support for common languages, fully customizable
29
28
30
-
## Supported Package Managers
29
+
## Package Manager Definitions
31
30
32
-
<CardGrid>
33
-
<Cardtitle="Node.js"icon="seti:javascript">
34
-
npm, yarn, pnpm, bun - auto-detected from lock files
35
-
</Card>
36
-
<Cardtitle="Ruby"icon="seti:ruby">
37
-
Bundler with automatic Gemfile.lock detection
38
-
</Card>
39
-
<Cardtitle="Python"icon="seti:python">
40
-
pip, pipenv, poetry with virtual environment support
41
-
</Card>
42
-
<Cardtitle="Go"icon="seti:go">
43
-
Go modules with automatic go.mod detection
44
-
</Card>
45
-
</CardGrid>
31
+
Package managers are defined in YAML configuration with detection rules and installation commands. Cigen includes built-in definitions that you can extend or override.
0 commit comments