Replies: 13 comments 19 replies
-
In general it looks good, but I have a few comments.
|
Beta Was this translation helpful? Give feedback.
-
I do not like suggestion for |
Beta Was this translation helpful? Give feedback.
-
About profile and config. I am not able to see a big difference between them. Current commands are:
What about merging both into something like this?
For applying an AutoYaST profile:
For applying a JSONNET config:
|
Beta Was this translation helpful? Give feedback.
-
BTW, when we designed the current CLI we tried to follow this https://clig.dev. |
Beta Was this translation helpful? Give feedback.
-
Before I summarize the discussion so far,
|
Beta Was this translation helpful? Give feedback.
-
While working on a different task, I recalled a use case we discussed in the past: being able to load the assets from the remote location. Let's say that you have a profile and a bunch of scripts in your hard disk:
It would be nice to not have to copy the files over the network or put them on a web server. Something like (using the old design):
But thinking twice, perhaps just adding a command to upload them might be enough. But still you need to reference them from the CLI. Any thoughts on this? Does this feature make sense? |
Beta Was this translation helpful? Give feedback.
-
Sorry I don't understand what @imobachgs means with the upload. And since we are talking about downloads and uploads, we do need to consider the case when the client and the (target) host are different machines, |
Beta Was this translation helpful? Give feedback.
-
What single CLI command will be used in agama-auto.service? Josef designed |
Beta Was this translation helpful? Give feedback.
-
OK, so |
Beta Was this translation helpful? Give feedback.
-
So here is the proposal with respect to command existence (disregarding their options) --- cli-a 2025-04-29 10:53:53.561794683 +0200
+++ cli-b 2025-04-29 11:07:43.622355381 +0200
@@ -1,26 +1,24 @@
## `agama`
## `agama config`
+## `agama config generate` (combines `profile evaluate` and `profile autoyast`)
+## `agama config validate` (renamed from `profile validate`)
## `agama config show`
## `agama config load`
## `agama config edit`
## `agama probe`
## `agama install`
-## `agama profile`
-## `agama profile autoyast`
-## `agama profile validate`
-## `agama profile evaluate`
-## `agama profile import`
+## (`agama profile import` removed, including script execution? agama CLI vs ssh?)
## `agama questions`
## `agama questions mode`
## `agama questions answers`
## `agama questions list`
## `agama questions ask`
## `agama logs`
## `agama logs store`
## `agama logs list`
## `agama auth`
## `agama auth login`
## `agama auth logout`
## `agama auth show`
## `agama download`
## `agama finish` |
Beta Was this translation helpful? Give feedback.
-
candidate CLI principle: minimalism Should the individual commands do just a bare minimum and be composed with other commands? Taken to the extreme, we would have only |
Beta Was this translation helpful? Give feedback.
-
@imobachgs: but then, if and if we stayed with whoever resolves the relative references has to know the original base URL. Unix pipes break that, don't they? |
Beta Was this translation helpful? Give feedback.
-
The format which I think is best suited for the result of this discussion is the following: agama-project/agama-project.github.io#74 "CLI reorganization: desired state of CLI help" It is a diff from the current generated summary of the CLI help to its desired state. Once we "Approve" it, it should not be merged but instead serve as the design document for a further Agama PR. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
CLI principle:
agama [OBJECT] COMMAND ...
These commands have no object:
These are the objects that have commands:
CLI principle: work with unix pipes via stdio
-
in place of PATH or URL)--output FILENAME
(-o
)Commands:
agama logs store [-d DEST_UGH]
This is a justified exception to the stdio principle because the output is always binary data, so save it by default and print the filename.
But the command behavior is inconsistent:
-d mylogs
complains "Invalid destination path",-d ./mylogs
works (writing./mylogs.tar.gz
)-d .
overwrites./agama-logs.tar.gz
, while no-d
at all uses/tmp/agama-logs-$TIMESTAMP.tar.gz
agama download URL DESTINATION
becomes agama download [--output PATH] URL
download says it is an exception to the stdout rule because what? binary?
IMHO no, just remove it (not make optional) and say in help
agama config show
Outputs to stdout, good.
agama config load
Inputs from stdin.
agama profile validate
, is a predicate on an external resourceInput from URL_OR_PATH already, output is status only, good
agama profile evaluate
Should it include
validate
?agama profile autoyast URL
combines conversion with downloading... explain that it is OK because that's
what legacy AutoYaST does
agama profile import URL
Input as URL only which is inconsistent but I don't see a use case with path/stdin...
CLI principle: names make sense
TODO:
agama config
andagama profile
are related, won't users confuse them? Suggestion: keep separate but explain,config
is internal state,profile
deals with AutoYaST?Beta Was this translation helpful? Give feedback.
All reactions