maestro-install 0.1.6__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.
- maestro_install-0.1.6/.gitignore +8 -0
- maestro_install-0.1.6/Makefile +53 -0
- maestro_install-0.1.6/PKG-INFO +271 -0
- maestro_install-0.1.6/README.md +245 -0
- maestro_install-0.1.6/bin/c-dev +60 -0
- maestro_install-0.1.6/bin/c-down +2 -0
- maestro_install-0.1.6/bin/c-logs +2 -0
- maestro_install-0.1.6/bin/c-mage +21 -0
- maestro_install-0.1.6/bin/c-mem-down +2 -0
- maestro_install-0.1.6/bin/c-mem-logs +2 -0
- maestro_install-0.1.6/bin/c-mem-ps +2 -0
- maestro_install-0.1.6/bin/c-mem-restart +2 -0
- maestro_install-0.1.6/bin/c-mem-up +2 -0
- maestro_install-0.1.6/bin/c-plat-down +2 -0
- maestro_install-0.1.6/bin/c-plat-logs +2 -0
- maestro_install-0.1.6/bin/c-plat-ps +2 -0
- maestro_install-0.1.6/bin/c-plat-restart +2 -0
- maestro_install-0.1.6/bin/c-plat-up +2 -0
- maestro_install-0.1.6/bin/c-ps +2 -0
- maestro_install-0.1.6/bin/c-restart +2 -0
- maestro_install-0.1.6/bin/c-up +2 -0
- maestro_install-0.1.6/bin/c-ws +4 -0
- maestro_install-0.1.6/bin/care +43 -0
- maestro_install-0.1.6/care_install/__init__.py +10 -0
- maestro_install-0.1.6/care_install/build_runner_slim.py +161 -0
- maestro_install-0.1.6/i18n.py +94 -0
- maestro_install-0.1.6/locales/en.json +212 -0
- maestro_install-0.1.6/locales/ru.json +212 -0
- maestro_install-0.1.6/prepare.py +207 -0
- maestro_install-0.1.6/preset.example.env +36 -0
- maestro_install-0.1.6/preset.example.yaml +52 -0
- maestro_install-0.1.6/pyproject.toml +87 -0
- maestro_install-0.1.6/repos.yaml +143 -0
- maestro_install-0.1.6/services.py +550 -0
- maestro_install-0.1.6/wizard.py +2191 -0
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
.PHONY: wizard prepare verify pull up down ps logs restart install-cli uninstall-cli
|
|
2
|
+
|
|
3
|
+
# Target workspace directory. Override on the command line:
|
|
4
|
+
# make prepare DIR=~/Development/care-workspace
|
|
5
|
+
DIR ?= ../care-workspace
|
|
6
|
+
|
|
7
|
+
# Where `make install-cli` symlinks the c-* scripts. Override with:
|
|
8
|
+
# make install-cli BIN=~/bin
|
|
9
|
+
BIN ?= $(HOME)/.local/bin
|
|
10
|
+
|
|
11
|
+
wizard:
|
|
12
|
+
uv run wizard.py --workspace $(DIR)
|
|
13
|
+
|
|
14
|
+
prepare:
|
|
15
|
+
uv run prepare.py $(DIR)
|
|
16
|
+
|
|
17
|
+
verify:
|
|
18
|
+
uv run prepare.py $(DIR) --verify-only
|
|
19
|
+
|
|
20
|
+
pull:
|
|
21
|
+
uv run prepare.py $(DIR) --pull-only
|
|
22
|
+
|
|
23
|
+
up:
|
|
24
|
+
uv run services.py $(DIR) up
|
|
25
|
+
|
|
26
|
+
down:
|
|
27
|
+
uv run services.py $(DIR) down
|
|
28
|
+
|
|
29
|
+
ps:
|
|
30
|
+
uv run services.py $(DIR) ps
|
|
31
|
+
|
|
32
|
+
logs:
|
|
33
|
+
uv run services.py $(DIR) logs
|
|
34
|
+
|
|
35
|
+
restart:
|
|
36
|
+
uv run services.py $(DIR) restart
|
|
37
|
+
|
|
38
|
+
install-cli:
|
|
39
|
+
@mkdir -p "$(BIN)"
|
|
40
|
+
@for f in bin/c-*; do \
|
|
41
|
+
name="$$(basename $$f)"; \
|
|
42
|
+
ln -sfn "$(CURDIR)/$$f" "$(BIN)/$$name"; \
|
|
43
|
+
echo " linked $(BIN)/$$name"; \
|
|
44
|
+
done
|
|
45
|
+
@echo
|
|
46
|
+
@echo "Ensure $(BIN) is on PATH, e.g. in ~/.zshrc:"
|
|
47
|
+
@echo " export PATH=\"$(BIN):\$$PATH\""
|
|
48
|
+
|
|
49
|
+
uninstall-cli:
|
|
50
|
+
@for f in bin/c-*; do \
|
|
51
|
+
name="$$(basename $$f)"; \
|
|
52
|
+
rm -f "$(BIN)/$$name" && echo " removed $(BIN)/$$name"; \
|
|
53
|
+
done
|
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: maestro-install
|
|
3
|
+
Version: 0.1.6
|
|
4
|
+
Summary: One-shot interactive bootstrap for a CARE development workspace.
|
|
5
|
+
Project-URL: Homepage, https://github.com/Glazkoff/care-install
|
|
6
|
+
Project-URL: Repository, https://github.com/Glazkoff/care-install
|
|
7
|
+
Project-URL: Issues, https://github.com/Glazkoff/care-install/issues
|
|
8
|
+
Keywords: bootstrap,care,carl,gigaevo,mage,wizard
|
|
9
|
+
Classifier: Development Status :: 4 - Beta
|
|
10
|
+
Classifier: Environment :: Console
|
|
11
|
+
Classifier: Intended Audience :: Developers
|
|
12
|
+
Classifier: Operating System :: MacOS
|
|
13
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
19
|
+
Classifier: Topic :: Software Development
|
|
20
|
+
Requires-Python: >=3.10
|
|
21
|
+
Requires-Dist: pyyaml>=6.0
|
|
22
|
+
Provides-Extra: dev
|
|
23
|
+
Requires-Dist: pytest>=8.0; extra == 'dev'
|
|
24
|
+
Requires-Dist: ruff>=0.5; extra == 'dev'
|
|
25
|
+
Description-Content-Type: text/markdown
|
|
26
|
+
|
|
27
|
+
# maestro-install
|
|
28
|
+
|
|
29
|
+
One-line bootstrap for a CARE development workspace.
|
|
30
|
+
|
|
31
|
+
Clones every repo the CARE TUI depends on (`care`, `gigaevo-platform`,
|
|
32
|
+
`gigaevo-memory`, `gigaevo-client`, `carl-experiments`, `carl-mage`) into
|
|
33
|
+
a directory of your choice and checks out the branch each component is
|
|
34
|
+
currently developed on.
|
|
35
|
+
|
|
36
|
+
## TL;DR — run from anywhere with `uvx`
|
|
37
|
+
|
|
38
|
+
If you have [`uv`](https://docs.astral.sh/uv/) installed, you don't need to
|
|
39
|
+
clone this repo at all. Run:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
uvx maestro-install
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
That fetches the latest `maestro-install` from PyPI into an isolated, cached
|
|
46
|
+
environment and launches the interactive wizard. The wizard asks where to
|
|
47
|
+
put the workspace, how each backing service should be provisioned (local
|
|
48
|
+
docker stack vs. already-running remote), collects your MAGE provider /
|
|
49
|
+
key / model, clones whatever you picked "local", writes `<workspace>/.env`,
|
|
50
|
+
and can bring the docker stacks up for you.
|
|
51
|
+
|
|
52
|
+
Re-run `uvx maestro-install` any time — every prompt defaults to whatever the
|
|
53
|
+
previous run wrote, so it doubles as a config editor. To force a fresh
|
|
54
|
+
download of the latest release, add `--refresh`:
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
uvx --refresh maestro-install
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
To pin a specific version:
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
uvx --from 'maestro-install==0.1.1' maestro-install
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## Requirements
|
|
67
|
+
|
|
68
|
+
- `git` in `PATH`
|
|
69
|
+
- [`uv`](https://docs.astral.sh/uv/) (handles Python + PyYAML automatically
|
|
70
|
+
via the script's inline dependencies)
|
|
71
|
+
|
|
72
|
+
## Quick start — interactive wizard
|
|
73
|
+
|
|
74
|
+
The fastest path to a working CARE setup is the wizard. It asks how
|
|
75
|
+
each service should be provisioned (local docker stack vs. an
|
|
76
|
+
already-running remote), collects the required `.env` values
|
|
77
|
+
(MAGE provider + key + model, optional Tavily / Langfuse), clones
|
|
78
|
+
whatever you picked "local", writes `<workspace>/.env`, and can bring
|
|
79
|
+
the docker stacks up for you.
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
make wizard DIR=~/Development/care-workspace
|
|
83
|
+
# or:
|
|
84
|
+
uv run wizard.py
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
It probes `uvx care` and falls back to a local CARE clone if PyPI
|
|
88
|
+
can't satisfy it. Re-run any time — every prompt defaults to whatever
|
|
89
|
+
the previous run wrote to `.env`.
|
|
90
|
+
|
|
91
|
+
At the end the wizard offers to install a system-wide **`care`**
|
|
92
|
+
command (a small shim symlinked into `~/.local/bin`). Once it's on
|
|
93
|
+
your PATH you can run `care` from any directory — the shim cd's
|
|
94
|
+
into the workspace so `.env` is loaded, and dispatches to either
|
|
95
|
+
`uvx care` or the local clone depending on what you chose.
|
|
96
|
+
|
|
97
|
+
State the shim reads lives at `~/.config/care-install/state`.
|
|
98
|
+
|
|
99
|
+
### Preset files and unattended (fast) install
|
|
100
|
+
|
|
101
|
+
Pass a **preset file** of `CARE_*` variables so you don't have to type
|
|
102
|
+
answers — every prompt is pre-filled from it (you can still hit Enter
|
|
103
|
+
through them). The preset is a `.env`-style `KEY=VALUE` file or a YAML
|
|
104
|
+
mapping (nested keys join with `__`); see `preset.example.yaml` /
|
|
105
|
+
`preset.example.env`.
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
# pre-fill the prompts from a preset, walk through interactively
|
|
109
|
+
uv run wizard.py --preset preset.example.yaml
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
Add `--fast` (aka `-y` / `--yes`) for a fully **unattended** install —
|
|
113
|
+
no prompts at all, every default accepted, then it clones, writes
|
|
114
|
+
`.env`, and brings the stacks up:
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
uv run wizard.py --preset my-preset.yaml --fast
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
In fast mode a required value with no default (the MAGE API key) aborts
|
|
121
|
+
with a clear message, so make sure your preset sets `CARE_MAGE__API_KEY`.
|
|
122
|
+
The preset path can also come from `CARE_INSTALL_PRESET`, and it may set
|
|
123
|
+
`CARE_DEFAULTS__UI_LANGUAGE` to pick the language — that's CARE's own
|
|
124
|
+
variable, so it drives both the wizard and the CARE TUI.
|
|
125
|
+
|
|
126
|
+
**Export a preset from the current setup** — the inverse direction. Pick
|
|
127
|
+
**Export preset** from the menu, or run `export`, to dump your live
|
|
128
|
+
`.env` (plus the current language) into a reusable preset file. The
|
|
129
|
+
extension picks the format (`.yaml`/`.yml` → YAML, anything else →
|
|
130
|
+
`.env`):
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
uv run wizard.py export -o my-preset.yaml
|
|
134
|
+
# then on another machine / for someone else:
|
|
135
|
+
uv run wizard.py --preset my-preset.yaml --fast
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
The exported file is written `chmod 600` and **contains your API keys**,
|
|
139
|
+
so keep it private.
|
|
140
|
+
|
|
141
|
+
### Removing CARE (uninstall)
|
|
142
|
+
|
|
143
|
+
Pick **Delete setup** from the wizard menu, or run it directly, to wipe
|
|
144
|
+
every local trace of CARE — it stops and removes the docker stacks
|
|
145
|
+
(containers, volumes and the images compose built), deletes the
|
|
146
|
+
workspace / `~/.care`, removes the `care` shim, and clears the config:
|
|
147
|
+
|
|
148
|
+
```bash
|
|
149
|
+
uv run wizard.py uninstall # asks to confirm first (default: no)
|
|
150
|
+
uv run wizard.py uninstall --yes # unattended (no confirmation)
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
## Manual usage
|
|
154
|
+
|
|
155
|
+
```bash
|
|
156
|
+
make prepare DIR=~/Development/care-workspace
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
Or call the script directly:
|
|
160
|
+
|
|
161
|
+
```bash
|
|
162
|
+
uv run prepare.py ~/Development/care-workspace
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
Re-running is idempotent: existing clones are fetched, switched to the
|
|
166
|
+
configured branch, and fast-forwarded.
|
|
167
|
+
|
|
168
|
+
Every run finishes with a verification pass that checks each repo
|
|
169
|
+
exists, is a git repo, sits on the configured branch, and points at
|
|
170
|
+
the expected origin. The script exits non-zero if anything fails.
|
|
171
|
+
|
|
172
|
+
Run the check on its own at any time:
|
|
173
|
+
|
|
174
|
+
```bash
|
|
175
|
+
make verify DIR=~/Development/care-workspace
|
|
176
|
+
# or: uv run prepare.py ~/Development/care-workspace --verify-only
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
Override the config path with `--config /path/to/repos.yaml`.
|
|
180
|
+
|
|
181
|
+
## Running services
|
|
182
|
+
|
|
183
|
+
`care` talks to GigaEvo Memory (`localhost:8002`) and GigaEvo
|
|
184
|
+
Platform (`localhost:8000`). Bring both stacks up locally with:
|
|
185
|
+
|
|
186
|
+
```bash
|
|
187
|
+
make up DIR=~/Development/care-workspace
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
This runs `docker compose -f <file> up -d` for every repo in
|
|
191
|
+
`repos.yaml` that declares a `compose` entry. Stop, inspect, tail logs,
|
|
192
|
+
or restart the same set:
|
|
193
|
+
|
|
194
|
+
```bash
|
|
195
|
+
make down DIR=~/Development/care-workspace
|
|
196
|
+
make ps DIR=~/Development/care-workspace
|
|
197
|
+
make logs DIR=~/Development/care-workspace
|
|
198
|
+
make restart DIR=~/Development/care-workspace
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
Target a single repo with `--only`, or run in the foreground:
|
|
202
|
+
|
|
203
|
+
```bash
|
|
204
|
+
uv run services.py ~/Development/care-workspace up --only gigaevo-memory
|
|
205
|
+
uv run services.py ~/Development/care-workspace up --no-detach
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
## Global `c-*` commands
|
|
209
|
+
|
|
210
|
+
For quick access from any directory, install the wrapper scripts in
|
|
211
|
+
[`bin/`](./bin) into `~/.local/bin` (or another PATH dir):
|
|
212
|
+
|
|
213
|
+
```bash
|
|
214
|
+
make install-cli # symlinks bin/c-* into ~/.local/bin
|
|
215
|
+
make install-cli BIN=~/bin # or a custom location
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
Make sure that directory is on `PATH` (e.g. `export
|
|
219
|
+
PATH="$HOME/.local/bin:$PATH"` in `~/.zshrc`). Set the workspace once:
|
|
220
|
+
|
|
221
|
+
```bash
|
|
222
|
+
export CARE_WORKSPACE=~/Development/care-workspace
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
Then from anywhere:
|
|
226
|
+
|
|
227
|
+
| Command | Effect |
|
|
228
|
+
| ------------- | ------------------------------------- |
|
|
229
|
+
| `c-up` | bring up all docker stacks |
|
|
230
|
+
| `c-down` | stop all docker stacks |
|
|
231
|
+
| `c-ps` | status of all stacks |
|
|
232
|
+
| `c-logs` | tail logs across all stacks |
|
|
233
|
+
| `c-restart` | restart all stacks |
|
|
234
|
+
| `c-mem-up` | GigaEvo Memory only — up |
|
|
235
|
+
| `c-mem-down` | …down |
|
|
236
|
+
| `c-mem-ps` | …status |
|
|
237
|
+
| `c-mem-logs` | …logs |
|
|
238
|
+
| `c-mem-restart` | …restart |
|
|
239
|
+
| `c-plat-up` | GigaEvo Platform only — up |
|
|
240
|
+
| `c-plat-down` | …down |
|
|
241
|
+
| `c-plat-ps` | …status |
|
|
242
|
+
| `c-plat-logs` | …logs |
|
|
243
|
+
| `c-plat-restart` | …restart |
|
|
244
|
+
| `c-mage` | print MAGE repo path + git status (MAGE is in-process, no docker) |
|
|
245
|
+
| `c-ws` | print the resolved workspace path |
|
|
246
|
+
|
|
247
|
+
All wrappers forward extra arguments to the underlying
|
|
248
|
+
`services.py` / `docker compose` call:
|
|
249
|
+
|
|
250
|
+
```bash
|
|
251
|
+
c-mem-logs -f # follow logs
|
|
252
|
+
c-plat-up --no-detach # foreground
|
|
253
|
+
c-dev mem up --only gigaevo-memory # explicit dispatcher form
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
Uninstall with `make uninstall-cli` (respects the same `BIN=` override).
|
|
257
|
+
|
|
258
|
+
## Configuration
|
|
259
|
+
|
|
260
|
+
Origins and branches live in [`repos.yaml`](./repos.yaml). Each entry:
|
|
261
|
+
|
|
262
|
+
```yaml
|
|
263
|
+
- name: <local directory name>
|
|
264
|
+
origin: <git remote url>
|
|
265
|
+
branch: <branch to check out>
|
|
266
|
+
compose: # optional
|
|
267
|
+
- <path/to/docker-compose.yml relative to the repo root>
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
Edit the file to add a repo, pin a different branch, point at a fork,
|
|
271
|
+
or change which compose files `make up` brings online.
|
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
# maestro-install
|
|
2
|
+
|
|
3
|
+
One-line bootstrap for a CARE development workspace.
|
|
4
|
+
|
|
5
|
+
Clones every repo the CARE TUI depends on (`care`, `gigaevo-platform`,
|
|
6
|
+
`gigaevo-memory`, `gigaevo-client`, `carl-experiments`, `carl-mage`) into
|
|
7
|
+
a directory of your choice and checks out the branch each component is
|
|
8
|
+
currently developed on.
|
|
9
|
+
|
|
10
|
+
## TL;DR — run from anywhere with `uvx`
|
|
11
|
+
|
|
12
|
+
If you have [`uv`](https://docs.astral.sh/uv/) installed, you don't need to
|
|
13
|
+
clone this repo at all. Run:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
uvx maestro-install
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
That fetches the latest `maestro-install` from PyPI into an isolated, cached
|
|
20
|
+
environment and launches the interactive wizard. The wizard asks where to
|
|
21
|
+
put the workspace, how each backing service should be provisioned (local
|
|
22
|
+
docker stack vs. already-running remote), collects your MAGE provider /
|
|
23
|
+
key / model, clones whatever you picked "local", writes `<workspace>/.env`,
|
|
24
|
+
and can bring the docker stacks up for you.
|
|
25
|
+
|
|
26
|
+
Re-run `uvx maestro-install` any time — every prompt defaults to whatever the
|
|
27
|
+
previous run wrote, so it doubles as a config editor. To force a fresh
|
|
28
|
+
download of the latest release, add `--refresh`:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
uvx --refresh maestro-install
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
To pin a specific version:
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
uvx --from 'maestro-install==0.1.1' maestro-install
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Requirements
|
|
41
|
+
|
|
42
|
+
- `git` in `PATH`
|
|
43
|
+
- [`uv`](https://docs.astral.sh/uv/) (handles Python + PyYAML automatically
|
|
44
|
+
via the script's inline dependencies)
|
|
45
|
+
|
|
46
|
+
## Quick start — interactive wizard
|
|
47
|
+
|
|
48
|
+
The fastest path to a working CARE setup is the wizard. It asks how
|
|
49
|
+
each service should be provisioned (local docker stack vs. an
|
|
50
|
+
already-running remote), collects the required `.env` values
|
|
51
|
+
(MAGE provider + key + model, optional Tavily / Langfuse), clones
|
|
52
|
+
whatever you picked "local", writes `<workspace>/.env`, and can bring
|
|
53
|
+
the docker stacks up for you.
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
make wizard DIR=~/Development/care-workspace
|
|
57
|
+
# or:
|
|
58
|
+
uv run wizard.py
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
It probes `uvx care` and falls back to a local CARE clone if PyPI
|
|
62
|
+
can't satisfy it. Re-run any time — every prompt defaults to whatever
|
|
63
|
+
the previous run wrote to `.env`.
|
|
64
|
+
|
|
65
|
+
At the end the wizard offers to install a system-wide **`care`**
|
|
66
|
+
command (a small shim symlinked into `~/.local/bin`). Once it's on
|
|
67
|
+
your PATH you can run `care` from any directory — the shim cd's
|
|
68
|
+
into the workspace so `.env` is loaded, and dispatches to either
|
|
69
|
+
`uvx care` or the local clone depending on what you chose.
|
|
70
|
+
|
|
71
|
+
State the shim reads lives at `~/.config/care-install/state`.
|
|
72
|
+
|
|
73
|
+
### Preset files and unattended (fast) install
|
|
74
|
+
|
|
75
|
+
Pass a **preset file** of `CARE_*` variables so you don't have to type
|
|
76
|
+
answers — every prompt is pre-filled from it (you can still hit Enter
|
|
77
|
+
through them). The preset is a `.env`-style `KEY=VALUE` file or a YAML
|
|
78
|
+
mapping (nested keys join with `__`); see `preset.example.yaml` /
|
|
79
|
+
`preset.example.env`.
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
# pre-fill the prompts from a preset, walk through interactively
|
|
83
|
+
uv run wizard.py --preset preset.example.yaml
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
Add `--fast` (aka `-y` / `--yes`) for a fully **unattended** install —
|
|
87
|
+
no prompts at all, every default accepted, then it clones, writes
|
|
88
|
+
`.env`, and brings the stacks up:
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
uv run wizard.py --preset my-preset.yaml --fast
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
In fast mode a required value with no default (the MAGE API key) aborts
|
|
95
|
+
with a clear message, so make sure your preset sets `CARE_MAGE__API_KEY`.
|
|
96
|
+
The preset path can also come from `CARE_INSTALL_PRESET`, and it may set
|
|
97
|
+
`CARE_DEFAULTS__UI_LANGUAGE` to pick the language — that's CARE's own
|
|
98
|
+
variable, so it drives both the wizard and the CARE TUI.
|
|
99
|
+
|
|
100
|
+
**Export a preset from the current setup** — the inverse direction. Pick
|
|
101
|
+
**Export preset** from the menu, or run `export`, to dump your live
|
|
102
|
+
`.env` (plus the current language) into a reusable preset file. The
|
|
103
|
+
extension picks the format (`.yaml`/`.yml` → YAML, anything else →
|
|
104
|
+
`.env`):
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
uv run wizard.py export -o my-preset.yaml
|
|
108
|
+
# then on another machine / for someone else:
|
|
109
|
+
uv run wizard.py --preset my-preset.yaml --fast
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
The exported file is written `chmod 600` and **contains your API keys**,
|
|
113
|
+
so keep it private.
|
|
114
|
+
|
|
115
|
+
### Removing CARE (uninstall)
|
|
116
|
+
|
|
117
|
+
Pick **Delete setup** from the wizard menu, or run it directly, to wipe
|
|
118
|
+
every local trace of CARE — it stops and removes the docker stacks
|
|
119
|
+
(containers, volumes and the images compose built), deletes the
|
|
120
|
+
workspace / `~/.care`, removes the `care` shim, and clears the config:
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
uv run wizard.py uninstall # asks to confirm first (default: no)
|
|
124
|
+
uv run wizard.py uninstall --yes # unattended (no confirmation)
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
## Manual usage
|
|
128
|
+
|
|
129
|
+
```bash
|
|
130
|
+
make prepare DIR=~/Development/care-workspace
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
Or call the script directly:
|
|
134
|
+
|
|
135
|
+
```bash
|
|
136
|
+
uv run prepare.py ~/Development/care-workspace
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
Re-running is idempotent: existing clones are fetched, switched to the
|
|
140
|
+
configured branch, and fast-forwarded.
|
|
141
|
+
|
|
142
|
+
Every run finishes with a verification pass that checks each repo
|
|
143
|
+
exists, is a git repo, sits on the configured branch, and points at
|
|
144
|
+
the expected origin. The script exits non-zero if anything fails.
|
|
145
|
+
|
|
146
|
+
Run the check on its own at any time:
|
|
147
|
+
|
|
148
|
+
```bash
|
|
149
|
+
make verify DIR=~/Development/care-workspace
|
|
150
|
+
# or: uv run prepare.py ~/Development/care-workspace --verify-only
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
Override the config path with `--config /path/to/repos.yaml`.
|
|
154
|
+
|
|
155
|
+
## Running services
|
|
156
|
+
|
|
157
|
+
`care` talks to GigaEvo Memory (`localhost:8002`) and GigaEvo
|
|
158
|
+
Platform (`localhost:8000`). Bring both stacks up locally with:
|
|
159
|
+
|
|
160
|
+
```bash
|
|
161
|
+
make up DIR=~/Development/care-workspace
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
This runs `docker compose -f <file> up -d` for every repo in
|
|
165
|
+
`repos.yaml` that declares a `compose` entry. Stop, inspect, tail logs,
|
|
166
|
+
or restart the same set:
|
|
167
|
+
|
|
168
|
+
```bash
|
|
169
|
+
make down DIR=~/Development/care-workspace
|
|
170
|
+
make ps DIR=~/Development/care-workspace
|
|
171
|
+
make logs DIR=~/Development/care-workspace
|
|
172
|
+
make restart DIR=~/Development/care-workspace
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
Target a single repo with `--only`, or run in the foreground:
|
|
176
|
+
|
|
177
|
+
```bash
|
|
178
|
+
uv run services.py ~/Development/care-workspace up --only gigaevo-memory
|
|
179
|
+
uv run services.py ~/Development/care-workspace up --no-detach
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
## Global `c-*` commands
|
|
183
|
+
|
|
184
|
+
For quick access from any directory, install the wrapper scripts in
|
|
185
|
+
[`bin/`](./bin) into `~/.local/bin` (or another PATH dir):
|
|
186
|
+
|
|
187
|
+
```bash
|
|
188
|
+
make install-cli # symlinks bin/c-* into ~/.local/bin
|
|
189
|
+
make install-cli BIN=~/bin # or a custom location
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
Make sure that directory is on `PATH` (e.g. `export
|
|
193
|
+
PATH="$HOME/.local/bin:$PATH"` in `~/.zshrc`). Set the workspace once:
|
|
194
|
+
|
|
195
|
+
```bash
|
|
196
|
+
export CARE_WORKSPACE=~/Development/care-workspace
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
Then from anywhere:
|
|
200
|
+
|
|
201
|
+
| Command | Effect |
|
|
202
|
+
| ------------- | ------------------------------------- |
|
|
203
|
+
| `c-up` | bring up all docker stacks |
|
|
204
|
+
| `c-down` | stop all docker stacks |
|
|
205
|
+
| `c-ps` | status of all stacks |
|
|
206
|
+
| `c-logs` | tail logs across all stacks |
|
|
207
|
+
| `c-restart` | restart all stacks |
|
|
208
|
+
| `c-mem-up` | GigaEvo Memory only — up |
|
|
209
|
+
| `c-mem-down` | …down |
|
|
210
|
+
| `c-mem-ps` | …status |
|
|
211
|
+
| `c-mem-logs` | …logs |
|
|
212
|
+
| `c-mem-restart` | …restart |
|
|
213
|
+
| `c-plat-up` | GigaEvo Platform only — up |
|
|
214
|
+
| `c-plat-down` | …down |
|
|
215
|
+
| `c-plat-ps` | …status |
|
|
216
|
+
| `c-plat-logs` | …logs |
|
|
217
|
+
| `c-plat-restart` | …restart |
|
|
218
|
+
| `c-mage` | print MAGE repo path + git status (MAGE is in-process, no docker) |
|
|
219
|
+
| `c-ws` | print the resolved workspace path |
|
|
220
|
+
|
|
221
|
+
All wrappers forward extra arguments to the underlying
|
|
222
|
+
`services.py` / `docker compose` call:
|
|
223
|
+
|
|
224
|
+
```bash
|
|
225
|
+
c-mem-logs -f # follow logs
|
|
226
|
+
c-plat-up --no-detach # foreground
|
|
227
|
+
c-dev mem up --only gigaevo-memory # explicit dispatcher form
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
Uninstall with `make uninstall-cli` (respects the same `BIN=` override).
|
|
231
|
+
|
|
232
|
+
## Configuration
|
|
233
|
+
|
|
234
|
+
Origins and branches live in [`repos.yaml`](./repos.yaml). Each entry:
|
|
235
|
+
|
|
236
|
+
```yaml
|
|
237
|
+
- name: <local directory name>
|
|
238
|
+
origin: <git remote url>
|
|
239
|
+
branch: <branch to check out>
|
|
240
|
+
compose: # optional
|
|
241
|
+
- <path/to/docker-compose.yml relative to the repo root>
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
Edit the file to add a repo, pin a different branch, point at a fork,
|
|
245
|
+
or change which compose files `make up` brings online.
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# c-dev: dispatcher for the CARE workspace docker stacks.
|
|
3
|
+
# Usage:
|
|
4
|
+
# c-dev <service> <action> [extra args forwarded to docker compose]
|
|
5
|
+
# service: all | mem | plat
|
|
6
|
+
# action: up | down | ps | logs | restart
|
|
7
|
+
#
|
|
8
|
+
# Environment:
|
|
9
|
+
# CARE_WORKSPACE prepared workspace dir
|
|
10
|
+
# (default: ~/Development/care-workspace)
|
|
11
|
+
#
|
|
12
|
+
# The wrapper scripts in the same directory (c-up, c-mem-logs, ...)
|
|
13
|
+
# all delegate here.
|
|
14
|
+
|
|
15
|
+
set -euo pipefail
|
|
16
|
+
|
|
17
|
+
# Resolve the real script dir, following any symlinks the user installed
|
|
18
|
+
# under ~/.local/bin or similar.
|
|
19
|
+
src="${BASH_SOURCE[0]}"
|
|
20
|
+
while [ -L "$src" ]; do
|
|
21
|
+
dir="$(cd -P "$(dirname "$src")" >/dev/null && pwd)"
|
|
22
|
+
src="$(readlink "$src")"
|
|
23
|
+
[[ $src != /* ]] && src="$dir/$src"
|
|
24
|
+
done
|
|
25
|
+
SCRIPT_DIR="$(cd -P "$(dirname "$src")" >/dev/null && pwd)"
|
|
26
|
+
REPO_DIR="$(dirname "$SCRIPT_DIR")"
|
|
27
|
+
|
|
28
|
+
WORKSPACE="${CARE_WORKSPACE:-$HOME/Development/care-workspace}"
|
|
29
|
+
|
|
30
|
+
usage() {
|
|
31
|
+
cat >&2 <<'EOF'
|
|
32
|
+
usage: c-dev <service> <action> [args...]
|
|
33
|
+
service: all | mem | plat
|
|
34
|
+
action: up | down | ps | logs | restart
|
|
35
|
+
|
|
36
|
+
env:
|
|
37
|
+
CARE_WORKSPACE path to the prepared workspace
|
|
38
|
+
(default: ~/Development/care-workspace)
|
|
39
|
+
EOF
|
|
40
|
+
exit 2
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
[ $# -ge 2 ] || usage
|
|
44
|
+
service="$1"
|
|
45
|
+
action="$2"
|
|
46
|
+
shift 2
|
|
47
|
+
|
|
48
|
+
case "$service" in
|
|
49
|
+
all) only=() ;;
|
|
50
|
+
mem) only=(--only gigaevo-memory) ;;
|
|
51
|
+
plat) only=(--only gigaevo-platform) ;;
|
|
52
|
+
*) echo "c-dev: unknown service '$service'" >&2; usage ;;
|
|
53
|
+
esac
|
|
54
|
+
|
|
55
|
+
case "$action" in
|
|
56
|
+
up|down|ps|logs|restart) ;;
|
|
57
|
+
*) echo "c-dev: unknown action '$action'" >&2; usage ;;
|
|
58
|
+
esac
|
|
59
|
+
|
|
60
|
+
exec uv run "$REPO_DIR/services.py" "$WORKSPACE" "$action" "${only[@]}" "$@"
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# c-mage: print MAGE workspace status.
|
|
3
|
+
# MAGE (carl-mage) is an in-process Python library, not a docker stack,
|
|
4
|
+
# so there are no up/down/logs commands for it — CARE imports it directly.
|
|
5
|
+
# Use this script to jump-check the repo state.
|
|
6
|
+
|
|
7
|
+
set -euo pipefail
|
|
8
|
+
|
|
9
|
+
WORKSPACE="${CARE_WORKSPACE:-$HOME/Development/care-workspace}"
|
|
10
|
+
MAGE_DIR="$WORKSPACE/carl-mage"
|
|
11
|
+
|
|
12
|
+
if [ ! -d "$MAGE_DIR" ]; then
|
|
13
|
+
echo "carl-mage not found at $MAGE_DIR" >&2
|
|
14
|
+
echo "Run \`make prepare DIR=$WORKSPACE\` first." >&2
|
|
15
|
+
exit 1
|
|
16
|
+
fi
|
|
17
|
+
|
|
18
|
+
echo "MAGE: $MAGE_DIR"
|
|
19
|
+
echo "Note: MAGE runs in-process inside CARE. No docker stack."
|
|
20
|
+
echo
|
|
21
|
+
git -C "$MAGE_DIR" status --short --branch
|