pray-cli 1.6.0 → 1.7.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e9a9ce52fe79c346f5ea5bf9516fb6ad813da69028fcf27c4fe166946fec77fc
4
- data.tar.gz: 39062dc10eee030334edda7c10a9a71749a93c887cf2483f218ab7a9ceefcb68
3
+ metadata.gz: 0b96847ff63e2123258b7dcedd5c074392941b6654f20d02767b0a221ecbeb8e
4
+ data.tar.gz: 256f98e161876f0145790fde9a581eda5747267823e3e2bdf30beeabfbdc477b
5
5
  SHA512:
6
- metadata.gz: 8097c2dab4ec198b55d8fc8803ed602f82fa6afef6096602b539f25b501b597da0bcd53108de519422b2216b624d0060e21020cb7abf531e700eaaa5a83eeac5
7
- data.tar.gz: f8bde377e7a44de1aeec8591c92e4f478e2758386067585ac17c07afbb0af71946c37dbd7f6a58b4035ced2e6141f32ea2cd20372f0eafe195c1075ea43d3a37
6
+ metadata.gz: 4d7d234f3c63b528eaec20fd9d0e1eba462df4128c691b56daa7b6eb3e943f5ed56259c59335e91eb12501385cda68b1ccbce4179bf62f0aab896bbcc4e4edf8
7
+ data.tar.gz: 989b8e9f72b95740f4328e5ae584b60c467d33c3a36a2cc8388ca567ab014adf6449264d22ac96610b6f66feffc3c6d96d779f39c5119d8dc7e7a780efbf1a0c
data/CHANGELOG.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 1.7.0 (2026-07-29)
6
+
7
+ - Reshape CLI help around a `Usage` synopsis and `Options` block; cover every listed command; point unknown-command errors at `pray --help`.
8
+
5
9
  ## 1.6.0 (2026-07-29)
6
10
 
7
11
  - Run tests with polyrun parallel RSpec, coverage gate, Makefile lint/test, and RBS validate.
data/lib/pray/cli/help.rb CHANGED
@@ -3,8 +3,6 @@
3
3
  module Pray
4
4
  module CLI
5
5
  module Help
6
- DOCS_URL = "https://github.com/kiskolabs/pray"
7
-
8
6
  WORKFLOW_COMMANDS = [
9
7
  "install [--locked|--frozen|--offline] resolve, render, and write Prayfile.lock",
10
8
  "plan [--remote] preview materialization changes",
@@ -16,10 +14,10 @@ module Pray
16
14
  ].freeze
17
15
 
18
16
  PACKAGE_COMMANDS = [
19
- "add <name> [constraint] [--path PATH]",
20
- "remove <name>",
17
+ "add <name> [constraint] [--path PATH] declare a package in Prayfile",
18
+ "remove <name> remove a package from Prayfile",
21
19
  "update [package] [--major] [--latest] [--dry-run] [--json]",
22
- "unlock <package>",
20
+ "unlock <package> clear a locked package pin",
23
21
  "vendor copy resolved packages locally",
24
22
  "clean remove local cache and vendor trees"
25
23
  ].freeze
@@ -38,23 +36,29 @@ module Pray
38
36
 
39
37
  INSPECT_COMMANDS = [
40
38
  "list list declared packages",
41
- "outdated [--remote] show constraint vs resolved versions",
42
- "explain <package> show why a package was selected",
43
- "tree print the dependency tree"
39
+ "outdated [--remote] show constraint vs resolved versions",
40
+ "explain <package> show why a package was selected",
41
+ "tree print the dependency tree"
44
42
  ].freeze
45
43
 
46
44
  META_COMMANDS = [
47
- "init [--targets tool_a,tool_b]",
45
+ "init [--targets tool_a,tool_b] create a starter Prayfile",
48
46
  "prayer init scaffold a prayer package",
49
47
  "repo init scaffold a distribution root",
50
48
  "manifest print canonical Prayfile JSON",
51
49
  "package build a distributable prayer archive",
52
- "version | -V | --version"
50
+ "version | -V | --version print the pray CLI version"
51
+ ].freeze
52
+
53
+ GLOBAL_OPTIONS = [
54
+ "--no-input disable prompts",
55
+ "--rm use an ephemeral home directory",
56
+ "--trust [--global] import trust on first use"
53
57
  ].freeze
54
58
 
55
59
  COMMAND_HELP = {
56
60
  "install" => <<~TEXT.strip,
57
- install — resolve packages, render targets, and update Prayfile.lock
61
+ resolve packages, render targets, and update Prayfile.lock
58
62
 
59
63
  Usage: pray install [--locked|--frozen|--offline]
60
64
 
@@ -63,7 +67,7 @@ module Pray
63
67
  --offline use cache only
64
68
  TEXT
65
69
  "verify" => <<~TEXT.strip,
66
- verify — check rendered files against Prayfile.lock
70
+ check rendered files against Prayfile.lock
67
71
 
68
72
  Usage: pray verify [--strict]
69
73
 
@@ -71,56 +75,120 @@ module Pray
71
75
  With --strict, any finding fails with exit code 6.
72
76
  TEXT
73
77
  "drift" => <<~TEXT.strip,
74
- drift — report differences between lockfile and current resolution
78
+ report differences between lockfile and current resolution
75
79
 
76
80
  Usage: pray drift [--semantic]
77
81
 
78
82
  Exits with code 6 when drift is found.
79
83
  TEXT
84
+ "render" => <<~TEXT.strip,
85
+ render targets without updating the lockfile
86
+
87
+ Usage: pray render [--check]
88
+ TEXT
89
+ "format" => <<~TEXT.strip,
90
+ rewrite Prayfile to recommended destination DSL
91
+
92
+ Usage: pray format
93
+ pray fmt
94
+ TEXT
95
+ "fmt" => <<~TEXT.strip,
96
+ rewrite Prayfile to recommended destination DSL
97
+
98
+ Usage: pray format
99
+ pray fmt
100
+ TEXT
80
101
  "update" => <<~TEXT.strip,
81
- update — refresh package versions within constraints
102
+ refresh package versions within constraints
82
103
 
83
104
  Usage: pray update [package] [--major] [--latest] [--dry-run] [--json]
84
105
  TEXT
85
106
  "plan" => <<~TEXT.strip,
86
- plan — preview install/apply changes
107
+ preview install/apply changes
87
108
 
88
109
  Usage: pray plan [--remote]
89
110
  TEXT
90
- "apply" => "apply — materialize the current resolution plan\n\nUsage: pray apply",
111
+ "apply" => "materialize the current resolution plan\n\nUsage: pray apply",
112
+ "add" => <<~TEXT.strip,
113
+ declare a package in Prayfile
114
+
115
+ Usage: pray add <name> [constraint] [--path PATH]
116
+ TEXT
117
+ "remove" => "remove a package from Prayfile\n\nUsage: pray remove <name>",
118
+ "unlock" => "clear a locked package pin\n\nUsage: pray unlock <package>",
119
+ "vendor" => "copy resolved packages locally\n\nUsage: pray vendor",
120
+ "clean" => "remove local cache and vendor trees\n\nUsage: pray clean",
121
+ "publish" => <<~TEXT.strip,
122
+ upload packages to a registry or local root
123
+
124
+ Usage: pray publish --root PATH [--server URL ...]
125
+ TEXT
126
+ "login" => <<~TEXT.strip,
127
+ authenticate to a registry server
128
+
129
+ Usage: pray login --server URL --email EMAIL
130
+ TEXT
131
+ "serve" => <<~TEXT.strip,
132
+ run a local registry server
133
+
134
+ Usage: pray serve [--root PATH] [--host HOST] [--port PORT] [--stdio]
135
+ TEXT
136
+ "sync" => <<~TEXT.strip,
137
+ sync packages with peer registries
138
+
139
+ Usage: pray sync [--root PATH] [--peer URL ...]
140
+ TEXT
141
+ "confess" => <<~TEXT.strip,
142
+ record an acceptance or rejection for a package confession
143
+
144
+ Usage: pray confess <package> | --from-lock SPAN_ID [--accepted|--rejected]
145
+ TEXT
91
146
  "trust" => <<~TEXT.strip,
92
- trust — manage client trust policy for remote sources
147
+ manage client trust policy for remote sources
93
148
 
94
149
  Usage: pray trust <subcommand>
95
150
 
96
151
  Subcommands: list, show, add-key, remove-key, set-signed, set-allow, import-repo, import-registry, check
97
152
  TEXT
98
- "init" => <<~TEXT.strip,
99
- init create a starter Prayfile
153
+ "list" => "list declared packages\n\nUsage: pray list",
154
+ "outdated" => <<~TEXT.strip,
155
+ show constraint vs resolved versions
100
156
 
101
- Usage: pray init [--targets tool_a,tool_b]
157
+ Usage: pray outdated [--remote]
102
158
  TEXT
103
- "add" => <<~TEXT.strip,
104
- add declare a package in Prayfile
159
+ "explain" => <<~TEXT.strip,
160
+ show why a package was selected
105
161
 
106
- Usage: pray add <name> [constraint] [--path PATH]
162
+ Usage: pray explain <package>
107
163
  TEXT
108
- "publish" => <<~TEXT.strip,
109
- publish upload packages to a registry or local root
164
+ "tree" => "print the dependency tree\n\nUsage: pray tree",
165
+ "init" => <<~TEXT.strip,
166
+ create a starter Prayfile
110
167
 
111
- Usage: pray publish --root PATH [--server URL ...]
168
+ Usage: pray init [--targets tool_a,tool_b]
112
169
  TEXT
113
- "serve" => <<~TEXT.strip
114
- serve run a local registry server
170
+ "prayer" => "scaffold a prayer package\n\nUsage: pray prayer init",
171
+ "repo" => "scaffold a distribution root\n\nUsage: pray repo init",
172
+ "manifest" => "print canonical Prayfile JSON\n\nUsage: pray manifest",
173
+ "package" => "build a distributable prayer archive\n\nUsage: pray package",
174
+ "version" => <<~TEXT.strip,
175
+ print the pray CLI version
176
+
177
+ Usage: pray version
178
+ pray -V | --version
179
+ TEXT
180
+ "help" => <<~TEXT.strip
181
+ show help for pray or one command
115
182
 
116
- Usage: pray serve [--root PATH] [--host HOST] [--port PORT] [--stdio]
183
+ Usage: pray help [command]
184
+ pray [command] --help
117
185
  TEXT
118
186
  }.freeze
119
187
 
120
188
  module_function
121
189
 
122
190
  def print_concise_help
123
- puts "pray reproducible inference input for projects"
191
+ puts "Usage: pray [OPTIONS] <COMMAND>"
124
192
  puts
125
193
  puts "Declare shared instructions in Prayfile, lock versions, and render tool-specific output."
126
194
  puts
@@ -133,9 +201,10 @@ module Pray
133
201
  puts
134
202
  print_command_groups
135
203
  puts
136
- puts "Run `pray help <command>` or `pray <command> --help` for one command."
137
- puts "Documentation: #{DOCS_URL}"
138
- puts "Exit codes: 0 success; 2 usage/parse; 3 resolution; 4 integrity; 5 render; 6 verify; 8 unsupported."
204
+ puts "Options:"
205
+ GLOBAL_OPTIONS.each { |line| puts " #{line}" }
206
+ puts
207
+ puts "See 'pray help <command>' or 'pray <command> --help' for details on a command."
139
208
  end
140
209
 
141
210
  def print_command_help(command)
@@ -143,25 +212,26 @@ module Pray
143
212
  return false unless text
144
213
 
145
214
  puts text
146
- puts
147
- puts "Documentation: #{DOCS_URL}"
148
215
  true
149
216
  end
150
217
 
151
218
  def print_command_groups
152
- puts "Workflow:"
153
- WORKFLOW_COMMANDS.each { |line| puts " #{line}" }
154
- puts "Packages:"
155
- PACKAGE_COMMANDS.each { |line| puts " #{line}" }
156
- puts "Distribution:"
157
- DISTRIBUTION_COMMANDS.each { |line| puts " #{line}" }
158
- puts "Trust:"
159
- TRUST_COMMANDS.each { |line| puts " #{line}" }
160
- puts "Inspect:"
161
- INSPECT_COMMANDS.each { |line| puts " #{line}" }
162
- puts "Meta:"
163
- META_COMMANDS.each { |line| puts " #{line}" }
164
- puts "Global flags: --no-input (disable prompts), --rm (ephemeral home), --trust [--global]"
219
+ print_group("Workflow", WORKFLOW_COMMANDS)
220
+ puts
221
+ print_group("Packages", PACKAGE_COMMANDS)
222
+ puts
223
+ print_group("Distribution", DISTRIBUTION_COMMANDS)
224
+ puts
225
+ print_group("Trust", TRUST_COMMANDS)
226
+ puts
227
+ print_group("Inspect", INSPECT_COMMANDS)
228
+ puts
229
+ print_group("Meta", META_COMMANDS)
230
+ end
231
+
232
+ def print_group(title, lines)
233
+ puts "#{title}:"
234
+ lines.each { |line| puts " #{line}" }
165
235
  end
166
236
  end
167
237
  end
@@ -14,7 +14,8 @@ module Pray
14
14
  def unknown_command_message(command)
15
15
  message = "unknown command: #{command}"
16
16
  suggestion = suggest_command(command, TOP_LEVEL_COMMANDS)
17
- suggestion ? "#{message}\nDid you mean `#{suggestion}`?" : message
17
+ message = "#{message}\nDid you mean `#{suggestion}`?" if suggestion
18
+ "#{message}\nSee 'pray --help'."
18
19
  end
19
20
 
20
21
  def suggest_command(input, candidates)
data/lib/pray/version.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Pray
4
- VERSION = "1.6.0"
5
- GENERATED_BY = "pray 1.6.0"
4
+ VERSION = "1.7.0"
5
+ GENERATED_BY = "pray 1.7.0"
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pray-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.0
4
+ version: 1.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrei Makarov