pike13-cli 0.2.1 → 0.2.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1fb670799c8613bf30e57bc2a27f67fa56688013c81040d2f99b0a831ec5b12e
4
- data.tar.gz: 7723a7b7bc57df97147dc8ead89751d7913881e6a24282000df4ff69d56b1963
3
+ metadata.gz: 920c87ea78eca41c9a8ecf86d88543d261409eb8e9836b85a816007078c2eab7
4
+ data.tar.gz: 5de6a6180d416d4fc7811f0beea0612cbf9d542b286c1fb9d1c64c5d2ac4ae15
5
5
  SHA512:
6
- metadata.gz: e02eefafc87f6fc027c13c162e5c8a76bf27a6688297ddaa5c70739174d9040535889aa2def7a65f6d860b2a5b09392640a4bb83896037c0505b217559c1c050
7
- data.tar.gz: 15a52cd46b1aacd85c79bf925ce7f44e05c3a4e2b873ef8f9d970119fd3d4752b49bcb719d014cad83969c87d6c9b7ae99e0d3a77e35a3e48081db843b65a619
6
+ metadata.gz: 72f787c4b8d2c6881657dce67419b91a08b656c7f3582643cb38bbd2d3c1019f8e8a42cce08fd00401d15d44ed5dacedef2b0520722dc68ac841f0e849b5953d
7
+ data.tar.gz: 4a60dab31d632ae4365f96c34c60ed6401b8288a5719396d3500107298d86b87400bad80dab6e5c84185e42a449d71063a8b20be501169d9d8f54385024ac4d3
data/CHANGELOG.md CHANGED
@@ -5,6 +5,22 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.2.3] - 2025-11-22
9
+
10
+ ### Fixed
11
+ - **Help Command Cleanup** - Removed redundant help command from command listings
12
+ - The `help` command no longer appears in command lists since `-h/--help` flags are already available
13
+ - Simplified command discovery by removing duplicate help options
14
+ - Improved command listing clarity across all namespaces
15
+
16
+ ## [0.2.2] - 2025-11-19
17
+
18
+ ### Fixed
19
+ - **Help Command Documentation** - Improved help command clarity and consistency
20
+ - Updated README.md with better help command examples
21
+ - Enhanced help command display logic in CLI base commands
22
+ - Improved user experience for discovering available commands
23
+
8
24
  ## [0.2.1] - 2025-11-18
9
25
 
10
26
  ### Fixed
data/README.md CHANGED
@@ -353,10 +353,10 @@ pike13 desk make_ups reasons
353
353
  pike13 desk make_ups generate 456 --make-up-reason-id 126989 --free-form-reason "Client was sick"
354
354
 
355
355
  # Waitlist
356
- pike13 desk waitlist list
357
- pike13 desk waitlist get 789
358
- pike13 desk waitlist create --person-id 123 --event-id 100
359
- pike13 desk waitlist delete 789
356
+ pike13 desk waitlist_entry list
357
+ pike13 desk waitlist_entry get 789
358
+ pike13 desk waitlist_entry create --person-id 123 --event-id 100
359
+ pike13 desk waitlist_entry delete 789
360
360
 
361
361
  # Person-related resources
362
362
  pike13 desk person_visits list 123
@@ -530,14 +530,33 @@ pike13 report clients query --progress --format table
530
530
 
531
531
  ```bash
532
532
  # Help for any command
533
- pike13 help
534
- pike13 desk help
535
- pike13 desk people help
536
- pike13 desk event_occurrences help
537
- pike13 desk event_occurrence_notes help
538
- pike13 desk custom_fields help
539
- pike13 desk forms_of_payment help
540
- pike13 report help
533
+ pike13 --help
534
+ pike13 -h
535
+
536
+ pike13 desk --help
537
+ pike13 desk -h
538
+
539
+ pike13 desk people --help
540
+ pike13 desk people -h
541
+
542
+ pike13 desk event_occurrences --help
543
+ pike13 desk event_occurrences -h
544
+
545
+ pike13 desk event_occurrence_notes --help
546
+ pike13 desk event_occurrence_notes -h
547
+
548
+ pike13 desk custom_fields --help
549
+ pike13 desk custom_fields -h
550
+
551
+ pike13 desk forms_of_payment --help
552
+ pike13 desk forms_of_payment -h
553
+
554
+ pike13 report --help
555
+ pike13 report -h
556
+
557
+ # Help for specific commands
558
+ pike13 desk people list --help
559
+ pike13 report clients query --help
541
560
 
542
561
  # Verbose output (show HTTP requests and detailed debugging)
543
562
  pike13 desk people list --verbose
@@ -939,19 +958,30 @@ pike13 report clients query --format csv > clients.csv
939
958
  ### Getting Help
940
959
 
941
960
  ```bash
942
- # View help for any command
943
- pike13 help
944
- pike13 desk help
945
- pike13 desk people help
946
- pike13 desk event_occurrences help
947
- pike13 desk custom_fields help
948
- pike13 desk forms_of_payment help
961
+ # View help for any command (use --help or -h flags)
962
+ pike13 --help
963
+ pike13 -h
964
+
965
+ pike13 desk --help
966
+ pike13 desk -h
967
+
968
+ pike13 desk people --help
969
+ pike13 desk people -h
970
+
971
+ pike13 desk event_occurrences --help
972
+ pike13 desk event_occurrences -h
973
+
974
+ pike13 desk custom_fields --help
975
+ pike13 desk custom_fields -h
976
+
977
+ pike13 desk forms_of_payment --help
978
+ pike13 desk forms_of_payment -h
949
979
 
950
980
  # Check your environment
951
981
  pike13 version
952
982
 
953
983
  # List all available commands
954
- pike13 help | grep -A 100 "Commands:"
984
+ pike13 --help | grep -A 100 "Commands:"
955
985
  ```
956
986
 
957
987
  ## Development
@@ -969,7 +999,7 @@ gem build pike13-cli.gemspec
969
999
  gem install pike13-cli-0.1.0.beta.gem
970
1000
 
971
1001
  # Test the CLI
972
- pike13 help
1002
+ pike13 --help
973
1003
 
974
1004
  # Run tests
975
1005
  bundle exec rspec
@@ -9,7 +9,7 @@ module Pike13
9
9
  def self.base_usage
10
10
  "account people"
11
11
  end
12
- desc "list", "List all people across businesses"
12
+ desc "list", "List all people across your businesses"
13
13
  format_options
14
14
  def list
15
15
  handle_error do
@@ -12,6 +12,21 @@ module Pike13
12
12
  class_option :verbose, type: :boolean, aliases: "-v", desc: "Verbose output"
13
13
  class_option :quiet, type: :boolean, aliases: "-q", desc: "Quiet mode (errors only)"
14
14
 
15
+ # Override printable_commands to hide redundant help command from listings
16
+ def self.printable_commands(*args)
17
+ result = super
18
+ # Remove the help command from listings since it's redundant when using -h/--help
19
+ result.reject { |item| item.first.include?("help [COMMAND]") }
20
+ end
21
+
22
+ # Override help to show command-specific options
23
+ def self.handle_argument_error(task, error, _type)
24
+ puts "Error: #{error.message}"
25
+ puts
26
+ puts "Run '#{basename} #{base_usage} #{task.name} --help' for more information."
27
+ exit 1
28
+ end
29
+
15
30
  # Auto-generate base_usage from class name
16
31
  def self.base_usage
17
32
  # Convert class name like Pike13::CLI::Commands::Report::Clients
@@ -5,6 +5,11 @@ module Pike13
5
5
  module Commands
6
6
  class Desk < Base
7
7
  class Event < Base
8
+ # Override base_usage to match the actual subcommand registration
9
+ def self.base_usage
10
+ "desk events"
11
+ end
12
+
8
13
  desc "list", "List all events"
9
14
  map "ls" => :list
10
15
  format_options
@@ -5,6 +5,11 @@ module Pike13
5
5
  module Commands
6
6
  class Desk < Base
7
7
  class Invoice < Base
8
+ # Override base_usage to match the actual subcommand registration
9
+ def self.base_usage
10
+ "desk invoices"
11
+ end
12
+
8
13
  desc "list", "List all invoices"
9
14
  map "ls" => :list
10
15
  format_options
@@ -5,6 +5,11 @@ module Pike13
5
5
  module Commands
6
6
  class Desk < Base
7
7
  class Location < Base
8
+ # Override base_usage to match the actual subcommand registration
9
+ def self.base_usage
10
+ "desk locations"
11
+ end
12
+
8
13
  desc "list", "List all locations"
9
14
  map "ls" => :list
10
15
  format_options
@@ -5,6 +5,11 @@ module Pike13
5
5
  module Commands
6
6
  class Desk < Base
7
7
  class Service < Base
8
+ # Override base_usage to match the actual subcommand registration
9
+ def self.base_usage
10
+ "desk services"
11
+ end
12
+
8
13
  desc "list", "List all services"
9
14
  map "ls" => :list
10
15
  format_options
@@ -5,6 +5,10 @@ module Pike13
5
5
  module Commands
6
6
  class Desk < Base
7
7
  class WaitlistEntry < Base
8
+ # Override base_usage to match the actual subcommand registration
9
+ def self.base_usage
10
+ "desk waitlist_entry"
11
+ end
8
12
  desc "list", "List waitlist entries"
9
13
  map "ls" => :list
10
14
  format_options
@@ -122,8 +122,11 @@ module Pike13
122
122
  desc "mu SUBCOMMAND", "Manage make-ups (shortcut)"
123
123
  subcommand "mu", Desk::MakeUp
124
124
 
125
- desc "waitlist SUBCOMMAND", "Manage waitlist entries"
126
- subcommand "waitlist", Desk::WaitlistEntry
125
+ desc "waitlist_entry SUBCOMMAND", "Manage waitlist entries"
126
+ subcommand "waitlist_entry", Desk::WaitlistEntry
127
+
128
+ desc "wl SUBCOMMAND", "Manage waitlist entries (shortcut)"
129
+ subcommand "wl", Desk::WaitlistEntry
127
130
 
128
131
  desc "person_visits SUBCOMMAND", "Manage person visits"
129
132
  subcommand "person_visits", Desk::PersonVisit
@@ -5,6 +5,11 @@ module Pike13
5
5
  module Commands
6
6
  class Front < Base
7
7
  class Event < Base
8
+ # Override base_usage to match the actual subcommand registration
9
+ def self.base_usage
10
+ "front events"
11
+ end
12
+
8
13
  desc "list", "List events (client view)"
9
14
  format_options
10
15
  option :from, type: :string, desc: "Start date (YYYY-MM-DD or timestamp)"
@@ -5,6 +5,11 @@ module Pike13
5
5
  module Commands
6
6
  class Front < Base
7
7
  class Location < Base
8
+ # Override base_usage to match the actual subcommand registration
9
+ def self.base_usage
10
+ "front locations"
11
+ end
12
+
8
13
  desc "list", "List locations (client view)"
9
14
  format_options
10
15
  def list
@@ -5,6 +5,11 @@ module Pike13
5
5
  module Commands
6
6
  class Front < Base
7
7
  class Service < Base
8
+ # Override base_usage to match the actual subcommand registration
9
+ def self.base_usage
10
+ "front services"
11
+ end
12
+
8
13
  desc "list", "List services (client view)"
9
14
  format_options
10
15
  def list
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Pike13
4
4
  module CLI
5
- VERSION = "0.2.1"
5
+ VERSION = "0.2.3"
6
6
  end
7
7
  end
data/lib/pike13/cli.rb CHANGED
@@ -17,6 +17,7 @@ module Pike13
17
17
  class Runner < Thor
18
18
  class_option :verbose, type: :boolean, aliases: "-v", desc: "Verbose output"
19
19
  class_option :quiet, type: :boolean, aliases: "-q", desc: "Quiet mode (errors only)"
20
+ class_option :help, type: :boolean, aliases: "-h", desc: "Show help information"
20
21
 
21
22
  desc "desk SUBCOMMAND", "Desk namespace (staff interface)"
22
23
  subcommand "desk", Commands::Desk
@@ -56,7 +57,8 @@ module Pike13
56
57
  # Skip config for help commands
57
58
  first_arg = given_args.first
58
59
  is_help_command = first_arg == "help" || first_arg == "version" ||
59
- given_args.any? { |arg| arg.include?("--help") }
60
+ given_args.any? { |arg| arg.include?("--help") || arg.include?("-h") } ||
61
+ given_args.include?("help") # Catch help subcommand at any level
60
62
  unless is_help_command || given_args.empty?
61
63
  Config.configure_pike13!
62
64
  end
metadata CHANGED
@@ -1,10 +1,10 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pike13-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
- - Pike13 CLI Contributors
7
+ - Juan Huttemann
8
8
  bindir: bin
9
9
  cert_chain: []
10
10
  date: 1980-01-02 00:00:00.000000000 Z