vuer-cli 0.0.1__tar.gz → 0.0.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- vuer_cli-0.0.3/CLAUDE.md +8 -0
- vuer_cli-0.0.3/CONTRIBUTING.md +97 -0
- vuer_cli-0.0.3/PKG-INFO +183 -0
- vuer_cli-0.0.3/README.md +149 -0
- vuer_cli-0.0.3/docs/commands/add.md +18 -0
- vuer_cli-0.0.3/docs/commands/index.md +17 -0
- vuer_cli-0.0.3/docs/commands/remove.md +21 -0
- vuer_cli-0.0.3/docs/commands/sync.md +31 -0
- vuer_cli-0.0.3/docs/commands/upgrade.md +18 -0
- vuer_cli-0.0.3/docs/concepts.md +58 -0
- vuer_cli-0.0.3/docs/index.md +721 -0
- vuer_cli-0.0.3/docs/introduction.md +52 -0
- vuer_cli-0.0.3/docs/overview.md +703 -0
- vuer_cli-0.0.3/docs/publishing.md +122 -0
- {vuer_cli-0.0.1 → vuer_cli-0.0.3}/pyproject.toml +22 -4
- vuer_cli-0.0.3/src/vuer_cli/__init__.py +20 -0
- vuer_cli-0.0.3/src/vuer_cli/add.py +93 -0
- vuer_cli-0.0.3/src/vuer_cli/envs_publish.py +371 -0
- vuer_cli-0.0.3/src/vuer_cli/envs_pull.py +206 -0
- vuer_cli-0.0.3/src/vuer_cli/main.py +106 -0
- vuer_cli-0.0.3/src/vuer_cli/remove.py +105 -0
- vuer_cli-0.0.3/src/vuer_cli/sync.py +350 -0
- vuer_cli-0.0.3/src/vuer_cli/upgrade.py +159 -0
- vuer_cli-0.0.3/src/vuer_cli/utils.py +101 -0
- vuer_cli-0.0.1/PKG-INFO +0 -180
- vuer_cli-0.0.1/README.md +0 -159
- vuer_cli-0.0.1/vuer_cli/__init__.py +0 -115
- {vuer_cli-0.0.1 → vuer_cli-0.0.3}/.gitignore +0 -0
- {vuer_cli-0.0.1 → vuer_cli-0.0.3}/LICENSE +0 -0
vuer_cli-0.0.3/CLAUDE.md
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
|
|
2
|
+
- Release Procedure:
|
|
3
|
+
1. update pip install and uv add instruction in the README to include the version tag of the current version
|
|
4
|
+
2. push to latest and the version tag in git
|
|
5
|
+
3. publish this version
|
|
6
|
+
|
|
7
|
+
# Skills
|
|
8
|
+
- params-proto: https://raw.githubusercontent.com/geyang/params-proto/main/skill/index.md
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# Development Guide
|
|
2
|
+
|
|
3
|
+
This project uses modern Python packaging with [uv](https://docs.astral.sh/uv/) and `pyproject.toml`.
|
|
4
|
+
|
|
5
|
+
## Setup
|
|
6
|
+
|
|
7
|
+
### Option 1: Using uv (recommended)
|
|
8
|
+
|
|
9
|
+
Create a virtual environment and install dependencies:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
uv sync --group dev
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Activate the environment:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
source .venv/bin/activate
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
### Option 2: Using pip
|
|
22
|
+
|
|
23
|
+
Install in your current environment (conda, virtualenv, or system Python):
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
pip install -e ".[dev]"
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Common Tasks
|
|
30
|
+
|
|
31
|
+
### Documentation
|
|
32
|
+
|
|
33
|
+
Build documentation:
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
make docs
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Preview documentation with live reload:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
make preview-docs
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
The preview server will start at `http://0.0.0.0:8000`
|
|
46
|
+
|
|
47
|
+
### Testing
|
|
48
|
+
|
|
49
|
+
Run tests:
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
make test
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### Code Quality
|
|
56
|
+
|
|
57
|
+
Format code with ruff:
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
ruff format .
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Lint code:
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
ruff check .
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
Fix linting issues automatically:
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
ruff check --fix .
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## Project Structure
|
|
76
|
+
|
|
77
|
+
```
|
|
78
|
+
vuer/
|
|
79
|
+
├── src/vuer/ # Main package source
|
|
80
|
+
├── docs/ # Sphinx documentation
|
|
81
|
+
├── Makefile # Build tasks
|
|
82
|
+
└── pyproject.toml # Project configuration
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## Publishing
|
|
86
|
+
|
|
87
|
+
### Using uv (recommended)
|
|
88
|
+
|
|
89
|
+
1. Update version in `pyproject.toml`
|
|
90
|
+
2. Build the package: `uv build`
|
|
91
|
+
3. Publish: `uv publish`
|
|
92
|
+
|
|
93
|
+
### Using traditional tools
|
|
94
|
+
|
|
95
|
+
1. Update version in `pyproject.toml`
|
|
96
|
+
2. Build: `python -m build`
|
|
97
|
+
3. Publish: `twine upload dist/*`
|
vuer_cli-0.0.3/PKG-INFO
ADDED
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: vuer-cli
|
|
3
|
+
Version: 0.0.3
|
|
4
|
+
Summary: A Python CLI for Vuer, a real-time 3D visualization library
|
|
5
|
+
Project-URL: Homepage, https://github.com/vuer-ai/vuer-cli
|
|
6
|
+
Project-URL: Repository, https://github.com/vuer-ai/vuer-cli
|
|
7
|
+
Project-URL: Issues, https://github.com/vuer-ai/vuer-cli/issues
|
|
8
|
+
Author-email: Ge Yang <ge.ike.yang@gmail.com>
|
|
9
|
+
License: MIT
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
Classifier: Development Status :: 3 - Alpha
|
|
12
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
13
|
+
Classifier: Operating System :: OS Independent
|
|
14
|
+
Classifier: Programming Language :: Python
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Requires-Python: >=3.8
|
|
21
|
+
Requires-Dist: params-proto>=3.0.0rc9
|
|
22
|
+
Requires-Dist: requests>=2.31.0
|
|
23
|
+
Requires-Dist: tqdm>=4.66.0
|
|
24
|
+
Provides-Extra: all
|
|
25
|
+
Provides-Extra: docs
|
|
26
|
+
Requires-Dist: furo; extra == 'docs'
|
|
27
|
+
Requires-Dist: myst-parser; extra == 'docs'
|
|
28
|
+
Requires-Dist: sphinx-autobuild; extra == 'docs'
|
|
29
|
+
Requires-Dist: sphinx-copybutton; extra == 'docs'
|
|
30
|
+
Requires-Dist: sphinx>=4.0; extra == 'docs'
|
|
31
|
+
Requires-Dist: tomli>=1.1.0; (python_version < '3.11') and extra == 'docs'
|
|
32
|
+
Provides-Extra: example
|
|
33
|
+
Description-Content-Type: text/markdown
|
|
34
|
+
|
|
35
|
+
# Vuer Hub Environment Manager
|
|
36
|
+
|
|
37
|
+
Vuer HUB and the vuer command line tool enable you to manage, version-control,
|
|
38
|
+
and distribute physical simulation environments the same way you manage
|
|
39
|
+
software packages.
|
|
40
|
+
|
|
41
|
+
## Installation
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
pip install vuer-cli
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Environment Variables
|
|
48
|
+
|
|
49
|
+
| Variable | Required | Description |
|
|
50
|
+
|-------------------|----------|--------------------------------------------------------------------------|
|
|
51
|
+
| `VUER_AUTH_TOKEN` | ✅ | JWT token used for all authenticated requests |
|
|
52
|
+
| `VUER_HUB_URL` | ✅ | Base URL of the Vuer Hub API (required — no default; e.g. `https://hub.vuer.ai/api`) |
|
|
53
|
+
|
|
54
|
+
## Commands
|
|
55
|
+
|
|
56
|
+
| Command | Description |
|
|
57
|
+
|----------------|-----------------------------------------------------------------------|
|
|
58
|
+
| `vuer` | Show top-level help and list available commands |
|
|
59
|
+
| `vuer --help` | Show detailed CLI help |
|
|
60
|
+
| `sync` | Sync all environments from environment.json dependencies (like npm install) |
|
|
61
|
+
| `add` | Add an environment dependency to environment.json |
|
|
62
|
+
| `remove` | Remove an environment dependency from environment.json |
|
|
63
|
+
| `upgrade` | Upgrade an environment dependency in environment.json to latest |
|
|
64
|
+
| `envs-publish` | Publish an environment version |
|
|
65
|
+
| `envs-pull` | Download an environment by ID or `name/version` |
|
|
66
|
+
|
|
67
|
+
## Usage
|
|
68
|
+
|
|
69
|
+
Quick start — configure environment variables
|
|
70
|
+
|
|
71
|
+
`VUER_HUB_URL` is required and has no default. Set it to the base URL of your Vuer Hub API.
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
export VUER_HUB_URL="https://hub.vuer.ai/api"
|
|
75
|
+
# Optional: token for private hubs or authenticated operations
|
|
76
|
+
export VUER_AUTH_TOKEN="eyJhbGci..."
|
|
77
|
+
# Optional: enable dry-run mode to simulate operations (no network changes)
|
|
78
|
+
export VUER_CLI_DRY_RUN="1"
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
# Sync all environments from environment.json dependencies
|
|
83
|
+
# Reads environment.json in current directory, validates dependencies,
|
|
84
|
+
# and downloads all environments (including transitive deps) to vuer_environments/
|
|
85
|
+
vuer sync
|
|
86
|
+
vuer sync --output ./my-envs
|
|
87
|
+
|
|
88
|
+
# Publish an environment (requires environment.json in the directory)
|
|
89
|
+
vuer envs-publish --directory ./my-environment
|
|
90
|
+
|
|
91
|
+
# Pull an environment (download and unpack into a directory)
|
|
92
|
+
vuer envs-pull <environmentId>
|
|
93
|
+
vuer envs-pull my-environment/1.0.0
|
|
94
|
+
|
|
95
|
+
# Add an environment
|
|
96
|
+
vuer add --env <environmentId>
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### Sync Command Details
|
|
100
|
+
|
|
101
|
+
The `sync` command works like `npm install`:
|
|
102
|
+
|
|
103
|
+
1. Reads `environment.json` from the current directory
|
|
104
|
+
2. Parses the `dependencies` field (e.g., `{"some-dependency": "1.2.3"}`)
|
|
105
|
+
3. Validates all dependencies exist in the backend
|
|
106
|
+
4. Fetches transitive dependencies for each environment
|
|
107
|
+
5. Downloads all environments (direct + transitive) to `vuer_environments/` directory
|
|
108
|
+
6. Preserves `environment.json` inside downloaded environment directories
|
|
109
|
+
|
|
110
|
+
Publishing metadata (used by `envs-publish`)
|
|
111
|
+
|
|
112
|
+
```json
|
|
113
|
+
{
|
|
114
|
+
"name": "my-environment",
|
|
115
|
+
"version": "v1.0.0",
|
|
116
|
+
"description": "Demo robotic arm env",
|
|
117
|
+
"visibility": "PUBLIC",
|
|
118
|
+
"env-type": "isaac",
|
|
119
|
+
"dependencies": {
|
|
120
|
+
"my-environment-1": "v4.0.0"
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
Fields and recommendations for publishing metadata
|
|
126
|
+
- **name** (string, required): logical name of the environment (no slashes). This becomes the directory name under `vuer_environments/<name>/<version>/` when downloaded.
|
|
127
|
+
- **version** (string, required): environment version string. Use a stable, reproducible format (we recommend semantic style like `v1.0.0`).
|
|
128
|
+
- **description** (string, optional): short human-readable description of the environment.
|
|
129
|
+
- **visibility** (string, optional): publishing visibility, commonly `PUBLIC` or `PRIVATE`.
|
|
130
|
+
- **env-type** (string, optional): environment runtime/type identifier (for example `isaac`, `gazebo`, etc.).
|
|
131
|
+
- **dependencies** (object, optional): mapping of dependency-name → version (e.g. `"some-dependency": "v1.2.3"`). These declare upstream environment dependencies and are validated during publish.
|
|
132
|
+
|
|
133
|
+
Publishing notes
|
|
134
|
+
- `envs-publish` expects the target directory to contain a valid `environment.json`. At minimum `name` and `version` must be present; `envs-publish` will validate metadata before uploading to `VUER_HUB_URL`.
|
|
135
|
+
- The `environment.json` baked into an environment package is preserved when that package is later downloaded to `vuer_environments/<name>/<version>/`.
|
|
136
|
+
- Keep the publishing `environment.json` authoritative: use `dependencies` to declare exact `name → version` mappings for transitive resolution.
|
|
137
|
+
|
|
138
|
+
Project-level `environment.json` used by `vuer sync`
|
|
139
|
+
|
|
140
|
+
For projects that consume environments (i.e., run `vuer sync`), you usually keep a simple `environment.json` at the project root that focuses on the `dependencies` map:
|
|
141
|
+
|
|
142
|
+
```json
|
|
143
|
+
{
|
|
144
|
+
"dependencies": {
|
|
145
|
+
"some-dependency": "v1.2.3",
|
|
146
|
+
"another-dependency": "v4.5.6"
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
Note: The project-level `environment.json` used by `vuer sync` typically only needs a `dependencies` mapping. The publishing `environment.json` (shown above) must include `name` and `version`.
|
|
152
|
+
|
|
153
|
+
Use `vuer <command> --help` for full options.
|
|
154
|
+
|
|
155
|
+
### Add Command Details
|
|
156
|
+
|
|
157
|
+
- Purpose: add an environment dependency to the current directory's `environment.json`.
|
|
158
|
+
- Input: an environment identifier in canonical `name/version` form or a hub-specific environment ID (example: `my-environment/1.0.0`).
|
|
159
|
+
- Behavior: validates the environment exists on the configured `VUER_HUB_URL` and updates the `dependencies` section of `environment.json`. Run `vuer sync` afterwards to download the environment and its transitive dependencies into `vuer_environments/`.
|
|
160
|
+
|
|
161
|
+
### Remove Command Details
|
|
162
|
+
|
|
163
|
+
- Purpose: remove a specific environment dependency from the current directory's `environment.json`.
|
|
164
|
+
- Input: a canonical `name/version` spec (exact match required).
|
|
165
|
+
- Behavior: removes only the exact `name/version` entry from `environment.json`. If the corresponding version directory exists under `vuer_environments/<name>/<version>/`, the local copy will be removed; empty parent directories are cleaned up automatically.
|
|
166
|
+
|
|
167
|
+
### Upgrade Command Details
|
|
168
|
+
|
|
169
|
+
- Purpose: update an existing dependency in `environment.json` to a newer version.
|
|
170
|
+
- Input: a dependency name (to upgrade to the latest available) or an explicit `name/version` to target.
|
|
171
|
+
- Behavior: queries the configured hub for available versions, updates `environment.json` with the selected version, and leaves installation to `vuer sync`.
|
|
172
|
+
|
|
173
|
+
### envs-publish Command Details
|
|
174
|
+
|
|
175
|
+
- Purpose: publish a prepared environment directory to the configured hub.
|
|
176
|
+
- Input: a local directory containing an `environment.json` and environment content.
|
|
177
|
+
- Behavior: validates the local environment metadata, then uploads the environment as a new version to `VUER_HUB_URL`. Authenticated operations require `VUER_AUTH_TOKEN`.
|
|
178
|
+
|
|
179
|
+
### envs-pull Command Details
|
|
180
|
+
|
|
181
|
+
- Purpose: download an environment from the hub and place it into a local directory.
|
|
182
|
+
- Input: a hub environment ID or canonical `name/version` (e.g., `my-environment/1.0.0`).
|
|
183
|
+
- Behavior: downloads the environment and creates the nested path `vuer_environments/<name>/<version>/` (or an alternate `--output` path), preserving the bundled `environment.json` metadata.
|
vuer_cli-0.0.3/README.md
ADDED
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
# Vuer Hub Environment Manager
|
|
2
|
+
|
|
3
|
+
Vuer HUB and the vuer command line tool enable you to manage, version-control,
|
|
4
|
+
and distribute physical simulation environments the same way you manage
|
|
5
|
+
software packages.
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
pip install vuer-cli
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Environment Variables
|
|
14
|
+
|
|
15
|
+
| Variable | Required | Description |
|
|
16
|
+
|-------------------|----------|--------------------------------------------------------------------------|
|
|
17
|
+
| `VUER_AUTH_TOKEN` | ✅ | JWT token used for all authenticated requests |
|
|
18
|
+
| `VUER_HUB_URL` | ✅ | Base URL of the Vuer Hub API (required — no default; e.g. `https://hub.vuer.ai/api`) |
|
|
19
|
+
|
|
20
|
+
## Commands
|
|
21
|
+
|
|
22
|
+
| Command | Description |
|
|
23
|
+
|----------------|-----------------------------------------------------------------------|
|
|
24
|
+
| `vuer` | Show top-level help and list available commands |
|
|
25
|
+
| `vuer --help` | Show detailed CLI help |
|
|
26
|
+
| `sync` | Sync all environments from environment.json dependencies (like npm install) |
|
|
27
|
+
| `add` | Add an environment dependency to environment.json |
|
|
28
|
+
| `remove` | Remove an environment dependency from environment.json |
|
|
29
|
+
| `upgrade` | Upgrade an environment dependency in environment.json to latest |
|
|
30
|
+
| `envs-publish` | Publish an environment version |
|
|
31
|
+
| `envs-pull` | Download an environment by ID or `name/version` |
|
|
32
|
+
|
|
33
|
+
## Usage
|
|
34
|
+
|
|
35
|
+
Quick start — configure environment variables
|
|
36
|
+
|
|
37
|
+
`VUER_HUB_URL` is required and has no default. Set it to the base URL of your Vuer Hub API.
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
export VUER_HUB_URL="https://hub.vuer.ai/api"
|
|
41
|
+
# Optional: token for private hubs or authenticated operations
|
|
42
|
+
export VUER_AUTH_TOKEN="eyJhbGci..."
|
|
43
|
+
# Optional: enable dry-run mode to simulate operations (no network changes)
|
|
44
|
+
export VUER_CLI_DRY_RUN="1"
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
# Sync all environments from environment.json dependencies
|
|
49
|
+
# Reads environment.json in current directory, validates dependencies,
|
|
50
|
+
# and downloads all environments (including transitive deps) to vuer_environments/
|
|
51
|
+
vuer sync
|
|
52
|
+
vuer sync --output ./my-envs
|
|
53
|
+
|
|
54
|
+
# Publish an environment (requires environment.json in the directory)
|
|
55
|
+
vuer envs-publish --directory ./my-environment
|
|
56
|
+
|
|
57
|
+
# Pull an environment (download and unpack into a directory)
|
|
58
|
+
vuer envs-pull <environmentId>
|
|
59
|
+
vuer envs-pull my-environment/1.0.0
|
|
60
|
+
|
|
61
|
+
# Add an environment
|
|
62
|
+
vuer add --env <environmentId>
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### Sync Command Details
|
|
66
|
+
|
|
67
|
+
The `sync` command works like `npm install`:
|
|
68
|
+
|
|
69
|
+
1. Reads `environment.json` from the current directory
|
|
70
|
+
2. Parses the `dependencies` field (e.g., `{"some-dependency": "1.2.3"}`)
|
|
71
|
+
3. Validates all dependencies exist in the backend
|
|
72
|
+
4. Fetches transitive dependencies for each environment
|
|
73
|
+
5. Downloads all environments (direct + transitive) to `vuer_environments/` directory
|
|
74
|
+
6. Preserves `environment.json` inside downloaded environment directories
|
|
75
|
+
|
|
76
|
+
Publishing metadata (used by `envs-publish`)
|
|
77
|
+
|
|
78
|
+
```json
|
|
79
|
+
{
|
|
80
|
+
"name": "my-environment",
|
|
81
|
+
"version": "v1.0.0",
|
|
82
|
+
"description": "Demo robotic arm env",
|
|
83
|
+
"visibility": "PUBLIC",
|
|
84
|
+
"env-type": "isaac",
|
|
85
|
+
"dependencies": {
|
|
86
|
+
"my-environment-1": "v4.0.0"
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
Fields and recommendations for publishing metadata
|
|
92
|
+
- **name** (string, required): logical name of the environment (no slashes). This becomes the directory name under `vuer_environments/<name>/<version>/` when downloaded.
|
|
93
|
+
- **version** (string, required): environment version string. Use a stable, reproducible format (we recommend semantic style like `v1.0.0`).
|
|
94
|
+
- **description** (string, optional): short human-readable description of the environment.
|
|
95
|
+
- **visibility** (string, optional): publishing visibility, commonly `PUBLIC` or `PRIVATE`.
|
|
96
|
+
- **env-type** (string, optional): environment runtime/type identifier (for example `isaac`, `gazebo`, etc.).
|
|
97
|
+
- **dependencies** (object, optional): mapping of dependency-name → version (e.g. `"some-dependency": "v1.2.3"`). These declare upstream environment dependencies and are validated during publish.
|
|
98
|
+
|
|
99
|
+
Publishing notes
|
|
100
|
+
- `envs-publish` expects the target directory to contain a valid `environment.json`. At minimum `name` and `version` must be present; `envs-publish` will validate metadata before uploading to `VUER_HUB_URL`.
|
|
101
|
+
- The `environment.json` baked into an environment package is preserved when that package is later downloaded to `vuer_environments/<name>/<version>/`.
|
|
102
|
+
- Keep the publishing `environment.json` authoritative: use `dependencies` to declare exact `name → version` mappings for transitive resolution.
|
|
103
|
+
|
|
104
|
+
Project-level `environment.json` used by `vuer sync`
|
|
105
|
+
|
|
106
|
+
For projects that consume environments (i.e., run `vuer sync`), you usually keep a simple `environment.json` at the project root that focuses on the `dependencies` map:
|
|
107
|
+
|
|
108
|
+
```json
|
|
109
|
+
{
|
|
110
|
+
"dependencies": {
|
|
111
|
+
"some-dependency": "v1.2.3",
|
|
112
|
+
"another-dependency": "v4.5.6"
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
Note: The project-level `environment.json` used by `vuer sync` typically only needs a `dependencies` mapping. The publishing `environment.json` (shown above) must include `name` and `version`.
|
|
118
|
+
|
|
119
|
+
Use `vuer <command> --help` for full options.
|
|
120
|
+
|
|
121
|
+
### Add Command Details
|
|
122
|
+
|
|
123
|
+
- Purpose: add an environment dependency to the current directory's `environment.json`.
|
|
124
|
+
- Input: an environment identifier in canonical `name/version` form or a hub-specific environment ID (example: `my-environment/1.0.0`).
|
|
125
|
+
- Behavior: validates the environment exists on the configured `VUER_HUB_URL` and updates the `dependencies` section of `environment.json`. Run `vuer sync` afterwards to download the environment and its transitive dependencies into `vuer_environments/`.
|
|
126
|
+
|
|
127
|
+
### Remove Command Details
|
|
128
|
+
|
|
129
|
+
- Purpose: remove a specific environment dependency from the current directory's `environment.json`.
|
|
130
|
+
- Input: a canonical `name/version` spec (exact match required).
|
|
131
|
+
- Behavior: removes only the exact `name/version` entry from `environment.json`. If the corresponding version directory exists under `vuer_environments/<name>/<version>/`, the local copy will be removed; empty parent directories are cleaned up automatically.
|
|
132
|
+
|
|
133
|
+
### Upgrade Command Details
|
|
134
|
+
|
|
135
|
+
- Purpose: update an existing dependency in `environment.json` to a newer version.
|
|
136
|
+
- Input: a dependency name (to upgrade to the latest available) or an explicit `name/version` to target.
|
|
137
|
+
- Behavior: queries the configured hub for available versions, updates `environment.json` with the selected version, and leaves installation to `vuer sync`.
|
|
138
|
+
|
|
139
|
+
### envs-publish Command Details
|
|
140
|
+
|
|
141
|
+
- Purpose: publish a prepared environment directory to the configured hub.
|
|
142
|
+
- Input: a local directory containing an `environment.json` and environment content.
|
|
143
|
+
- Behavior: validates the local environment metadata, then uploads the environment as a new version to `VUER_HUB_URL`. Authenticated operations require `VUER_AUTH_TOKEN`.
|
|
144
|
+
|
|
145
|
+
### envs-pull Command Details
|
|
146
|
+
|
|
147
|
+
- Purpose: download an environment from the hub and place it into a local directory.
|
|
148
|
+
- Input: a hub environment ID or canonical `name/version` (e.g., `my-environment/1.0.0`).
|
|
149
|
+
- Behavior: downloads the environment and creates the nested path `vuer_environments/<name>/<version>/` (or an alternate `--output` path), preserving the bundled `environment.json` metadata.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# vuer add
|
|
2
|
+
|
|
3
|
+
Add an environment dependency to `environment.json` and run `sync`.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
vuer add some-environment/1.2.3
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Behavior
|
|
12
|
+
|
|
13
|
+
- Validates argument format `name/version`.
|
|
14
|
+
- If `environments-lock.yaml` already contains the exact entry, the command
|
|
15
|
+
returns success without modifying `environment.json`.
|
|
16
|
+
- Otherwise, it writes or updates `environment.json` and triggers `vuer sync`.
|
|
17
|
+
|
|
18
|
+
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Commands
|
|
2
|
+
|
|
3
|
+
This section contains the user-facing command documentation. Each command has
|
|
4
|
+
its own page linked below.
|
|
5
|
+
|
|
6
|
+
```{toctree}
|
|
7
|
+
:maxdepth: 1
|
|
8
|
+
|
|
9
|
+
sync
|
|
10
|
+
add
|
|
11
|
+
remove
|
|
12
|
+
upgrade
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Use `vuer <command> --help` for per-command options.
|
|
16
|
+
|
|
17
|
+
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# vuer remove
|
|
2
|
+
|
|
3
|
+
Remove an environment dependency from `environment.json` and run `sync`.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
vuer remove some-environment/1.2.3
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Behavior
|
|
12
|
+
|
|
13
|
+
- Requires `name/version` argument.
|
|
14
|
+
- Only removes the dependency entry if the name and version exactly match the
|
|
15
|
+
current `environment.json` entry for that name.
|
|
16
|
+
- Triggers `vuer sync` to reconcile local cache.
|
|
17
|
+
|
|
18
|
+
If removing the last version directory for an environment, `sync` will also
|
|
19
|
+
remove the empty parent `vuer_environments/<name>/` directory.
|
|
20
|
+
|
|
21
|
+
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# vuer sync
|
|
2
|
+
|
|
3
|
+
Synchronize `environment.json` dependencies with the local cache (`vuer_environments/`).
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
vuer sync
|
|
9
|
+
|
|
10
|
+
# Or specify output directory (optional)
|
|
11
|
+
vuer sync --output ./vuer_environments
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Behavior
|
|
15
|
+
|
|
16
|
+
1. Locate `environment.json` in the current working directory. If missing, the
|
|
17
|
+
command fails with an error.
|
|
18
|
+
|
|
19
|
+
2. Parse `dependencies` and expand transitive dependencies via the backend.
|
|
20
|
+
|
|
21
|
+
3. Deduplicate and write resolved dependencies to `environments-lock.yaml`.
|
|
22
|
+
|
|
23
|
+
4. Download missing environments into `vuer_environments/<name>/<version>`.
|
|
24
|
+
Existing version directories listed in the lockfile are skipped.
|
|
25
|
+
|
|
26
|
+
5. Remove version directories that are no longer present in the new lockfile.
|
|
27
|
+
|
|
28
|
+
Dry-run mode (`VUER_CLI_DRY_RUN`) simulates validation and downloading without
|
|
29
|
+
performing network calls.
|
|
30
|
+
|
|
31
|
+
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# vuer upgrade
|
|
2
|
+
|
|
3
|
+
Upgrade a named environment to the latest version available in the backend.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
vuer upgrade some-environment-name
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Behavior
|
|
12
|
+
|
|
13
|
+
1. Read `environment.json` and locate the dependency by name.
|
|
14
|
+
2. Call backend `/environments/latest-by-name?name=<name>` to fetch latest
|
|
15
|
+
`versionId`.
|
|
16
|
+
3. If the latest version differs, update `environment.json` and trigger `vuer sync`.
|
|
17
|
+
|
|
18
|
+
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# Core concepts
|
|
2
|
+
|
|
3
|
+
This page explains the main concepts used by Vuer CLI.
|
|
4
|
+
|
|
5
|
+
## Environment Configuration File: `environment.json`
|
|
6
|
+
|
|
7
|
+
Maintain an `environment.json` file in your project root directory to declare
|
|
8
|
+
the list of environments your project depends on, similar to `package.json` in
|
|
9
|
+
Node.js.
|
|
10
|
+
|
|
11
|
+
**Example:**
|
|
12
|
+
|
|
13
|
+
```json
|
|
14
|
+
{
|
|
15
|
+
"dependencies": {
|
|
16
|
+
"some-dependency": "^1.2.3",
|
|
17
|
+
"another-dependency": "~4.5.6",
|
|
18
|
+
"new-dependency": "0.1.0"
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
**`dependencies` field:**
|
|
24
|
+
|
|
25
|
+
- **Key**: Environment name (e.g., `some-dependency`)
|
|
26
|
+
- **Value**: Version expression (e.g., `^1.2.3`, `~4.5.6`, etc.)
|
|
27
|
+
|
|
28
|
+
## Local cache: `vuer_environments/`
|
|
29
|
+
|
|
30
|
+
`vuer sync` downloads direct and transitive dependencies into the
|
|
31
|
+
`vuer_environments/` directory in the project root. Each environment uses a
|
|
32
|
+
nested directory layout `vuer_environments/<name>/<version>`.
|
|
33
|
+
|
|
34
|
+
Downloaded environment directories may contain their own `environment.json`;
|
|
35
|
+
the CLI preserves these per-version metadata files.
|
|
36
|
+
|
|
37
|
+
## Dependency index: `environments-lock.yaml`
|
|
38
|
+
|
|
39
|
+
`vuer sync` generates `environments-lock.yaml` (next to `vuer_environments/`)
|
|
40
|
+
as a system-maintained lockfile that records resolved and deduplicated
|
|
41
|
+
environment dependencies. Do not edit it manually.
|
|
42
|
+
|
|
43
|
+
Minimal example:
|
|
44
|
+
|
|
45
|
+
```yaml
|
|
46
|
+
environments:
|
|
47
|
+
- "some-dependency/^1.2.3"
|
|
48
|
+
- "another-dependency/~4.5.6"
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Environment variables
|
|
52
|
+
|
|
53
|
+
- `VUER_HUB_URL` — Base URL of Vuer Hub API (required in non-dry-run)
|
|
54
|
+
- `VUER_AUTH_TOKEN` — JWT token for API access (required in non-dry-run)
|
|
55
|
+
- `VUER_CLI_DRY_RUN` — Enable dry-run mode (any non-"0"/"false" value enables
|
|
56
|
+
it)
|
|
57
|
+
|
|
58
|
+
|