Project manifest declaring dependencies.
[project]
name = "my-project"
version = "1.0.0"
description = "Description"
[dependencies]
# Exact version
my-pack = "1.2.3"
# Semver range
another-pack = "^1.2.3"
# Patch-level
patch-pack = "~1.2.3"
# Range
range-pack = ">=1.0.0, <2.0.0"| Operator | Description | Example |
|---|---|---|
= |
Exact | =1.2.3 |
^ |
Compatible (minor/patch) | ^1.2.3 → >=1.2.3, <2.0.0 |
~ |
Patch-level | ~1.2.3 → >=1.2.3, <1.3.0 |
> |
Greater than | >1.0.0 |
>= |
Greater or equal | >=1.0.0 |
< |
Less than | <2.0.0 |
<= |
Less or equal | <=2.0.0 |
Auto-generated by mai project sync. Pins exact versions with hashes.
version = 1
[[packages]]
name = "my-pack"
version = "1.2.3"
source = "https://..."
integrity = "sha256:abc123..."| Field | Description |
|---|---|
version |
Format version |
name |
Package name |
version |
Exact resolved version |
source |
Source URL |
integrity |
SHA-256 hash |
1. Initialize
mai project init2. Add dependencies
mai install my-pack@^1.0.03. Sync
mai project sync4. Verify
mai project check- Commit mai.lock — Reproducible builds
- Use semver ranges —
^for automatic compatible updates - Pin critical deps — Exact versions for stability
- Regular sync — Keep lock file current
- Verify in CI —
mai project check