From d8ecade339eb04b58c6e419b850208a1c9dd6f1f Mon Sep 17 00:00:00 2001 From: Danny Ben Shitrit Date: Wed, 10 Dec 2025 17:27:24 +0000 Subject: [PATCH] - Rename get command to go --- README.md | 6 ++-- repli | 28 +++++++++---------- src/bashly.yml | 2 +- src/commands/{get.sh => go.sh} | 0 test/approvals/repli | 2 +- ...t@no_repli_yaml => repli go@no_repli_yaml} | 0 test/approvals/repli_get@error | 13 --------- test/approvals/repli_get_x | 6 ---- test/approvals/repli_get_x@again | 5 ---- test/approvals/repli_go@error | 13 +++++++++ .../{repli_get_help => repli_go_help} | 6 ++-- ... repli_go_u_fixtures_templates_files_yaml} | 8 +++--- test/approvals/repli_go_x | 6 ++++ test/approvals/repli_go_x@again | 5 ++++ test/approvals/repli_help | 2 +- test/spec/{get.sh => go.sh} | 14 +++++----- 16 files changed, 58 insertions(+), 58 deletions(-) rename src/commands/{get.sh => go.sh} (100%) rename test/approvals/{repli get@no_repli_yaml => repli go@no_repli_yaml} (100%) delete mode 100644 test/approvals/repli_get@error delete mode 100644 test/approvals/repli_get_x delete mode 100644 test/approvals/repli_get_x@again create mode 100644 test/approvals/repli_go@error rename test/approvals/{repli_get_help => repli_go_help} (65%) rename test/approvals/{repli_get_u_fixtures_templates_files_yaml => repli_go_u_fixtures_templates_files_yaml} (76%) create mode 100644 test/approvals/repli_go_x create mode 100644 test/approvals/repli_go_x@again rename test/spec/{get.sh => go.sh} (61%) diff --git a/README.md b/README.md index d9a5bb1..e1a8a88 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ repli simplifies working with Replicate into three steps: ``` 4. Run the model: ```console - repli get + repli go ``` Local file references are handled automatically, and all output files are saved @@ -51,7 +51,7 @@ directly to your working directory. Process overview: ``` -template → edit YAML → repli get → output files +template → edit YAML → repli go → output files ``` ## Installation @@ -101,7 +101,7 @@ repli edit ### 4. Run the model ``` -repli get +repli go ``` ### 5. Check your working directory diff --git a/repli b/repli index 9e920a6..ad997e3 100755 --- a/repli +++ b/repli @@ -27,7 +27,7 @@ repli_usage() { # :command.usage_commands printf "%s\n" "$(bold "Commands:")" printf " %s Create a new configuration file from a tmeplate\n" "$(green "new") " - printf " %s Call Replicate using a configuration file and save the result\n" "$(green "get") " + printf " %s Call Replicate using a configuration file and save the result\n" "$(green "go") " printf " %s Edit the repli file\n" "$(green "edit") " printf " %s Show the repli file\n" "$(green "show") " printf " %s Show repli environment information\n" "$(green "env") " @@ -147,14 +147,14 @@ repli_new_usage() { } # :command.usage -repli_get_usage() { - printf "repli get - Call Replicate using a configuration file and save the result\n\n" +repli_go_usage() { + printf "repli go - Call Replicate using a configuration file and save the result\n\n" printf "Alias: g\n" echo printf "%s\n" "$(bold "Usage:")" - printf " repli get [PREFIX] [OPTIONS]\n" - printf " repli get --help | -h\n" + printf " repli go [PREFIX] [OPTIONS]\n" + printf " repli go --help | -h\n" echo # :command.long_usage @@ -1320,9 +1320,9 @@ repli_new_command() { } # :command.function -repli_get_command() { +repli_go_command() { - # src/commands/get.sh + # src/commands/go.sh config="${args[--use]}" prefix="${args[prefix]:-$(get_unique_filename "$(basename "$config" ".yaml")")}" @@ -1661,10 +1661,10 @@ parse_requirements() { shift $# ;; - get | g) - action="get" + go | g) + action="go" shift - repli_get_parse_requirements "$@" + repli_go_parse_requirements "$@" shift $# ;; @@ -1839,7 +1839,7 @@ repli_new_parse_requirements() { } # :command.parse_requirements -repli_get_parse_requirements() { +repli_go_parse_requirements() { local key # :command.fixed_flags_filter @@ -1848,7 +1848,7 @@ repli_get_parse_requirements() { case "$key" in --help | -h) long_usage=yes - repli_get_usage + repli_go_usage exit ;; @@ -1860,7 +1860,7 @@ repli_get_parse_requirements() { done # :command.command_filter - action="get" + action="go" # :command.parse_requirements_while while [[ $# -gt 0 ]]; do @@ -2990,7 +2990,7 @@ run() { case "$action" in "new") repli_new_command ;; - "get") repli_get_command ;; + "go") repli_go_command ;; "edit") repli_edit_command ;; "show") repli_show_command ;; "env") repli_env_command ;; diff --git a/src/bashly.yml b/src/bashly.yml index f878578..cce767d 100644 --- a/src/bashly.yml +++ b/src/bashly.yml @@ -64,7 +64,7 @@ commands: - repli new flux - repli new flux-schnell -e -- name: get +- name: go alias: g help: Call Replicate using a configuration file and save the result diff --git a/src/commands/get.sh b/src/commands/go.sh similarity index 100% rename from src/commands/get.sh rename to src/commands/go.sh diff --git a/test/approvals/repli b/test/approvals/repli index 917b1b0..6797641 100644 --- a/test/approvals/repli +++ b/test/approvals/repli @@ -7,7 +7,7 @@ repli - Replicate AI Workspace Tool Commands: new Create a new configuration file from a tmeplate - get Call Replicate using a configuration file and save the result + go Call Replicate using a configuration file and save the result edit Edit the repli file show Show the repli file env Show repli environment information diff --git a/test/approvals/repli get@no_repli_yaml b/test/approvals/repli go@no_repli_yaml similarity index 100% rename from test/approvals/repli get@no_repli_yaml rename to test/approvals/repli go@no_repli_yaml diff --git a/test/approvals/repli_get@error b/test/approvals/repli_get@error deleted file mode 100644 index 63c2e78..0000000 --- a/test/approvals/repli_get@error +++ /dev/null @@ -1,13 +0,0 @@ -• debug • repli_get_command → config: tmp/repli.yaml -• debug • repli_get_command → prefix: repli-1 -• debug • repli_get_command → outfile: tmp/repli-1.json -• info • repli_get_command → calling API and saving tmp/repli-1.json -• error • json_verify_success_file → received invalid response: -detail: | - - input.image_input.0: Invalid type. Expected: string, given: object -status: 422 -title: Input validation failed -invalid_fields: - - type: invalid_type - field: input.image_input.0 - description: 'Invalid type. Expected: string, given: object' diff --git a/test/approvals/repli_get_x b/test/approvals/repli_get_x deleted file mode 100644 index b79595a..0000000 --- a/test/approvals/repli_get_x +++ /dev/null @@ -1,6 +0,0 @@ -• debug • repli_get_command → config: tmp/repli.yaml -• debug • repli_get_command → prefix: x -• debug • repli_get_command → outfile: tmp/x.json -• info • repli_get_command → calling API and saving tmp/x.json -• debug • download_outputs → downloading from: http://localhost:3000/assets/out-0.jpg -• info • download_outputs → downloading to tmp/x_out-0.jpg diff --git a/test/approvals/repli_get_x@again b/test/approvals/repli_get_x@again deleted file mode 100644 index bef9d3f..0000000 --- a/test/approvals/repli_get_x@again +++ /dev/null @@ -1,5 +0,0 @@ -• debug • repli_get_command → config: tmp/repli.yaml -• debug • repli_get_command → prefix: x -• debug • repli_get_command → outfile: tmp/x.json -• info • repli_get_command → skipping API call, file exists: tmp/x.json -• info • download_outputs → skipping download, file exists: tmp/x_out-0.jpg diff --git a/test/approvals/repli_go@error b/test/approvals/repli_go@error new file mode 100644 index 0000000..e8ce7b9 --- /dev/null +++ b/test/approvals/repli_go@error @@ -0,0 +1,13 @@ +• debug • repli_go_command → config: tmp/repli.yaml +• debug • repli_go_command → prefix: repli-1 +• debug • repli_go_command → outfile: tmp/repli-1.json +• info • repli_go_command → calling API and saving tmp/repli-1.json +• error • json_verify_success_file → received invalid response: +detail: | + - input.image_input.0: Invalid type. Expected: string, given: object +status: 422 +title: Input validation failed +invalid_fields: + - type: invalid_type + field: input.image_input.0 + description: 'Invalid type. Expected: string, given: object' diff --git a/test/approvals/repli_get_help b/test/approvals/repli_go_help similarity index 65% rename from test/approvals/repli_get_help rename to test/approvals/repli_go_help index c46e431..8606feb 100644 --- a/test/approvals/repli_get_help +++ b/test/approvals/repli_go_help @@ -1,10 +1,10 @@ -repli get - Call Replicate using a configuration file and save the result +repli go - Call Replicate using a configuration file and save the result Alias: g Usage: - repli get [PREFIX] [OPTIONS] - repli get --help | -h + repli go [PREFIX] [OPTIONS] + repli go --help | -h Options: --use, -u PATH diff --git a/test/approvals/repli_get_u_fixtures_templates_files_yaml b/test/approvals/repli_go_u_fixtures_templates_files_yaml similarity index 76% rename from test/approvals/repli_get_u_fixtures_templates_files_yaml rename to test/approvals/repli_go_u_fixtures_templates_files_yaml index ace8c4b..bfb907b 100644 --- a/test/approvals/repli_get_u_fixtures_templates_files_yaml +++ b/test/approvals/repli_go_u_fixtures_templates_files_yaml @@ -1,7 +1,7 @@ -• debug • repli_get_command → config: fixtures/templates/files.yaml -• debug • repli_get_command → prefix: files-1 -• debug • repli_get_command → outfile: tmp/files-1.json -• info • repli_get_command → calling API and saving tmp/files-1.json +• debug • repli_go_command → config: fixtures/templates/files.yaml +• debug • repli_go_command → prefix: files-1 +• debug • repli_go_command → outfile: tmp/files-1.json +• info • repli_go_command → calling API and saving tmp/files-1.json • debug • replace_file_placeholders → replacing upload file marker fixtures/images/sample.jpg • info • get_file_url → uploading file: fixtures/images/sample.jpg • debug • get_file_url → file url: https://api.replicate.com/v1/files/some-hash diff --git a/test/approvals/repli_go_x b/test/approvals/repli_go_x new file mode 100644 index 0000000..42671fc --- /dev/null +++ b/test/approvals/repli_go_x @@ -0,0 +1,6 @@ +• debug • repli_go_command → config: tmp/repli.yaml +• debug • repli_go_command → prefix: x +• debug • repli_go_command → outfile: tmp/x.json +• info • repli_go_command → calling API and saving tmp/x.json +• debug • download_outputs → downloading from: http://localhost:3000/assets/out-0.jpg +• info • download_outputs → downloading to tmp/x_out-0.jpg diff --git a/test/approvals/repli_go_x@again b/test/approvals/repli_go_x@again new file mode 100644 index 0000000..ea60f34 --- /dev/null +++ b/test/approvals/repli_go_x@again @@ -0,0 +1,5 @@ +• debug • repli_go_command → config: tmp/repli.yaml +• debug • repli_go_command → prefix: x +• debug • repli_go_command → outfile: tmp/x.json +• info • repli_go_command → skipping API call, file exists: tmp/x.json +• info • download_outputs → skipping download, file exists: tmp/x_out-0.jpg diff --git a/test/approvals/repli_help b/test/approvals/repli_help index 1b78e69..f52e719 100644 --- a/test/approvals/repli_help +++ b/test/approvals/repli_help @@ -7,7 +7,7 @@ repli - Replicate AI Workspace Tool Commands: new Create a new configuration file from a tmeplate - get Call Replicate using a configuration file and save the result + go Call Replicate using a configuration file and save the result edit Edit the repli file show Show the repli file env Show repli environment information diff --git a/test/spec/get.sh b/test/spec/go.sh similarity index 61% rename from test/spec/get.sh rename to test/spec/go.sh index 173c831..a73b910 100644 --- a/test/spec/get.sh +++ b/test/spec/go.sh @@ -1,22 +1,22 @@ #!/usr/bin/env bash -describe "get" +describe "go" reset_state - approve "repli get --help" - approve "repli get" "repli get@no_repli_yaml" + approve "repli go --help" + approve "repli go" "repli go@no_repli_yaml" add_repli_yaml - approve "repli get x" + approve "repli go x" # ensure the downloaded file matches the source file [[ "$(stat -c%s $output_dir/x_out-0.jpg)" -eq "$(stat -c%s mockserver/mocks/assets/out-0.jpg)" ]] || fail "downloaded file does not match the source file" - approve "repli get x" "repli_get_x@again" + approve "repli go x" "repli_go_x@again" context "error condition" cp 'fixtures/templates/error.yaml' "$output_dir/repli.yaml" - approve "repli get" "repli_get@error" + approve "repli go" "repli_go@error" context "embed and upload files" reset_state - approve "repli get -u fixtures/templates/files.yaml" + approve "repli go -u fixtures/templates/files.yaml"