acumatica-cli 0.2.2__tar.gz → 0.3.0__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.
- {acumatica_cli-0.2.2 → acumatica_cli-0.3.0}/PKG-INFO +100 -48
- {acumatica_cli-0.2.2 → acumatica_cli-0.3.0}/README.md +95 -45
- {acumatica_cli-0.2.2 → acumatica_cli-0.3.0}/pyproject.toml +7 -3
- acumatica_cli-0.3.0/src/acumatica_cli/bootstrap.py +215 -0
- {acumatica_cli-0.2.2 → acumatica_cli-0.3.0}/src/acumatica_cli/bootstrap_plugin.cs +18 -6
- acumatica_cli-0.3.0/src/acumatica_cli/bootstrap_project.xml +460 -0
- acumatica_cli-0.3.0/src/acumatica_cli/cli.py +516 -0
- {acumatica_cli-0.2.2 → acumatica_cli-0.3.0}/src/acumatica_cli/client.py +82 -9
- acumatica_cli-0.3.0/src/acumatica_cli/config.py +182 -0
- {acumatica_cli-0.2.2 → acumatica_cli-0.3.0}/src/acumatica_cli/firstlogin.py +3 -3
- {acumatica_cli-0.2.2 → acumatica_cli-0.3.0}/src/acumatica_cli/models.py +6 -3
- acumatica_cli-0.3.0/src/acumatica_cli/seed.py +276 -0
- acumatica_cli-0.3.0/src/acumatica_cli/templates/baseline/10-subaccounts.yaml +15 -0
- acumatica_cli-0.3.0/src/acumatica_cli/templates/baseline/20-accounts.yaml +94 -0
- acumatica_cli-0.3.0/src/acumatica_cli/templates/baseline/40-ledger.yaml +15 -0
- acumatica_cli-0.3.0/src/acumatica_cli/templates/baseline/50-gl-preferences.yaml +18 -0
- acumatica_cli-0.3.0/src/acumatica_cli/templates/baseline/60-ledger-company.yaml +25 -0
- acumatica_cli-0.3.0/src/acumatica_cli/templates/baseline/90-uoms.yaml +16 -0
- acumatica_cli-0.3.0/src/acumatica_cli/templates/bootstrap/company.yaml +14 -0
- acumatica_cli-0.3.0/src/acumatica_cli/templates/bootstrap/credit-terms.yaml +16 -0
- acumatica_cli-0.3.0/src/acumatica_cli/templates/bootstrap/features.yaml +16 -0
- acumatica_cli-0.3.0/src/acumatica_cli/templates/env +13 -0
- acumatica_cli-0.3.0/src/acumatica_cli/templates/gitignore +2 -0
- acumatica_cli-0.3.0/src/acumatica_cli/templates/setup/10-financial-year.yaml +27 -0
- acumatica_cli-0.3.0/src/acumatica_cli/templates/setup/20-master-calendar.yaml +28 -0
- acumatica_cli-0.3.0/src/acumatica_cli/templates/setup/30-open-periods.yaml +33 -0
- {acumatica_cli-0.2.2 → acumatica_cli-0.3.0}/src/acumatica_cli/tenant.py +16 -9
- acumatica_cli-0.2.2/src/acumatica_cli/bootstrap.py +0 -105
- acumatica_cli-0.2.2/src/acumatica_cli/bootstrap_project.xml +0 -117
- acumatica_cli-0.2.2/src/acumatica_cli/cli.py +0 -351
- acumatica_cli-0.2.2/src/acumatica_cli/config.py +0 -113
- acumatica_cli-0.2.2/src/acumatica_cli/seed.py +0 -120
- {acumatica_cli-0.2.2 → acumatica_cli-0.3.0}/src/acumatica_cli/__init__.py +0 -0
- {acumatica_cli-0.2.2 → acumatica_cli-0.3.0}/src/acumatica_cli/output.py +0 -0
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: acumatica-cli
|
|
3
|
-
Version: 0.
|
|
4
|
-
Summary:
|
|
3
|
+
Version: 0.3.0
|
|
4
|
+
Summary: Acumatica ERP Config-as-Code: tenant provisioning, baseline config, and reference data
|
|
5
5
|
Author: Konstantin Borovik
|
|
6
6
|
Author-email: Konstantin Borovik <kb@lab5.ca>
|
|
7
7
|
Requires-Dist: click>=8.1
|
|
8
8
|
Requires-Dist: httpx>=0.27
|
|
9
9
|
Requires-Dist: pydantic>=2.7
|
|
10
|
-
Requires-Dist:
|
|
10
|
+
Requires-Dist: pydantic-settings>=2.5
|
|
11
11
|
Requires-Dist: pyyaml>=6.0
|
|
12
12
|
Requires-Dist: rich>=13
|
|
13
13
|
Requires-Python: >=3.12
|
|
14
|
+
Project-URL: Homepage, https://lab5.ca
|
|
15
|
+
Project-URL: Repository, https://github.com/kborovik/acumatica-cli
|
|
14
16
|
Description-Content-Type: text/markdown
|
|
15
17
|
|
|
16
18
|
# Acumatica CLI
|
|
@@ -22,8 +24,13 @@ Every operation is idempotent:
|
|
|
22
24
|
|
|
23
25
|
- `acu apply` upserts records by key — running it twice is safe
|
|
24
26
|
- `acu diff` detects drift between your YAML and the live tenant
|
|
25
|
-
- `acu
|
|
26
|
-
|
|
27
|
+
- `acu tenant create` bootstraps the new tenant at birth, so it is ready
|
|
28
|
+
for `acu apply` in one step
|
|
29
|
+
|
|
30
|
+
> **Development environment.** All development and live verification is done
|
|
31
|
+
> against Acumatica ERP **26.101.0225** running on **Windows Server 2025**,
|
|
32
|
+
> using the contract-based REST API endpoint **`Default/25.200.001`**. Other
|
|
33
|
+
> versions will likely work, but only this combination is tested.
|
|
27
34
|
|
|
28
35
|
## Why?
|
|
29
36
|
|
|
@@ -42,80 +49,126 @@ acu config show # sanity-check the resolved target
|
|
|
42
49
|
```
|
|
43
50
|
|
|
44
51
|
```sh
|
|
45
|
-
acu
|
|
46
|
-
acu
|
|
52
|
+
acu tenant create --id 3 --login DEV # create the tenant + bootstrap it
|
|
53
|
+
acu --tenant DEV apply # seed bootstrap/, baseline/, setup/
|
|
54
|
+
acu --tenant DEV diff # prove zero drift (exit 2 on drift)
|
|
47
55
|
```
|
|
48
56
|
|
|
49
57
|
## CLI Map
|
|
50
58
|
|
|
51
59
|
```text
|
|
52
|
-
acu [
|
|
53
|
-
│
|
|
54
|
-
├── provision --id N --login NAME one command: create → bootstrap → apply → diff
|
|
55
|
-
│ [--type SalesDemo] [--parent N]
|
|
60
|
+
acu [--tenant NAME] [--url URL] [--ssh USER@HOST] [--username U] [--password P]
|
|
56
61
|
│
|
|
57
62
|
├── tenant tenant CRUD (ac.exe over SSH — control plane)
|
|
58
63
|
│ ├── list CompanyID, sign-in name, internal CD, type
|
|
59
|
-
│ ├── create
|
|
64
|
+
│ ├── create --id N --login NAME create a tenant + bootstrap it, ready to apply
|
|
65
|
+
│ │ [--type SalesDemo] [--parent N] [--hidden] [--no-init]
|
|
60
66
|
│ └── delete delete a tenant and its data, recycle app pool
|
|
61
67
|
│
|
|
62
68
|
├── apply [--dry-run] FILES... seed baseline YAML via REST (idempotent PUT upserts)
|
|
63
69
|
├── diff FILES... drift check: YAML vs live tenant (exit 2 on drift)
|
|
64
70
|
├── schema [--out DIR] dump the endpoint's OpenAPI schema (swagger.json)
|
|
65
71
|
│
|
|
66
|
-
└── config
|
|
67
|
-
|
|
72
|
+
└── config configuration ops
|
|
73
|
+
├── init [--host HOST] [DIR] scaffold a data repo (.env plus example YAML)
|
|
74
|
+
├── show print the resolved target as a complete .env
|
|
75
|
+
└── check read-only preflight: discovery, secrets, REST, SSH
|
|
68
76
|
```
|
|
69
77
|
|
|
70
|
-
The target instance comes from `
|
|
71
|
-
current directory)
|
|
72
|
-
|
|
73
|
-
command
|
|
78
|
+
The target instance comes from `.env` (found by walking up from the
|
|
79
|
+
current directory), every key an `ACU_*` variable; global options
|
|
80
|
+
(`--tenant`, `--url`, `--ssh`, `--api-version`, `--username`,
|
|
81
|
+
`--password`) override per key. Run `acu <command> --help` for details on
|
|
82
|
+
any command.
|
|
74
83
|
|
|
75
84
|
## Installation
|
|
76
85
|
|
|
77
|
-
|
|
86
|
+
`acu` requires Python 3.12 or newer. Pick one of the options below — each
|
|
87
|
+
code block is a complete, standalone command.
|
|
78
88
|
|
|
79
|
-
|
|
89
|
+
### From PyPI (recommended)
|
|
80
90
|
|
|
81
|
-
|
|
82
|
-
instance: a flat map where `host` is the only required key; everything
|
|
83
|
-
else has a code default matching a stock Acumatica install:
|
|
91
|
+
With [uv](https://docs.astral.sh/uv/), installed as an isolated tool:
|
|
84
92
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
93
|
+
```sh
|
|
94
|
+
uv tool install acumatica-cli
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
With pipx:
|
|
98
|
+
|
|
99
|
+
```sh
|
|
100
|
+
pipx install acumatica-cli
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
With plain pip:
|
|
104
|
+
|
|
105
|
+
```sh
|
|
106
|
+
pip install acumatica-cli
|
|
107
|
+
```
|
|
89
108
|
|
|
90
|
-
|
|
91
|
-
split-horizon DNS, port forwards, or jump hosts:
|
|
109
|
+
### From the GitHub repository
|
|
92
110
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
111
|
+
Install the latest development version straight from the main branch:
|
|
112
|
+
|
|
113
|
+
```sh
|
|
114
|
+
uv tool install git+https://github.com/kborovik/acumatica-cli.git
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
Or with pip:
|
|
118
|
+
|
|
119
|
+
```sh
|
|
120
|
+
pip install git+https://github.com/kborovik/acumatica-cli.git
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
Verify the installation:
|
|
124
|
+
|
|
125
|
+
```sh
|
|
126
|
+
acu --help
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
## Configuration
|
|
130
|
+
|
|
131
|
+
Configuration lives in one file plus your SSH setup:
|
|
132
|
+
|
|
133
|
+
1. **`.env`** — the whole configuration: *where* to apply and *who* signs
|
|
134
|
+
in, every key an `ACU_*` variable. Three values are required —
|
|
135
|
+
`ACU_BASE_URL` (the REST root: scheme, host, and site path), `ACU_SSH`
|
|
136
|
+
(the control-plane `user@host`), and `ACU_PASSWORD`. Everything else
|
|
137
|
+
has a code default matching a stock Acumatica install:
|
|
96
138
|
|
|
97
139
|
```sh
|
|
98
|
-
acu
|
|
140
|
+
ACU_BASE_URL=http://acu-dev1.vm.internal/AcumaticaERP
|
|
141
|
+
ACU_SSH=Administrator@acu-dev1.vm.internal
|
|
142
|
+
ACU_TENANT=Company # sign-in name of the tenant API sessions use
|
|
143
|
+
ACU_USER=admin # optional, defaults to admin
|
|
144
|
+
ACU_PASSWORD=... # required
|
|
99
145
|
```
|
|
100
146
|
|
|
101
|
-
|
|
102
|
-
|
|
147
|
+
Nothing is derived: split-horizon DNS, port forwards, and jump hosts
|
|
148
|
+
are all handled by writing the address you actually want into the two
|
|
149
|
+
address keys. The file is found by walking up from the current
|
|
150
|
+
directory, so any subdirectory of the data repo works; without a
|
|
151
|
+
`.env`, global flags plus the process environment supply the full
|
|
152
|
+
config. The data repo stores the file encrypted as `.env.gpg`;
|
|
153
|
+
`make decrypt` produces the plaintext `.env` once per clone.
|
|
154
|
+
|
|
155
|
+
`acu config show` prints the fully resolved configuration as a
|
|
156
|
+
complete, valid `.env` — every knob visible, the password excluded.
|
|
157
|
+
To turn the resolved state into your working config, redirect and
|
|
158
|
+
edit:
|
|
103
159
|
|
|
104
160
|
```sh
|
|
105
|
-
|
|
106
|
-
ACU_USER=admin # optional, defaults to admin
|
|
161
|
+
acu config show > .env
|
|
107
162
|
```
|
|
108
163
|
|
|
109
|
-
|
|
110
|
-
the
|
|
111
|
-
|
|
112
|
-
3. **SSH** — *how* the control plane reaches the Windows guest. Configured on
|
|
113
|
-
the guest and in your `~/.ssh`, not in `acu.yaml` — see the next section.
|
|
164
|
+
2. **SSH** — *how* the control plane reaches the Windows guest. Configured on
|
|
165
|
+
the guest and in your `~/.ssh`, not in `.env` — see the next section.
|
|
114
166
|
|
|
115
167
|
Verify the result before touching anything live:
|
|
116
168
|
|
|
117
169
|
```sh
|
|
118
|
-
acu config
|
|
170
|
+
acu config check # read-only preflight: discovery, secrets, REST, SSH
|
|
171
|
+
acu config show # the fully resolved configuration as .env, no secrets
|
|
119
172
|
acu apply --dry-run baseline/
|
|
120
173
|
```
|
|
121
174
|
|
|
@@ -125,19 +178,18 @@ acu apply --dry-run baseline/
|
|
|
125
178
|
|
|
126
179
|
- **Control plane (SSH):** tenant create/delete/list via `ac.exe
|
|
127
180
|
-cm:CompanyConfig` and `sqlcmd` on the Windows guest — see
|
|
128
|
-
[`docs/ac-exe.md`](docs/ac-exe.md). Used by `acu tenant
|
|
129
|
-
of `acu provision`.
|
|
181
|
+
[`docs/ac-exe.md`](docs/ac-exe.md). Used by `acu tenant`.
|
|
130
182
|
- **Data plane (REST):** baseline configuration and reference data through
|
|
131
183
|
the contract-based API (`/entity/Default/25.200.001/`), where `PUT` is a
|
|
132
184
|
keyed upsert — see [`docs/rest-api.md`](docs/rest-api.md). Used by
|
|
133
185
|
`acu apply`, `acu diff`, and `acu schema`.
|
|
134
186
|
|
|
135
187
|
If you only apply and diff baseline YAML, you never need SSH. SSH setup is
|
|
136
|
-
required only for `acu tenant
|
|
188
|
+
required only for `acu tenant`.
|
|
137
189
|
|
|
138
190
|
## SSH setup (control plane)
|
|
139
191
|
|
|
140
|
-
`acu tenant`
|
|
192
|
+
`acu tenant` runs commands on the Windows guest through
|
|
141
193
|
plain `ssh`. Two things about this setup are not obvious, and both are hard
|
|
142
194
|
requirements:
|
|
143
195
|
|
|
@@ -184,4 +236,4 @@ ssh -o BatchMode=yes Administrator@acu-dev1.vm.internal '$PSVersionTable.PSVersi
|
|
|
184
236
|
A version table means you are ready; a password prompt or
|
|
185
237
|
`'$PSVersionTable.PSVersion' is not recognized...` means requirement 2 or 1
|
|
186
238
|
(respectively) is not met yet. Host aliases, jump hosts, and ports go in your
|
|
187
|
-
`~/.ssh/config` as usual, or set `
|
|
239
|
+
`~/.ssh/config` as usual, or set `ACU_SSH=user@alias` in `.env`.
|
|
@@ -7,8 +7,13 @@ Every operation is idempotent:
|
|
|
7
7
|
|
|
8
8
|
- `acu apply` upserts records by key — running it twice is safe
|
|
9
9
|
- `acu diff` detects drift between your YAML and the live tenant
|
|
10
|
-
- `acu
|
|
11
|
-
|
|
10
|
+
- `acu tenant create` bootstraps the new tenant at birth, so it is ready
|
|
11
|
+
for `acu apply` in one step
|
|
12
|
+
|
|
13
|
+
> **Development environment.** All development and live verification is done
|
|
14
|
+
> against Acumatica ERP **26.101.0225** running on **Windows Server 2025**,
|
|
15
|
+
> using the contract-based REST API endpoint **`Default/25.200.001`**. Other
|
|
16
|
+
> versions will likely work, but only this combination is tested.
|
|
12
17
|
|
|
13
18
|
## Why?
|
|
14
19
|
|
|
@@ -27,80 +32,126 @@ acu config show # sanity-check the resolved target
|
|
|
27
32
|
```
|
|
28
33
|
|
|
29
34
|
```sh
|
|
30
|
-
acu
|
|
31
|
-
acu
|
|
35
|
+
acu tenant create --id 3 --login DEV # create the tenant + bootstrap it
|
|
36
|
+
acu --tenant DEV apply # seed bootstrap/, baseline/, setup/
|
|
37
|
+
acu --tenant DEV diff # prove zero drift (exit 2 on drift)
|
|
32
38
|
```
|
|
33
39
|
|
|
34
40
|
## CLI Map
|
|
35
41
|
|
|
36
42
|
```text
|
|
37
|
-
acu [
|
|
38
|
-
│
|
|
39
|
-
├── provision --id N --login NAME one command: create → bootstrap → apply → diff
|
|
40
|
-
│ [--type SalesDemo] [--parent N]
|
|
43
|
+
acu [--tenant NAME] [--url URL] [--ssh USER@HOST] [--username U] [--password P]
|
|
41
44
|
│
|
|
42
45
|
├── tenant tenant CRUD (ac.exe over SSH — control plane)
|
|
43
46
|
│ ├── list CompanyID, sign-in name, internal CD, type
|
|
44
|
-
│ ├── create
|
|
47
|
+
│ ├── create --id N --login NAME create a tenant + bootstrap it, ready to apply
|
|
48
|
+
│ │ [--type SalesDemo] [--parent N] [--hidden] [--no-init]
|
|
45
49
|
│ └── delete delete a tenant and its data, recycle app pool
|
|
46
50
|
│
|
|
47
51
|
├── apply [--dry-run] FILES... seed baseline YAML via REST (idempotent PUT upserts)
|
|
48
52
|
├── diff FILES... drift check: YAML vs live tenant (exit 2 on drift)
|
|
49
53
|
├── schema [--out DIR] dump the endpoint's OpenAPI schema (swagger.json)
|
|
50
54
|
│
|
|
51
|
-
└── config
|
|
52
|
-
|
|
55
|
+
└── config configuration ops
|
|
56
|
+
├── init [--host HOST] [DIR] scaffold a data repo (.env plus example YAML)
|
|
57
|
+
├── show print the resolved target as a complete .env
|
|
58
|
+
└── check read-only preflight: discovery, secrets, REST, SSH
|
|
53
59
|
```
|
|
54
60
|
|
|
55
|
-
The target instance comes from `
|
|
56
|
-
current directory)
|
|
57
|
-
|
|
58
|
-
command
|
|
61
|
+
The target instance comes from `.env` (found by walking up from the
|
|
62
|
+
current directory), every key an `ACU_*` variable; global options
|
|
63
|
+
(`--tenant`, `--url`, `--ssh`, `--api-version`, `--username`,
|
|
64
|
+
`--password`) override per key. Run `acu <command> --help` for details on
|
|
65
|
+
any command.
|
|
59
66
|
|
|
60
67
|
## Installation
|
|
61
68
|
|
|
62
|
-
|
|
69
|
+
`acu` requires Python 3.12 or newer. Pick one of the options below — each
|
|
70
|
+
code block is a complete, standalone command.
|
|
63
71
|
|
|
64
|
-
|
|
72
|
+
### From PyPI (recommended)
|
|
65
73
|
|
|
66
|
-
|
|
67
|
-
instance: a flat map where `host` is the only required key; everything
|
|
68
|
-
else has a code default matching a stock Acumatica install:
|
|
74
|
+
With [uv](https://docs.astral.sh/uv/), installed as an isolated tool:
|
|
69
75
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
76
|
+
```sh
|
|
77
|
+
uv tool install acumatica-cli
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
With pipx:
|
|
81
|
+
|
|
82
|
+
```sh
|
|
83
|
+
pipx install acumatica-cli
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
With plain pip:
|
|
87
|
+
|
|
88
|
+
```sh
|
|
89
|
+
pip install acumatica-cli
|
|
90
|
+
```
|
|
74
91
|
|
|
75
|
-
|
|
76
|
-
split-horizon DNS, port forwards, or jump hosts:
|
|
92
|
+
### From the GitHub repository
|
|
77
93
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
94
|
+
Install the latest development version straight from the main branch:
|
|
95
|
+
|
|
96
|
+
```sh
|
|
97
|
+
uv tool install git+https://github.com/kborovik/acumatica-cli.git
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
Or with pip:
|
|
101
|
+
|
|
102
|
+
```sh
|
|
103
|
+
pip install git+https://github.com/kborovik/acumatica-cli.git
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
Verify the installation:
|
|
107
|
+
|
|
108
|
+
```sh
|
|
109
|
+
acu --help
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
## Configuration
|
|
113
|
+
|
|
114
|
+
Configuration lives in one file plus your SSH setup:
|
|
115
|
+
|
|
116
|
+
1. **`.env`** — the whole configuration: *where* to apply and *who* signs
|
|
117
|
+
in, every key an `ACU_*` variable. Three values are required —
|
|
118
|
+
`ACU_BASE_URL` (the REST root: scheme, host, and site path), `ACU_SSH`
|
|
119
|
+
(the control-plane `user@host`), and `ACU_PASSWORD`. Everything else
|
|
120
|
+
has a code default matching a stock Acumatica install:
|
|
81
121
|
|
|
82
122
|
```sh
|
|
83
|
-
acu
|
|
123
|
+
ACU_BASE_URL=http://acu-dev1.vm.internal/AcumaticaERP
|
|
124
|
+
ACU_SSH=Administrator@acu-dev1.vm.internal
|
|
125
|
+
ACU_TENANT=Company # sign-in name of the tenant API sessions use
|
|
126
|
+
ACU_USER=admin # optional, defaults to admin
|
|
127
|
+
ACU_PASSWORD=... # required
|
|
84
128
|
```
|
|
85
129
|
|
|
86
|
-
|
|
87
|
-
|
|
130
|
+
Nothing is derived: split-horizon DNS, port forwards, and jump hosts
|
|
131
|
+
are all handled by writing the address you actually want into the two
|
|
132
|
+
address keys. The file is found by walking up from the current
|
|
133
|
+
directory, so any subdirectory of the data repo works; without a
|
|
134
|
+
`.env`, global flags plus the process environment supply the full
|
|
135
|
+
config. The data repo stores the file encrypted as `.env.gpg`;
|
|
136
|
+
`make decrypt` produces the plaintext `.env` once per clone.
|
|
137
|
+
|
|
138
|
+
`acu config show` prints the fully resolved configuration as a
|
|
139
|
+
complete, valid `.env` — every knob visible, the password excluded.
|
|
140
|
+
To turn the resolved state into your working config, redirect and
|
|
141
|
+
edit:
|
|
88
142
|
|
|
89
143
|
```sh
|
|
90
|
-
|
|
91
|
-
ACU_USER=admin # optional, defaults to admin
|
|
144
|
+
acu config show > .env
|
|
92
145
|
```
|
|
93
146
|
|
|
94
|
-
|
|
95
|
-
the
|
|
96
|
-
|
|
97
|
-
3. **SSH** — *how* the control plane reaches the Windows guest. Configured on
|
|
98
|
-
the guest and in your `~/.ssh`, not in `acu.yaml` — see the next section.
|
|
147
|
+
2. **SSH** — *how* the control plane reaches the Windows guest. Configured on
|
|
148
|
+
the guest and in your `~/.ssh`, not in `.env` — see the next section.
|
|
99
149
|
|
|
100
150
|
Verify the result before touching anything live:
|
|
101
151
|
|
|
102
152
|
```sh
|
|
103
|
-
acu config
|
|
153
|
+
acu config check # read-only preflight: discovery, secrets, REST, SSH
|
|
154
|
+
acu config show # the fully resolved configuration as .env, no secrets
|
|
104
155
|
acu apply --dry-run baseline/
|
|
105
156
|
```
|
|
106
157
|
|
|
@@ -110,19 +161,18 @@ acu apply --dry-run baseline/
|
|
|
110
161
|
|
|
111
162
|
- **Control plane (SSH):** tenant create/delete/list via `ac.exe
|
|
112
163
|
-cm:CompanyConfig` and `sqlcmd` on the Windows guest — see
|
|
113
|
-
[`docs/ac-exe.md`](docs/ac-exe.md). Used by `acu tenant
|
|
114
|
-
of `acu provision`.
|
|
164
|
+
[`docs/ac-exe.md`](docs/ac-exe.md). Used by `acu tenant`.
|
|
115
165
|
- **Data plane (REST):** baseline configuration and reference data through
|
|
116
166
|
the contract-based API (`/entity/Default/25.200.001/`), where `PUT` is a
|
|
117
167
|
keyed upsert — see [`docs/rest-api.md`](docs/rest-api.md). Used by
|
|
118
168
|
`acu apply`, `acu diff`, and `acu schema`.
|
|
119
169
|
|
|
120
170
|
If you only apply and diff baseline YAML, you never need SSH. SSH setup is
|
|
121
|
-
required only for `acu tenant
|
|
171
|
+
required only for `acu tenant`.
|
|
122
172
|
|
|
123
173
|
## SSH setup (control plane)
|
|
124
174
|
|
|
125
|
-
`acu tenant`
|
|
175
|
+
`acu tenant` runs commands on the Windows guest through
|
|
126
176
|
plain `ssh`. Two things about this setup are not obvious, and both are hard
|
|
127
177
|
requirements:
|
|
128
178
|
|
|
@@ -169,4 +219,4 @@ ssh -o BatchMode=yes Administrator@acu-dev1.vm.internal '$PSVersionTable.PSVersi
|
|
|
169
219
|
A version table means you are ready; a password prompt or
|
|
170
220
|
`'$PSVersionTable.PSVersion' is not recognized...` means requirement 2 or 1
|
|
171
221
|
(respectively) is not met yet. Host aliases, jump hosts, and ports go in your
|
|
172
|
-
`~/.ssh/config` as usual, or set `
|
|
222
|
+
`~/.ssh/config` as usual, or set `ACU_SSH=user@alias` in `.env`.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "acumatica-cli"
|
|
3
|
-
version = "0.
|
|
4
|
-
description = "
|
|
3
|
+
version = "0.3.0"
|
|
4
|
+
description = "Acumatica ERP Config-as-Code: tenant provisioning, baseline config, and reference data"
|
|
5
5
|
authors = [{ name = "Konstantin Borovik", email = "kb@lab5.ca" }]
|
|
6
6
|
readme = "README.md"
|
|
7
7
|
requires-python = ">=3.12"
|
|
@@ -9,11 +9,15 @@ dependencies = [
|
|
|
9
9
|
"click>=8.1",
|
|
10
10
|
"httpx>=0.27",
|
|
11
11
|
"pydantic>=2.7",
|
|
12
|
-
"
|
|
12
|
+
"pydantic-settings>=2.5",
|
|
13
13
|
"pyyaml>=6.0",
|
|
14
14
|
"rich>=13",
|
|
15
15
|
]
|
|
16
16
|
|
|
17
|
+
[project.urls]
|
|
18
|
+
Homepage = "https://lab5.ca"
|
|
19
|
+
Repository = "https://github.com/kborovik/acumatica-cli"
|
|
20
|
+
|
|
17
21
|
[project.scripts]
|
|
18
22
|
acu = "acumatica_cli.cli:main"
|
|
19
23
|
|