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
zday dynamo init # Create DynamoDB table + S3 bucket
173
+
zday dynamo status # Show table/bucket status
174
+
zday dynamo bootstrap # Push local config & templates to DynamoDB
175
+
zday dynamo export# Pull DynamoDB config & templates to local files
176
+
zday dynamo backup # Trigger immediate S3 backup snapshot
177
+
zday dynamo restore # Restore DynamoDB from S3 backup
178
+
zday dynamo destroy # Delete DynamoDB table (preserves S3 backups)
179
+
180
+
# Interactive documentation browser
181
+
zday man # Interactive topic menu
182
+
zday man quickstart # View specific topic
183
+
zday man --list # List all topics
184
+
zday man --search "dynamo"# Search docs for a term
185
+
```
186
+
187
+
#### DynamoDB CLI Reference (`zday dynamo`)
188
+
189
+
Opt-in shared configuration via AWS DynamoDB with S3 backup snapshots. Local-file mode remains the default.
190
+
191
+
| Command | Description | Key Options |
192
+
|---------|-------------|-------------|
193
+
|`zday dynamo init`| Create DynamoDB table and S3 bucket |`--table-name`, `--region`, `--s3-bucket`, `--profile`, `--cost-center`, `--project`, `--skip-checks`|
194
+
|`zday dynamo status`| Show table and S3 backup status |`--json`, `--create-s3-if-missing`|
195
+
|`zday dynamo bootstrap`| Push local config + templates to DynamoDB |`--config-file`, `--templates-dir`, `--include-package/--no-include-package`, `--create-s3-if-missing`|
196
+
|`zday dynamo export`| Pull DynamoDB config + templates to local files |`--output-dir`, `--format json|yaml` |
197
+
|`zday dynamo backup`| Trigger immediate S3 backup snapshot |`--create-s3-if-missing`|
198
+
|`zday dynamo restore`| Restore DynamoDB from an S3 backup |`--s3-key`, `--list`, `--yes`|
|`AWS_PROFILE`| AWS profile name (must **not** be `default`) |_(none)_|
211
+
212
+
##### Quick DynamoDB Workflow
213
+
214
+
```bash
215
+
# 1. Create table + bucket
216
+
export AWS_PROFILE=my-profile
217
+
zday dynamo init --region us-west-2 --s3-bucket zebra-day-cfg-us-west-2
218
+
219
+
# 2. Push local config & templates
220
+
zday dynamo bootstrap --create-s3-if-missing
221
+
222
+
# 3. Confirm status
223
+
zday dynamo status
224
+
225
+
# 4. Switch a running GUI to DynamoDB (session-only, via web UI Config page)
226
+
# or set env vars and restart:
227
+
export ZEBRA_DAY_CONFIG_BACKEND=dynamodb
228
+
zday gui restart
229
+
```
230
+
231
+
#### Documentation Browser (`zday man`)
232
+
233
+
Browse built-in documentation topics from the terminal using Rich-rendered Markdown.
234
+
235
+
```bash
236
+
zday man # Interactive topic picker
237
+
zday man quickstart # Jump to a topic by slug
238
+
zday man --list # List all topics with descriptions
239
+
zday man --search "template"# Full-text search across all docs
170
240
```
171
241
172
242
#### Migration from 0.5.x
@@ -411,8 +481,11 @@ Use `zday info` to see the exact paths on your system.
411
481
412
482
413
483
## Hardware Config
414
-
### AWS Headsup
415
-
- New functionality, best engaged for now via the GUI, allows for a shared dynamodb config resource so multiple clients can query it and share the same config across varios points of code execution.
484
+
### AWS DynamoDB Shared Config (opt-in)
485
+
- Multiple clients can share a single DynamoDB table as the config backend (printer fleet + ZPL templates).
486
+
- Enable via `ZEBRA_DAY_CONFIG_BACKEND=dynamodb` env var or the GUI's Switch Backend form.
487
+
- Every DynamoDB write triggers an automatic S3 backup snapshot (JSON).
488
+
- See `zday dynamo --help` and the [DynamoDB Plan](AWS_DYNAMO_CONFIG_PLAN.md) for details.
416
489
417
490
### Quick
418
491
* Connect all zebra printers to the same network as the machine you'll be running `zebra_day` is connected to. Load labels, power on printers , confirm status lights are green, etc.
The **Config** page includes controls for the DynamoDB shared backend:
773
+
774
+
- **Backend Status Card** — shows current backend type (`local` or `dynamodb`), table name, region, S3 bucket, AWS profile
775
+
- **Switch Backend Form** — swap between `local` and `dynamodb` backends for the running session (does not persist to env vars)
776
+
- Auto-detects existing DynamoDB tables in the selected region
777
+
- Auto-suggests S3 bucket name based on region
778
+
- Validates AWS profile (rejects `default`)
779
+
- "Create Bucket" button if the target S3 bucket doesn't exist
780
+
- **Refresh Config** — reload config from the active backend
781
+
782
+
The **Templates** page includes:
783
+
784
+
- **Import to DynamoDB** — when a DynamoDB backend is active, local templates (user + package) appear with checkboxes for selective import into DynamoDB
785
+
786
+
### DynamoDB API Endpoints
787
+
788
+
All prefixed with `/api/v1/`. Available when the web server is running.
789
+
790
+
| Method | Endpoint | Description |
791
+
|--------|----------|-------------|
792
+
|`GET`|`/config/backend-status`| Current backend type and AWS details |
793
+
|`POST`|`/config/refresh`| Reload config from active backend |
794
+
|`GET`|`/config/detect-tables`| List DynamoDB tables in a region (`?region=&profile=`) |
795
+
|`POST`|`/config/check-s3-bucket`| Check if an S3 bucket exists |
796
+
|`POST`|`/config/create-s3-bucket`| Create S3 bucket with `lsmc` cost tags |
797
+
|`POST`|`/config/switch-backend`| Switch live backend (session-only) |
798
+
|`POST`|`/templates/import-to-dynamo`| Import local templates into DynamoDB |
799
+
|`POST`|`/templates`| Save/create a ZPL template |
800
+
|`DELETE`|`/templates/{name}`| Delete a template |
When clearing or writing a new config, the existing one is saved to a backup location. Users can open these and effectively rollback if errors are made. Replace from template means overwriting the active one with the template file which accompanies the repo.
62
62
63
63
64
+
### Using DynamoDB Backend (v2.2.0+)
65
+
66
+
By default `zpl()` uses local files. To use a shared DynamoDB backend, pass `backend="dynamodb"`:
67
+
68
+
```python
69
+
import zebra_day.print_mgr as zdpm
70
+
71
+
# Local backend (default)
72
+
zlab = zdpm.zpl()
73
+
74
+
# DynamoDB backend — requires table + S3 bucket to exist (see `zday dynamo init`)
75
+
zlab = zdpm.zpl(
76
+
backend="dynamodb",
77
+
table_name="zebra-day-config",
78
+
region="us-west-2",
79
+
s3_bucket="zebra-day-cfg-us-west-2",
80
+
s3_prefix="zebra-day/",
81
+
profile="my-aws-profile",
82
+
)
83
+
84
+
# All operations (print, scan, template management) work identically
85
+
# regardless of backend. Config and templates are read/written to DynamoDB
86
+
# instead of local files, and every write triggers an automatic S3 backup.
87
+
```
88
+
89
+
Alternatively, set environment variables and omit explicit parameters:
0 commit comments