Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more documentation to jag run and install. #483

Merged
merged 1 commit into from
Jan 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion cmd/jag/commands/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,16 @@ func ContainerListCmd() *cobra.Command {

func ContainerInstallCmd() *cobra.Command {
cmd := &cobra.Command{
Use: "install <name> <file>",
Use: "install <name> <file>",
Long: "Install a container on a device.\n" +
"Installed containers run when they are installed, and on boot.\n" +
"\n" +
"The following define flags have a special meaning:\n" +
" '-D jag.disabled': Disable Jaguar for this program.\n" +
" Disables the HTTP server on the device.\n" +
" '-D jag.timeout': Set the timeout for Jaguar to wait for the program to\n" +
" finish. The value can be a number of seconds or a duration string.\n" +
" If jag.disabled is enabled, then the default is 10 seconds.",
Args: cobra.ExactArgs(2),
RunE: func(cmd *cobra.Command, args []string) error {
ctx := cmd.Context()
Expand Down
12 changes: 11 additions & 1 deletion cmd/jag/commands/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,17 @@ func RunCmd() *cobra.Command {
"device is already executing another program, that program is stopped before\n" +
"the new program is started.\n" +
"If you specify the device to be 'host' with the option '-d host', then the\n" +
"program runs on the current computer instead.",
"program runs on the current computer instead.\n" +
"\n" +
"The following define flags have a special meaning:\n" +
" '-D jag.disabled': Disable Jaguar for this program.\n" +
" Disables the HTTP server on the device.\n" +
" '-D jag.timeout': Set the timeout for Jaguar to wait for the program to\n" +
" finish. The value can be a number of seconds or a duration string.\n" +
" If jag.disabled is enabled, then the default is 10 seconds.\n" +
"\n" +
"For example 'jag run -D jag.disabled wifi-scan.toit' will run the wifi-scan\n" +
"program on the device without Jaguar using the network.",
Args: cobra.MinimumNArgs(0),
SilenceUsage: true,
RunE: func(cmd *cobra.Command, args []string) error {
Expand Down