odysseus-cli 0.1.0 → 0.3.0
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.
- checksums.yaml +4 -4
- data/README.md +44 -0
- data/bin/odysseus +9 -1
- data/lib/odysseus/cli/cli.rb +308 -516
- data/lib/odysseus/cli/ui.rb +447 -0
- metadata +10 -9
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 286c6f613a97b1f0fe05e0fbe7c32134743f548a54963a3f118d8291ccebc792
|
|
4
|
+
data.tar.gz: 3d31e2e4a8d0a6bd64eb20d549d96b49a00885474a7c9fbd4467e9394bd254a0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1a9f282b7f6c4380c28011bba65ed280ae791bbd27317aaf063e237a41d3a69ccd8de64dd24969f1664636b841897965070d2230a1949ce906b0b42cc98eed81
|
|
7
|
+
data.tar.gz: 33dfa6160b2db4ff12b1a31c6da6abaf22a8852d59b002cd82c029a231a00306e9df1cbeeb4727c615519dc97fa9ec3d62b3bab6a6732c52f9d71e9c405e1607
|
data/README.md
CHANGED
|
@@ -461,6 +461,50 @@ registry:
|
|
|
461
461
|
|
|
462
462
|
For better security, you can store registry credentials in your encrypted secrets file and reference them.
|
|
463
463
|
|
|
464
|
+
## Charm Mode (TUI)
|
|
465
|
+
|
|
466
|
+
Odysseus CLI supports an optional **Charm mode** for a more glamorous terminal experience with spinners, styled output, tables, and interactive confirmations.
|
|
467
|
+
|
|
468
|
+
### Enabling Charm Mode
|
|
469
|
+
|
|
470
|
+
```bash
|
|
471
|
+
# Via command-line flag
|
|
472
|
+
odysseus deploy --charm --build
|
|
473
|
+
|
|
474
|
+
# Via environment variable
|
|
475
|
+
ODYSSEUS_CHARM=1 odysseus deploy --build
|
|
476
|
+
```
|
|
477
|
+
|
|
478
|
+
### Features in Charm Mode
|
|
479
|
+
|
|
480
|
+
- **Styled headers** with rounded borders and colors
|
|
481
|
+
- **Spinners** for long-running operations (build, deploy, pussh)
|
|
482
|
+
- **Tables** for container and accessory status listings
|
|
483
|
+
- **Confirmation dialogs** for destructive operations (cleanup, accessory remove)
|
|
484
|
+
|
|
485
|
+
### Installing gum
|
|
486
|
+
|
|
487
|
+
Charm mode requires [gum](https://github.com/charmbracelet/gum) to be installed:
|
|
488
|
+
|
|
489
|
+
```bash
|
|
490
|
+
# macOS
|
|
491
|
+
brew install gum
|
|
492
|
+
|
|
493
|
+
# Arch Linux
|
|
494
|
+
pacman -S gum
|
|
495
|
+
|
|
496
|
+
# Ubuntu/Debian (via charm tap)
|
|
497
|
+
sudo mkdir -p /etc/apt/keyrings
|
|
498
|
+
curl -fsSL https://repo.charm.sh/apt/gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/charm.gpg
|
|
499
|
+
echo "deb [signed-by=/etc/apt/keyrings/charm.gpg] https://repo.charm.sh/apt/ * *" | sudo tee /etc/apt/sources.list.d/charm.list
|
|
500
|
+
sudo apt update && sudo apt install gum
|
|
501
|
+
|
|
502
|
+
# From source
|
|
503
|
+
go install github.com/charmbracelet/gum@latest
|
|
504
|
+
```
|
|
505
|
+
|
|
506
|
+
If gum is not installed, Odysseus will warn you and fall back to standard output.
|
|
507
|
+
|
|
464
508
|
## Server Requirements
|
|
465
509
|
|
|
466
510
|
Your target servers only need **Docker** installed. Odysseus automatically deploys and manages Caddy as a container (`odysseus-caddy`) - no manual Caddy installation required.
|
data/bin/odysseus
CHANGED
|
@@ -6,7 +6,11 @@ require 'odysseus/cli/cli'
|
|
|
6
6
|
require 'optparse'
|
|
7
7
|
|
|
8
8
|
def main
|
|
9
|
-
|
|
9
|
+
# Debug mode: verbose output with no spinners
|
|
10
|
+
debug_mode = ENV['ODYSSEUS_DEBUG'] == '1' || ARGV.include?('--debug')
|
|
11
|
+
ARGV.delete('--debug')
|
|
12
|
+
|
|
13
|
+
cli = Odysseus::CLI::CLI.new(debug: debug_mode)
|
|
10
14
|
|
|
11
15
|
commands = {
|
|
12
16
|
'deploy' => { method: :deploy, needs_server: false },
|
|
@@ -241,6 +245,10 @@ end
|
|
|
241
245
|
def print_help
|
|
242
246
|
puts "Usage: odysseus <command> [options]"
|
|
243
247
|
puts ""
|
|
248
|
+
puts "Global options:"
|
|
249
|
+
puts " --debug Verbose output (show all commands and details)"
|
|
250
|
+
puts " Or set ODYSSEUS_DEBUG=1 environment variable"
|
|
251
|
+
puts ""
|
|
244
252
|
puts "Commands:"
|
|
245
253
|
puts " deploy Deploy all roles to servers defined in config"
|
|
246
254
|
puts " build Build Docker image (locally or on build host)"
|