aspera-cli 4.29.1 → 4.30.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 +4 -4
- checksums.yaml.gz.sig +4 -4
- data/CHANGELOG.md +119 -0
- data/CONTRIBUTING.md +8 -1
- data/README.md +2 -0
- data/TODO.md +4 -5
- data/bin/asession +2 -2
- data/docs/README.md +616 -86
- data/docs/test-mcp-with-ai.md +4 -0
- data/lib/aspera/agent/base.rb +62 -6
- data/lib/aspera/agent/factory.rb +127 -20
- data/lib/aspera/ascp/data_repository.rb +71 -0
- data/lib/aspera/ascp/installation.rb +16 -11
- data/lib/aspera/ascp/log_analyzer/lines.rb +4 -4
- data/lib/aspera/ascp/log_analyzer/log_file.rb +5 -3
- data/lib/aspera/ascp/log_analyzer/records.rb +11 -6
- data/lib/aspera/ascp/log_analyzer.rb +43 -18
- data/lib/aspera/ascp/log_locations.rb +2 -2
- data/lib/aspera/assert.rb +8 -0
- data/lib/aspera/bundle_registry.rb +528 -0
- data/lib/aspera/cli/argument.rb +110 -0
- data/lib/aspera/cli/bool_value.rb +41 -0
- data/lib/aspera/cli/bootstrapper.rb +31 -24
- data/lib/aspera/cli/command/mount.rb +53 -0
- data/lib/aspera/cli/command/registry.rb +434 -0
- data/lib/aspera/cli/command.rb +95 -0
- data/lib/aspera/cli/command_line.rb +91 -91
- data/lib/aspera/cli/complete.rb +22 -0
- data/lib/aspera/cli/completion_actions.rb +28 -26
- data/lib/aspera/cli/context.rb +29 -6
- data/lib/aspera/cli/error.rb +39 -0
- data/lib/aspera/cli/extended_value.rb +25 -4
- data/lib/aspera/cli/formatter.rb +8 -8
- data/lib/aspera/cli/hints.rb +17 -52
- data/lib/aspera/cli/http.rb +17 -12
- data/lib/aspera/cli/mailer.rb +7 -24
- data/lib/aspera/cli/mcp/tool.rb +10 -2
- data/lib/aspera/cli/option/declarator.rb +80 -0
- data/lib/aspera/cli/option/registry.rb +74 -0
- data/lib/aspera/cli/option/source.rb +38 -0
- data/lib/aspera/cli/option/type.rb +37 -0
- data/lib/aspera/cli/option/value.rb +376 -0
- data/lib/aspera/cli/option.rb +78 -0
- data/lib/aspera/cli/options.schema.yaml +28 -783
- data/lib/aspera/cli/parser.rb +73 -41
- data/lib/aspera/cli/plugins/base.rb +122 -42
- data/lib/aspera/cli/plugins/basic_auth.rb +13 -2
- data/lib/aspera/cli/plugins/config.rb +101 -167
- data/lib/aspera/cli/plugins/factory.rb +139 -43
- data/lib/aspera/cli/plugins/mcp.rb +61 -54
- data/lib/aspera/cli/plugins/oauth.rb +19 -6
- data/lib/aspera/cli/poll.rb +14 -20
- data/lib/aspera/cli/preset_actions.rb +11 -3
- data/lib/aspera/cli/preset_manager.rb +16 -6
- data/lib/aspera/cli/result.rb +2 -2
- data/lib/aspera/cli/runner.rb +71 -99
- data/lib/aspera/cli/secret_finder.rb +1 -1
- data/lib/aspera/cli/security.rb +102 -4
- data/lib/aspera/{preview/terminal.rb → cli/terminal_image.rb} +93 -94
- data/lib/aspera/cli/vault_manager.rb +3 -3
- data/lib/aspera/cli/version.rb +1 -1
- data/lib/aspera/cli/wizard.rb +9 -3
- data/lib/aspera/coverage.rb +1 -2
- data/lib/aspera/line_logger.rb +35 -6
- data/lib/aspera/log.rb +3 -2
- data/lib/aspera/oauth/client/base.rb +19 -1
- data/lib/aspera/oauth/client/factory.rb +1 -7
- data/lib/aspera/plugin.schema.yaml +178 -0
- data/lib/aspera/plugins/alee/api.rb +25 -0
- data/lib/aspera/{cli/plugins/alee.rb → plugins/alee/commands.rb} +10 -8
- data/lib/aspera/plugins/alee/plugin.yaml +3 -0
- data/lib/aspera/plugins/aoc/admin_resources.rb +148 -0
- data/lib/aspera/plugins/aoc/api.rb +783 -0
- data/lib/aspera/{cli/plugins/aoc.rb → plugins/aoc/commands.rb} +404 -330
- data/lib/aspera/plugins/aoc/graphql.rb +45 -0
- data/lib/aspera/plugins/aoc/plugin.yaml +31 -0
- data/lib/aspera/{schema → plugins/aoc/schemas}/IBM Aspera on Cloud API-0.2.6-enhanced.yaml +15042 -7076
- data/lib/aspera/plugins/aoc/schemas/options.yaml +47 -0
- data/lib/aspera/plugins/ats/api.rb +51 -0
- data/lib/aspera/{cli/plugins/ats.rb → plugins/ats/commands.rb} +33 -33
- data/lib/aspera/plugins/ats/plugin.yaml +6 -0
- data/lib/aspera/plugins/connect/agent.rb +199 -0
- data/lib/aspera/plugins/connect/plugin.yaml +11 -0
- data/lib/aspera/plugins/connect/schemas/agent_options.yaml +6 -0
- data/lib/aspera/{cli/plugins/console.rb → plugins/console/commands.rb} +41 -33
- data/lib/aspera/plugins/console/plugin.yaml +8 -0
- data/lib/aspera/plugins/cos/api.rb +114 -0
- data/lib/aspera/{cli/plugins/cos.rb → plugins/cos/commands.rb} +19 -16
- data/lib/aspera/plugins/cos/plugin.yaml +9 -0
- data/lib/aspera/plugins/cos/schemas/options.yaml +30 -0
- data/lib/aspera/plugins/desktop/agent.rb +165 -0
- data/lib/aspera/plugins/desktop/plugin.yaml +11 -0
- data/lib/aspera/plugins/desktop/schemas/agent_options.yaml +6 -0
- data/lib/aspera/plugins/direct/agent.rb +518 -0
- data/lib/aspera/plugins/direct/plugin.yaml +11 -0
- data/lib/aspera/plugins/direct/schemas/agent_options.yaml +86 -0
- data/lib/aspera/plugins/faspex4/gateway_options.rb +18 -0
- data/lib/aspera/plugins/faspex4/gw_servlet.rb +122 -0
- data/lib/aspera/plugins/faspex4/plugin.yaml +7 -0
- data/lib/aspera/plugins/faspex4/schemas/options.yaml +57 -0
- data/lib/aspera/plugins/faspex5/api.rb +269 -0
- data/lib/aspera/{cli/plugins/faspex5.rb → plugins/faspex5/commands.rb} +152 -114
- data/lib/aspera/plugins/faspex5/faspex4_post_proc_servlet.rb +241 -0
- data/lib/aspera/plugins/faspex5/plugin.yaml +14 -0
- data/lib/aspera/{schema → plugins/faspex5/schemas}/IBM Aspera Faspex API-5.0-enhanced.yaml +279 -76
- data/lib/aspera/plugins/faspex5/schemas/options.yaml +87 -0
- data/lib/aspera/{cli/plugins/faspio.rb → plugins/faspio/commands.rb} +11 -7
- data/lib/aspera/plugins/faspio/plugin.yaml +8 -0
- data/lib/aspera/{schema → plugins/faspio/schemas}/IBM Aspera faspio Gateway API-1.0.0-enhanced.yaml +4 -2
- data/lib/aspera/plugins/httpgw/agent.rb +126 -0
- data/lib/aspera/plugins/httpgw/api.rb +411 -0
- data/lib/aspera/{cli/plugins/httpgw.rb → plugins/httpgw/commands.rb} +9 -9
- data/lib/aspera/plugins/httpgw/plugin.yaml +12 -0
- data/lib/aspera/plugins/httpgw/schemas/agent_options.yaml +24 -0
- data/lib/aspera/plugins/node/agent.rb +184 -0
- data/lib/aspera/plugins/node/api.rb +699 -0
- data/lib/aspera/{cli/plugins/node.rb → plugins/node/commands.rb} +166 -141
- data/lib/aspera/plugins/node/emulator.rb +774 -0
- data/lib/aspera/plugins/node/plugin.yaml +20 -0
- data/lib/aspera/plugins/node/schemas/agent_options.yaml +20 -0
- data/lib/aspera/plugins/node/schemas/options.yaml +190 -0
- data/lib/aspera/{cli/plugins/orchestrator.rb → plugins/orchestrator/commands.rb} +139 -110
- data/lib/aspera/plugins/orchestrator/plugin.yaml +34 -0
- data/lib/aspera/{schema → plugins/orchestrator/schemas}/IBM Aspera Orchestrator API-v1-enhanced.yaml +486 -16
- data/lib/aspera/plugins/orchestrator/schemas/options.yaml +143 -0
- data/lib/aspera/plugins/orchestrator/workflow_checker.rb +692 -0
- data/lib/aspera/{cli/plugins/preview.rb → plugins/preview/commands.rb} +53 -51
- data/lib/aspera/plugins/preview/file_types.rb +121 -0
- data/lib/aspera/plugins/preview/generator.rb +350 -0
- data/lib/aspera/plugins/preview/plugin.yaml +12 -0
- data/lib/aspera/{preview/options.schema.yaml → plugins/preview/schemas/options.yaml} +1 -1
- data/lib/aspera/plugins/preview/utils.rb +213 -0
- data/lib/aspera/plugins/server/ascmd.rb +374 -0
- data/lib/aspera/{cli/plugins/server.rb → plugins/server/commands.rb} +48 -32
- data/lib/aspera/plugins/server/plugin.yaml +9 -0
- data/lib/aspera/plugins/server/schemas/options.yaml +30 -0
- data/lib/aspera/{cli/plugins/shares.rb → plugins/shares/commands.rb} +29 -21
- data/lib/aspera/plugins/shares/plugin.yaml +10 -0
- data/lib/aspera/plugins/shares/shares_web.rb +97 -0
- data/lib/aspera/plugins/transferd/agent.rb +258 -0
- data/lib/aspera/plugins/transferd/api.rb +180 -0
- data/lib/aspera/plugins/transferd/client.rb +67 -0
- data/lib/aspera/{cli/plugins/transferd.rb → plugins/transferd/commands.rb} +43 -42
- data/lib/aspera/plugins/transferd/config_commands.rb +38 -0
- data/lib/aspera/plugins/transferd/plugin.yaml +27 -0
- data/lib/aspera/plugins/transferd/product.rb +146 -0
- data/lib/aspera/plugins/transferd/schemas/agent_options.yaml +31 -0
- data/lib/aspera/plugins/transferd/schemas/options.yaml +80 -0
- data/lib/aspera/plugins/transferd/service.rb +617 -0
- data/lib/aspera/plugins/xfer/ascp_actions.rb +131 -0
- data/lib/aspera/plugins/xfer/ascp_logs_actions.rb +198 -0
- data/lib/aspera/plugins/xfer/async_transfer_store.rb +131 -0
- data/lib/aspera/plugins/xfer/config_commands.rb +119 -0
- data/lib/aspera/plugins/xfer/helper.rb +19 -0
- data/lib/aspera/plugins/xfer/plugin.yaml +42 -0
- data/lib/aspera/plugins/xfer/schemas/agent_extension.schema.yaml +26 -0
- data/lib/aspera/plugins/xfer/schemas/options.yaml +125 -0
- data/lib/aspera/plugins/xfer/sync_actions.rb +253 -0
- data/lib/aspera/plugins/xfer/transfer_actions.rb +176 -0
- data/lib/aspera/plugins/xfer/transfer_agent.rb +505 -0
- data/lib/aspera/products/cli_v3.rb +34 -0
- data/lib/aspera/products/connect.rb +1 -1
- data/lib/aspera/products/drive.rb +29 -0
- data/lib/aspera/products/hsts.rb +34 -0
- data/lib/aspera/products/transferd.rb +25 -3
- data/lib/aspera/products.rb +54 -0
- data/lib/aspera/prompt.rb +184 -0
- data/lib/aspera/proxy_auto_config.rb +3 -3
- data/lib/aspera/rest/aspera_errors.rb +4 -38
- data/lib/aspera/rest/error_analyzer.rb +6 -2
- data/lib/aspera/rest/list.rb +4 -5
- data/lib/aspera/schema/reader.rb +15 -0
- data/lib/aspera/schema/registry.rb +239 -45
- data/lib/aspera/schema/validator.rb +63 -17
- data/lib/aspera/sealed_hash.rb +4 -0
- data/lib/aspera/secret/hider.rb +159 -24
- data/lib/aspera/secret/reference.rb +8 -0
- data/lib/aspera/secret/resolver.rb +8 -4
- data/lib/aspera/secret/store/base.rb +10 -9
- data/lib/aspera/secret/store/encrypted_hash.rb +6 -6
- data/lib/aspera/secret/store/hashicorp_vault.rb +3 -3
- data/lib/aspera/secret/store/keeper.rb +2 -2
- data/lib/aspera/secret/store/macos_security.rb +2 -3
- data/lib/aspera/secret/store/one_password_api.rb +2 -2
- data/lib/aspera/secret/store/one_password_cli.rb +3 -3
- data/lib/aspera/secret/store/secret_service.rb +2 -2
- data/lib/aspera/ssl.rb +3 -3
- data/lib/aspera/standard_input.rb +20 -0
- data/lib/aspera/{schema → sync}/async_tables.yaml +1 -1
- data/lib/aspera/sync/database.rb +7 -0
- data/lib/aspera/sync/log_parser.rb +138 -0
- data/lib/aspera/sync/operations.rb +59 -34
- data/lib/aspera/transfer/command_line_builder.rb +248 -0
- data/lib/aspera/transfer/command_line_converter.rb +37 -0
- data/lib/aspera/transfer/faux_file.rb +2 -2
- data/lib/aspera/transfer/parameters.rb +9 -10
- data/lib/aspera/transfer/spec.rb +28 -1
- data/lib/aspera/transfer/spec.schema.yaml +30 -5
- data/lib/aspera/units/decimal.rb +1 -1
- data/lib/aspera/units/timestamp.rb +84 -0
- data/lib/aspera/uri_reader.rb +2 -2
- data/lib/aspera/web_auth/paste.rb +2 -2
- data/lib/aspera/web_server_simple.rb +10 -4
- data.tar.gz.sig +0 -0
- metadata +137 -80
- metadata.gz.sig +0 -0
- data/lib/aspera/agent/connect.rb +0 -188
- data/lib/aspera/agent/desktop.rb +0 -154
- data/lib/aspera/agent/direct.rb +0 -496
- data/lib/aspera/agent/httpgw.rb +0 -100
- data/lib/aspera/agent/node.rb +0 -166
- data/lib/aspera/agent/transferd.rb +0 -341
- data/lib/aspera/api/alee.rb +0 -19
- data/lib/aspera/api/aoc.rb +0 -776
- data/lib/aspera/api/ats.rb +0 -49
- data/lib/aspera/api/cos_node.rb +0 -107
- data/lib/aspera/api/faspex.rb +0 -258
- data/lib/aspera/api/httpgw.rb +0 -409
- data/lib/aspera/api/node.rb +0 -684
- data/lib/aspera/ascmd.rb +0 -248
- data/lib/aspera/cli/ascp_actions.rb +0 -113
- data/lib/aspera/cli/ascp_logs_actions.rb +0 -188
- data/lib/aspera/cli/async_transfer_store.rb +0 -129
- data/lib/aspera/cli/command_registry.rb +0 -371
- data/lib/aspera/cli/command_spec.rb +0 -273
- data/lib/aspera/cli/option_declarator.rb +0 -74
- data/lib/aspera/cli/option_registry.rb +0 -72
- data/lib/aspera/cli/option_types.rb +0 -120
- data/lib/aspera/cli/option_value.rb +0 -345
- data/lib/aspera/cli/prompt.rb +0 -186
- data/lib/aspera/cli/sync_actions.rb +0 -181
- data/lib/aspera/cli/transfer_actions.rb +0 -98
- data/lib/aspera/cli/transfer_agent.rb +0 -348
- data/lib/aspera/command_line_builder.rb +0 -244
- data/lib/aspera/command_line_converter.rb +0 -35
- data/lib/aspera/data_repository.rb +0 -69
- data/lib/aspera/faspex_gw.rb +0 -172
- data/lib/aspera/faspex_postproc.rb +0 -237
- data/lib/aspera/graphql.rb +0 -41
- data/lib/aspera/node_emulator.rb +0 -758
- data/lib/aspera/oauth/client/shares_web.rb +0 -94
- data/lib/aspera/orchestrator_workflow_checker.rb +0 -688
- data/lib/aspera/preview/file_types.rb +0 -119
- data/lib/aspera/preview/generator.rb +0 -345
- data/lib/aspera/preview/utils.rb +0 -211
- data/lib/aspera/products/other.rb +0 -92
- data/lib/aspera/products/transferd_service.rb +0 -610
- /data/lib/aspera/{data → ascp/data}/1 +0 -0
- /data/lib/aspera/{data → ascp/data}/2 +0 -0
- /data/lib/aspera/{data → ascp/data}/3 +0 -0
- /data/lib/aspera/{data → ascp/data}/4 +0 -0
- /data/lib/aspera/{data → ascp/data}/5 +0 -0
- /data/lib/aspera/{data → ascp/data}/6 +0 -0
- /data/lib/aspera/{api → plugins/aoc}/queries/bss_subscription_account.graphql +0 -0
- /data/lib/aspera/{api → plugins/aoc}/queries/bss_subscription_usage.graphql +0 -0
- /data/lib/aspera/{schema → plugins/aoc/schemas}/IBM Aspera on Cloud Automation API-1.0.5-enhanced.yaml +0 -0
- /data/lib/aspera/{schema → plugins/console/schemas}/IBM Aspera Console-enhanced.yaml +0 -0
- /data/lib/aspera/{schema → plugins/node/schemas}/IBM Aspera Node API-4.4.6.yaml +0 -0
- /data/lib/aspera/{preview → plugins/preview}/image_error.png +0 -0
- /data/lib/aspera/{preview → plugins/preview}/video_error.png +0 -0
- /data/lib/aspera/{schema → plugins/shares/schemas}/IBM_Aspera_Shares.yaml +0 -0
- /data/lib/{transferd_pb.rb → aspera/plugins/transferd/grpc/transferd_pb.rb} +0 -0
- /data/lib/{transferd_services_pb.rb → aspera/plugins/transferd/grpc/transferd_services_pb.rb} +0 -0
- /data/lib/aspera/{schema → plugins/transferd/schemas}/transferd-config.schema.json +0 -0
data/docs/README.md
CHANGED
|
@@ -16,7 +16,7 @@ DO NOT EDIT: THIS FILE IS GENERATED, edit docs/README.erb.md.
|
|
|
16
16
|
<!-- gfm2pdf
|
|
17
17
|
common:
|
|
18
18
|
metadata:
|
|
19
|
-
subtitle: "ascli 4.
|
|
19
|
+
subtitle: "ascli 4.30.0"
|
|
20
20
|
author: "Laurent Martin"
|
|
21
21
|
-->
|
|
22
22
|
|
|
@@ -62,7 +62,7 @@ Designed for automation, scripting, and integration scenarios, `ascli` enables o
|
|
|
62
62
|
: Secrets kept in a vault (encrypted file, HashiCorp Vault, Keeper, 1Password, macOS keychain, Linux Secret Service), never in scripts.
|
|
63
63
|
|
|
64
64
|
**AI Assistants and Agents**
|
|
65
|
-
: AI assistants operate IBM Aspera products with `ascli`, in a shell (with `llms.txt` or the agent skill) or through the built-in MCP server, with restrictions and without seeing secrets.
|
|
65
|
+
: AI assistants and agents (IBM Bob, Claude, GitHub Copilot, Cursor, agents built with Langflow) operate IBM Aspera products with `ascli`, in a shell (with `llms.txt` or the agent skill) or through the built-in MCP server, with restrictions and without seeing secrets.
|
|
66
66
|
|
|
67
67
|
**Developer Friendly**
|
|
68
68
|
: Comprehensive logging, debugging capabilities, and API exploration tools for development and troubleshooting.
|
|
@@ -94,6 +94,7 @@ This manual is organized into the following sections:
|
|
|
94
94
|
| ---- | ----------- | --- |
|
|
95
95
|
| Script or schedule transfers, packages, file management or administration of Aspera products (shell, `cron`, CI/CD) | `ascli` | One tool for all products, presets and vault per environment, structured output, automatic resume |
|
|
96
96
|
| Let an AI assistant or agent operate Aspera products | `ascli`: in a shell, or its MCP server | Same commands as people, restrictions, secrets never shown (see [Leveraging AI Assistance](#leveraging-ai-assistance)) |
|
|
97
|
+
| Give an AI agent built with Langflow (or another agent builder) access to Aspera products | `ascli` MCP server | No code: component **MCP Tools**, one tool for all Aspera products (see [Langflow](#langflow)) |
|
|
97
98
|
| Administer, troubleshoot, or analyze `ascp` logs, interactively | `ascli` | Commands for every product, `ascp` log diagnostics |
|
|
98
99
|
| Learn or test an Aspera REST API | `ascli` | Shows the API calls (see [Logging, Debugging](#logging-debugging)) |
|
|
99
100
|
| Simple transfer with an HSTS, where nothing else can be installed | `ascp` | Included with every Aspera transfer product (see [`ascli` or `ascp`?](#ascli-or-ascp)) |
|
|
@@ -195,7 +196,7 @@ This section walks you through your first interaction with `ascli` on Linux.
|
|
|
195
196
|
|
|
196
197
|
```shell
|
|
197
198
|
mkdir -p $HOME/bin
|
|
198
|
-
tar -C $HOME/bin -zxvf ascli-4.
|
|
199
|
+
tar -C $HOME/bin -zxvf ascli-4.30.0-linux-x86_64.tgz
|
|
199
200
|
export PATH=$PATH:$HOME/bin
|
|
200
201
|
```
|
|
201
202
|
|
|
@@ -209,7 +210,7 @@ ascli -v
|
|
|
209
210
|
```
|
|
210
211
|
|
|
211
212
|
```text
|
|
212
|
-
4.
|
|
213
|
+
4.30.0
|
|
213
214
|
```
|
|
214
215
|
|
|
215
216
|
- Install the Aspera transfer runtime (tested version), as it is not included in the `ascli` package:
|
|
@@ -317,7 +318,7 @@ There are three ways, the first one is the simplest:
|
|
|
317
318
|
/plugin install ascli@aspera-cli
|
|
318
319
|
```
|
|
319
320
|
|
|
320
|
-
- **The AI executes commands through MCP**: for an AI client without a shell, start the [MCP server](#plugin-mcp-model-context-protocol-server) and register it in the AI client.
|
|
321
|
+
- **The AI executes commands through MCP**: for an AI client without a shell, or an agent built with [Langflow](#langflow), start the [MCP server](#plugin-mcp-model-context-protocol-server) and register it in the AI client.
|
|
321
322
|
The AI discovers commands and their arguments by itself, and executes them.
|
|
322
323
|
By default, the server restricts what the AI can do (see [Security](#security)), and the AI never sees secrets.
|
|
323
324
|
|
|
@@ -934,18 +935,21 @@ The user installs the gem with `HighSecurity` or `MediumSecurity`: this will suc
|
|
|
934
935
|
gem install -P MediumSecurity aspera-cli
|
|
935
936
|
```
|
|
936
937
|
|
|
937
|
-
#### Installing
|
|
938
|
+
#### Installing the development version of the gem
|
|
938
939
|
|
|
939
|
-
|
|
940
|
+
The development version of the gem is built from the branch `main` of the GitHub repository, every day it changes, and attached to the pre-release [`nightly`](https://github.com/IBM/aspera-cli/releases/tag/nightly).
|
|
941
|
+
It is not a release, and it is not signed.
|
|
942
|
+
|
|
943
|
+
Its version is the version in development followed by the number of commits of `main`, e.g. `4.30.0.pre.5592`: the build of a newer commit has a higher number, and the release (`4.30.0`) is higher than all.
|
|
940
944
|
|
|
941
945
|
On Linux/macOS, install in a terminal:
|
|
942
946
|
|
|
943
947
|
```shell
|
|
944
|
-
curl -sLo aspera-cli-
|
|
945
|
-
gem install aspera-cli-
|
|
948
|
+
curl -sLo aspera-cli-nightly.gem https://github.com/IBM/aspera-cli/releases/download/nightly/aspera-cli-nightly.gem
|
|
949
|
+
gem install aspera-cli-nightly.gem
|
|
946
950
|
```
|
|
947
951
|
|
|
948
|
-
On Windows, download the file `aspera-cli-
|
|
952
|
+
On Windows, download the file `aspera-cli-nightly.gem` from the link, then install it with `gem install aspera-cli-nightly.gem`.
|
|
949
953
|
|
|
950
954
|
### FASP Protocol: `ascp`
|
|
951
955
|
|
|
@@ -1089,11 +1093,11 @@ Alternatively, the necessary gems can be packaged into a `tar.gz` archive as fol
|
|
|
1089
1093
|
|
|
1090
1094
|
```shell
|
|
1091
1095
|
mkdir temp_folder
|
|
1092
|
-
gem install aspera-cli:4.
|
|
1096
|
+
gem install aspera-cli:4.30.0 --no-document --install-dir temp_folder
|
|
1093
1097
|
find temp_folder
|
|
1094
|
-
mv temp_folder/cache aspera-cli-4.
|
|
1098
|
+
mv temp_folder/cache aspera-cli-4.30.0-gems
|
|
1095
1099
|
rm -fr temp_folder
|
|
1096
|
-
tar zcvf aspera-cli-4.
|
|
1100
|
+
tar zcvf aspera-cli-4.30.0-gems.tgz aspera-cli-4.30.0-gems
|
|
1097
1101
|
```
|
|
1098
1102
|
|
|
1099
1103
|
#### Unix-like: Alternative installation using `rvm`
|
|
@@ -1229,7 +1233,7 @@ ascli -v
|
|
|
1229
1233
|
```
|
|
1230
1234
|
|
|
1231
1235
|
```text
|
|
1232
|
-
4.
|
|
1236
|
+
4.30.0
|
|
1233
1237
|
```
|
|
1234
1238
|
|
|
1235
1239
|
To persist the configuration on the host, specify your user's configuration folder as a volume for the container.
|
|
@@ -2521,7 +2525,8 @@ The following decoders are supported:
|
|
|
2521
2525
|
|----------|----------|----------|------------------------------------------------------------------------------------------|
|
|
2522
2526
|
| `base64` | `String` | `String` | Decode a base64 encoded string. |
|
|
2523
2527
|
| `csvt` | `String` | `Array` | Decode a titled CSV value. |
|
|
2524
|
-
| `
|
|
2528
|
+
| `date` | `String` | `String` | Date and time in UTC, ISO 8601 (e.g. `2026-11-27T09:00:00Z`): an absolute date, or a keyword with an optional duration, e.g. `now-24h`. See [Dates](#dates). |
|
|
2529
|
+
| `env` | `String` | `String` | Read from the named environment variable, an error if it is not set. For example, `--password=@env:MYPASSVAR` |
|
|
2525
2530
|
| `file` | `String` | `String` | Read value from specified file (prefix `~/` is replaced with the user's home folder). For example, `--key=@file:~/.ssh/mykey` |
|
|
2526
2531
|
| `json` | `String` | Any | Decode JSON values. Convenient to provide complex structures. |
|
|
2527
2532
|
| `lines` | `String` | `Array` | Split a string in multiple lines and return an `Array`. |
|
|
@@ -2534,7 +2539,7 @@ The following decoders are supported:
|
|
|
2534
2539
|
| `ruby` | `String` | Any | Execute specified Ruby code. |
|
|
2535
2540
|
| `s` | Any | `String` | Converts argument to `String`. |
|
|
2536
2541
|
| `secret` | `String` | `String` | Ask password interactively: on terminal (hides input), or on a web page if option `ui` is `graphical`. Argument is the prompt. |
|
|
2537
|
-
| `stdin` | `String` | `String` | Read from stdin
|
|
2542
|
+
| `stdin` | `String` | `String` | Read from stdin. Argument: `<empty>` (text), `bin` (binary), `chomp` (text without the last end of line), or `stream` (read by a command that reads a file, see [Standard Input](#standard-input)). |
|
|
2538
2543
|
| `uri` | `String` | `String` | Read value from specified URL. Supported schemes: `http:`, `https:`, `data:`, `file:`. For example, `--fpac=@uri:http://serv/f.pac` or `--key=@uri:file:/path/to/key.pem` |
|
|
2539
2544
|
| `val` | `String` | `String` | Prevent decoding by the decoders on the right. For example, `--key=@val:@file:foo` sets the option `key` to value `@file:foo`. |
|
|
2540
2545
|
| `vault` | `String` | `String` | Read a secret from the [Secret Vault](#secret-vault): `<label>.<field>`, or a [reference](#vault-secret-references) `//<store>/<path>[?<options>][#<field>]`. For example, `--password=@vault:my_label.password` |
|
|
@@ -2567,9 +2572,55 @@ ascli config echo @json:@extend:@file:<PATH>
|
|
|
2567
2572
|
|
|
2568
2573
|
In the file, an embedded value without closing `@` (`"@vault:my_label.username"`) is not evaluated: it stays a string, and `@json:@file:<PATH>` does not evaluate values inside the JSON.
|
|
2569
2574
|
|
|
2575
|
+
##### Dates
|
|
2576
|
+
|
|
2577
|
+
`@date:` gives a date and time in UTC, in the ISO 8601 format accepted by most APIs, e.g. `2026-11-27T09:00:00Z`.
|
|
2578
|
+
Its argument is either:
|
|
2579
|
+
|
|
2580
|
+
- An absolute date, in a format of Ruby's `Time.parse`, e.g. `2026-11-27 10:00:00`, `2026-11-27`, `2026-11-27T10:00:00+01:00`, `Nov 27 10:00`, or `10:00` (today).
|
|
2581
|
+
It is in local time, unless a time zone is given.
|
|
2582
|
+
- A keyword: `now`, or `today`, `yesterday`, `tomorrow` (at midnight, local time), optionally followed by `-` (in the past) or `+` (in the future) and a duration, as in the date math of Elasticsearch or Grafana.
|
|
2583
|
+
A duration is a number of seconds, or a value with units `w`, `d`, `h`, `m`, `s`, `ms`, `us` (e.g. `2w`, `1h30m`), or `1d 02:00:00`.
|
|
2584
|
+
|
|
2585
|
+
| Value | Date |
|
|
2586
|
+
|-------|------|
|
|
2587
|
+
| `now` | Current time |
|
|
2588
|
+
| `now-24h` | 24 hours ago |
|
|
2589
|
+
| `now+1w` | In one week |
|
|
2590
|
+
| `today+9h` | Today at 9:00 |
|
|
2591
|
+
| `yesterday` | Yesterday at midnight |
|
|
2592
|
+
|
|
2593
|
+
A duration alone, without a keyword (e.g. `24h`, `-24h` or `3600`), is refused: use `now-24h`.
|
|
2594
|
+
A number of 8 digits or more is a date, in the ISO 8601 basic format, e.g. `20261127`.
|
|
2595
|
+
|
|
2596
|
+
Inside a structure, use `@extend:`, for example a query of users not logged in for 2 years:
|
|
2597
|
+
|
|
2598
|
+
```shell
|
|
2599
|
+
ascli config echo @json:@extend:'{"q":"last_login_at:<@date:now-730d@"}'
|
|
2600
|
+
```
|
|
2601
|
+
|
|
2602
|
+
```json
|
|
2603
|
+
{"q":"last_login_at:<2024-11-27T09:00:00Z"}
|
|
2604
|
+
```
|
|
2605
|
+
|
|
2570
2606
|
Option `parser` allows definition of a default parser when the positional parameter or option expects a `Hash` or `Array`.
|
|
2571
2607
|
For example, with `--parser=json`, the parameter `{}` will be parsed as an empty JSON Hash, even without prefix `@json:`.
|
|
2572
2608
|
|
|
2609
|
+
##### Standard Input
|
|
2610
|
+
|
|
2611
|
+
`@stdin:` reads the standard input when the value is evaluated, for any option or argument, and the content can be decoded, for example `@json:@stdin:` or `@lines:@stdin:`.
|
|
2612
|
+
|
|
2613
|
+
A command that reads a file (`config ascp logs`, `sync logs`) can read the standard input instead: give the argument `-`, short for `@stdin:stream`.
|
|
2614
|
+
The command reads it as it reads a file, for example a log compressed with gzip is detected:
|
|
2615
|
+
|
|
2616
|
+
```shell
|
|
2617
|
+
zcat /var/log/aspera.log-2026*.gz | ascli config ascp logs summary -
|
|
2618
|
+
```
|
|
2619
|
+
|
|
2620
|
+
`@stdin:stream` is refused by other options and arguments, and with a decoder (e.g. `@json:@stdin:stream`): use `@stdin:`.
|
|
2621
|
+
For other commands, `-` is a file name.
|
|
2622
|
+
Both are refused in [MCP server](#plugin-mcp-model-context-protocol-server) mode, where the standard input is the stream of the protocol.
|
|
2623
|
+
|
|
2573
2624
|
#### Syntax Equivalences
|
|
2574
2625
|
|
|
2575
2626
|
There are four main ways to express a structured value (for example, a `Hash` with two keys).
|
|
@@ -2894,20 +2945,37 @@ With level `medium`, the real path of the file is checked: a symbolic link leadi
|
|
|
2894
2945
|
|
|
2895
2946
|
`@zlib:` is refused with levels `medium` and `high`: a small value can decompress to gigabytes and exhaust the memory of the system.
|
|
2896
2947
|
|
|
2897
|
-
With levels `medium` and `high`, files are written only in `writable_paths` (none by default): downloaded files (`config download`, and transfers that receive files), because a file written where the client chooses could replace a file that is used later, for example a plugin or a shell startup file.
|
|
2948
|
+
With levels `medium` and `high`, files are written only in `writable_paths` (none by default): downloaded files (`config download`, and, at level `medium`, transfers that receive files on the local host), because a file written where the client chooses could replace a file that is used later, for example a plugin or a shell startup file.
|
|
2898
2949
|
The real path of the folder is checked: neither `..` nor a symbolic link leading outside of `writable_paths` is accepted.
|
|
2899
2950
|
|
|
2951
|
+
A command that reads or writes a local path given by the client checks it against the security level, like `@file:`: the content read (for example `config ascp logs`, `preview show`, `orchestrator workflows import` and `check_import`, `config sync admin`), or the file written (for example `config genkey`, `config download`).
|
|
2952
|
+
A path read is refused at level `high`, and at level `medium` it must be in `allowed_paths`: a path that does not exist and a path outside those give the same error, so the existence of a file is not revealed.
|
|
2953
|
+
A path written must be in `writable_paths`, at levels `medium` and `high`.
|
|
2954
|
+
At level `medium`, a file or folder found in a folder given to a command (for example `config ascp logs <folder>`) is skipped when its real path is outside of `allowed_paths` (a symbolic link), and the database of `sync admin` is checked also when its folder is given in `sync_info` (`local_db_dir`).
|
|
2955
|
+
The argument `-` is the standard input (`@stdin:stream`) only for `config ascp logs` and `sync logs` (refused in MCP server mode, as `@stdin:`, see [Standard Input](#standard-input)); for other commands, `-` is a file name, checked as any path.
|
|
2956
|
+
|
|
2900
2957
|
> [!NOTE]
|
|
2901
|
-
>
|
|
2902
|
-
>
|
|
2903
|
-
> A command that reads a local file to display something about its content (for example `orchestrator workflows check_import`) reads it as `@file:`.
|
|
2958
|
+
> A transfer that uses a remote agent (`node`, or `transferd` attached to a remote daemon) sends and receives the files on the host of the agent, not the local host: those paths are not local, and are not restricted by the security level.
|
|
2959
|
+
> At level `high`, a transfer that would run on the local host is refused (see below).
|
|
2904
2960
|
|
|
2905
2961
|
The same applies to `@file:<path>` in the parameters of stores of option `vault`, and in option `vault_password` (for example, `token`), although the file is read when used, not when the option is evaluated.
|
|
2906
2962
|
|
|
2907
2963
|
A secret (read by `@secret:`, `@vault:`, or `@preset:`) is hidden in results by its value: processed by another extended value, it could be revealed (for example, split by `@list:@vault:...`, or with a short value in a text by `@extend:`).
|
|
2908
|
-
With levels `medium` and `high`, a secret must be the whole value of an option or argument, for example `@preset:<PRESET_NAME>.password` for option `password
|
|
2964
|
+
With levels `medium` and `high`, a secret must be the whole value of an option or argument, for example `@preset:<PRESET_NAME>.password` for option `password`.
|
|
2909
2965
|
|
|
2910
|
-
|
|
2966
|
+
At levels `medium` and `high`, a secret of the configuration of the server is sent only to a URL of its configuration: a secret (option `password`, `client_secret`, `private_key`, `passphrase`) read from a preset or from the vault, or set in the environment, is refused when option `url` is neither read from the configuration nor set in the environment.
|
|
2967
|
+
The value is checked, whatever the way it is given: `--preset=<PRESET_NAME>` with another `--url`, a reference to the secret (`@preset:<PRESET_NAME>.password` or `@vault:...`) as value of option `password` with another `--url`, or a preset given as a `Hash` (`--preset=@json:...`) that refers to a secret of the configuration.
|
|
2968
|
+
The same URL as the one of the preset, given on the command line, is accepted, and so is a secret given by the client itself.
|
|
2969
|
+
The same applies to the keys of an option that is a `Hash` with a key `url` and a secret (`password`, `client_secret`, `private_key`, `passphrase`, `api_key`), for example the parameters of agent `node` of option `transfer` (`--transfer=@preset:<PRESET_NAME> --transfer.url=...` is refused).
|
|
2970
|
+
And the credentials of the transfer spec of a command (`remote_password`, `token`, `ssh_private_key`, `ssh_private_key_passphrase`), for example the password of a `server` preset or a token of the application, are not sent to another `remote_host` given in option `ts`, unless that host is in the configuration (for example, option `ts` in a preset), or the credentials are given in `ts` with it.
|
|
2971
|
+
This prevents a client that drives `ascli` (for example through the MCP server) from redirecting the saved credentials of the server to a host that it chooses.
|
|
2972
|
+
A secret of a preset sent to the URL of another preset of the configuration is not refused.
|
|
2973
|
+
|
|
2974
|
+
At levels `medium` and `high`, the configuration is read-only: commands that change presets or the vault are refused (see the table below), and the configuration file is not saved when a command changed it.
|
|
2975
|
+
So its presets are the ones of the operator: a client cannot add its own URL to a preset that holds a secret, or copy a secret to a preset of its own.
|
|
2976
|
+
Change the configuration at level `low`, for example on the command line, before starting the MCP server.
|
|
2977
|
+
|
|
2978
|
+
Features that execute code (own, or downloaded), load code, write a file chosen by the client, or change the configuration, are available only at level `low`:
|
|
2911
2979
|
|
|
2912
2980
|
| Feature | Why |
|
|
2913
2981
|
|---|---|
|
|
@@ -2917,15 +2985,27 @@ Features that execute code (own, or downloaded), load code, or write a file chos
|
|
|
2917
2985
|
| Options `sdk_url` and `locations_url` | The SDK, including `ascp`, is downloaded from this location, then executed |
|
|
2918
2986
|
| Option `out`, key `file` (and `output`), option `pid_file` | Write (or truncate, or delete) a file chosen by the client |
|
|
2919
2987
|
| Option `home` | Configuration folder: its presets, and its folder `plugins` (Ruby code) are used |
|
|
2988
|
+
| Option `config_file` | Configuration file: its presets are used, and a command that changes presets writes it |
|
|
2989
|
+
| Commands that change the configuration: `config preset set`, `delete`, `unset`, `initialize`, `update`, `ask`, `secure`, `config wizard`, `config initdemo`, `config vault create`, `delete`, `import`, `password` | The presets and the vault are the ones of the operator: changed by a client, a secret of the server could be sent to a host of the client |
|
|
2990
|
+
| Options `vault` and `vault_password` | Secret stores of `@vault:`: a file store is created and written at the path given, other stores connect to the server given |
|
|
2920
2991
|
| Option `plugin_folder` | Plugins are Ruby code |
|
|
2921
|
-
| Plugins of the folder `plugins` of the configuration folder
|
|
2992
|
+
| Plugins of the folders of option `plugin_folder` (by default, folder `plugins` of the configuration folder) | Ruby code: not loaded at other levels, also if the file was there before |
|
|
2922
2993
|
| Command `config plugins create` | Creates Ruby code, loaded as a plugin |
|
|
2923
2994
|
| Command `faspex5 postprocessing` | Executes scripts, or Ruby code |
|
|
2995
|
+
| Commands `node emulator` (`simulator`), `aoc gateway`, `faspex5 gateway` | Start a local server that listens on the network, serves a local folder, or accepts transfers |
|
|
2996
|
+
| Options `insecure`, `ignore_certificate`, `cert_stores`, `http_proxy`, and keys `ca_file`, `verify_mode`, `ssl_options` of option `http_options` | Disable or redirect the validation of a server certificate, or route through a proxy: a client could intercept the connections (and the credentials) of the server |
|
|
2997
|
+
| Transfer parameters `ascp_args` (agent `direct`) and `ssh_args` (transfer spec) | Raw arguments to `ascp` or the external `ssh`: can start a local program (for example an `ssh` `ProxyCommand`) |
|
|
2924
2998
|
|
|
2925
|
-
At other levels, an option is refused
|
|
2999
|
+
At other levels, an option is refused when the client sets it (command line, or preset given as a `Hash`, for example `--preset=@json:...`), and a command is not listed by `config commands`.
|
|
2926
3000
|
Values from the environment of the process (for example `ASCLI_HOME`) are not restricted: they are set by the one who starts the process, not by a client.
|
|
3001
|
+
Neither are the values of a preset read from the configuration (a default preset, or `--preset=<PRESET_NAME>`), as the configuration is read-only at these levels: for example, option `ignore_certificate` in the default preset of the server.
|
|
3002
|
+
Extended values in a preset are restricted as on the command line (for example `@ruby:`).
|
|
2927
3003
|
A sub-option of an option is restricted in the same way: it is marked `x-security: low` in the schema of the option (for example, `file` of option `out`), and refused when given, by dot notation (`--out.file=...`) or in a `Hash`.
|
|
2928
|
-
|
|
3004
|
+
|
|
3005
|
+
At level `high`, a transfer uses an agent that runs on a host that the user controls, not the local host: agent `node`, or agent `transferd` attached to a remote daemon (parameter `url` of a daemon on another host).
|
|
3006
|
+
An agent that runs on the local host is refused: `direct` (local `ascp`), a local `transferd` daemon (started by `ascli`, or on a loopback address), `connect` and `desktop` (local applications), and `httpgw` (the files pass through the process).
|
|
3007
|
+
These agents read and write local files and run local programs, so they are available at levels `low` and `medium` only.
|
|
3008
|
+
The default agent is `direct`, so a transfer at level `high` without an agent is refused: set option `transfer` to a remote agent, for example `--transfer.agent=node`.
|
|
2929
3009
|
|
|
2930
3010
|
Options are evaluated in the order of the command line: place `--security` before options that use extended values.
|
|
2931
3011
|
|
|
@@ -2977,6 +3057,7 @@ C:\Users\Kenji\.aspera\ascli
|
|
|
2977
3057
|
```
|
|
2978
3058
|
|
|
2979
3059
|
When OAuth is used (AoC, Faspex 5), `ascli` keeps a cache of generated bearer tokens in folder `persist_store` located in the configuration folder by default.
|
|
3060
|
+
A token is cached for each server, user, API client (`client_id`) and scope.
|
|
2980
3061
|
Option `cache_tokens` (**yes**/no) allows controlling if OAuth tokens are cached on file system, or generated for each request.
|
|
2981
3062
|
The command `config tokens flush` clears that cache.
|
|
2982
3063
|
Tokens are kept on disk for a maximum of 30 minutes and garbage collected after that.
|
|
@@ -3366,6 +3447,7 @@ options server
|
|
|
3366
3447
|
options server --select=@json:'{"option":"--display"}' --fields=replacement
|
|
3367
3448
|
plugins create my_command .
|
|
3368
3449
|
plugins list
|
|
3450
|
+
plugins show node
|
|
3369
3451
|
preset delete conf_name
|
|
3370
3452
|
preset list
|
|
3371
3453
|
preset overview
|
|
@@ -3659,6 +3741,8 @@ Instead, they shall be hidden (logs, output) or encrypted (configuration).
|
|
|
3659
3741
|
Terminal output (command result) secret removal is controlled by option `--out.secrets` (default: `no`).
|
|
3660
3742
|
Log secret removal is controlled by option `log_secrets` (default: `no`).
|
|
3661
3743
|
Secrets are identified by the name of their field (for example, `password`, `token`), and by their value: values of secret options and of presets, of [Extended Values](#extended-value-syntax) `@secret:` and `@vault:`, tokens obtained or generated, and secrets of transfer specs are hidden wherever they appear, also in field names.
|
|
3744
|
+
In logs, they are also hidden in the bodies of HTTP requests and responses (JSON, form, URL query), and so are the values of cookies at level `trace2`.
|
|
3745
|
+
A value of a URL query that is a structure in base64 JSON containing a secret, such as the context of a Faspex 5 public link, is hidden in logs, and in command output when it is given in an option.
|
|
3662
3746
|
In presets, a secret made of digits only (for example, a password not quoted in the YAML file) is converted to a string, so that it is identified as a secret.
|
|
3663
3747
|
A value shorter than 8 characters is hidden only when it is the whole value, not inside a text, except in responses of `mcp server`, where it is also hidden as a word (not next to a letter or digit).
|
|
3664
3748
|
Mandatory command line options can be requested interactively (for example, password) using option `interactive`.
|
|
@@ -4522,6 +4606,7 @@ HTTP connection parameters (not `ascp` WSS) can be adjusted using option `http_o
|
|
|
4522
4606
|
|
|
4523
4607
|
| Field | Type | Description |
|
|
4524
4608
|
| ----------------------- | -------------- | -------------------------------------------------------------------------------- |
|
|
4609
|
+
| `ca_file` | `String` | File with the CA certificates that verify the certificate of the server (HTTPS). (SSL) |
|
|
4525
4610
|
| `download_partial_suffix` | `String` | File suffix appended to the target filename while a download is in progress. (Rest)<br/>Default: `.http_partial`. |
|
|
4526
4611
|
| `jwt_accepted_offset_sec` | `String, Number` | Tolerance of clock difference with the server: a generated JWT is valid since this duration in the past (`nbf`). (OAuth) A duration, e.g. `30s`, `12h`, `1d`, `1h 30m`, a plain number is seconds.<br/>Default: `300`. |
|
|
4527
4612
|
| `jwt_expiry_offset_sec` | `String, Number` | Validity of a generated JWT, used to request a token. (OAuth) A duration, e.g. `30s`, `12h`, `1d`, `1h 30m`, a plain number is seconds.<br/>Default: `3600`. |
|
|
@@ -4538,6 +4623,7 @@ HTTP connection parameters (not `ascp` WSS) can be adjusted using option `http_o
|
|
|
4538
4623
|
| `token_refresh_max_age` | `String, Number` | Age in seconds (since it was obtained) above which the token is proactively refreshed, `0` for no limit. E.g. keeps a session alive when the refresh token expires at the same time as the token (Shares). (OAuth) A duration, e.g. `30s`, `12h`, `1d`, `1h 30m`, a plain number is seconds.<br/>Default: `0`. |
|
|
4539
4624
|
| `token_refresh_threshold` | `String, Number` | Remaining token lifetime in seconds below which the token is proactively refreshed. (OAuth) A duration, e.g. `30s`, `12h`, `1d`, `1h 30m`, a plain number is seconds.<br/>Default: `120`. |
|
|
4540
4625
|
| `user_agent` | `String` | Value sent in the `User-Agent` HTTP request header. (Rest) |
|
|
4626
|
+
| `verify_mode` | `String` | OpenSSL verify mode of the server certificate, e.g. `none` to disable validation. (SSL) |
|
|
4541
4627
|
| `write_timeout` | `String, Number` | Maximum time in seconds to wait for data to be written to the server. (Net::HTTP) A duration, e.g. `30s`, `12h`, `1d`, `1h 30m`, a plain number is seconds.<br/>Default: `60`. |
|
|
4542
4628
|
|
|
4543
4629
|
Time values are durations: a number of **seconds** (`Integer` or `Float`), or a `String`, e.g. `30s`, `12h`, `1d`, `1h 30m`, `1d 02:00:00`.
|
|
@@ -4858,7 +4944,7 @@ ascli server download /remote/big-file.bin --to-folder=/tmp \
|
|
|
4858
4944
|
# Poll status later
|
|
4859
4945
|
ascli config agents jobs status <job_id>
|
|
4860
4946
|
|
|
4861
|
-
# List all pending/completed async transfers
|
|
4947
|
+
# List all pending/completed async transfers (status of jobs not ended is queried)
|
|
4862
4948
|
ascli config agents jobs list
|
|
4863
4949
|
|
|
4864
4950
|
# Remove completed/failed entries
|
|
@@ -4875,15 +4961,30 @@ All transfer agents support asynchronous mode:
|
|
|
4875
4961
|
| `desktop` | JSON-RPC `get_transfer` (auto-discovered URL) | Yes |
|
|
4876
4962
|
| `node` | REST `ops/transfers/{id}` | Yes |
|
|
4877
4963
|
| `connect` | REST `transfers/info/{id}` (auto-discovered URL) | Yes |
|
|
4878
|
-
| `transferd` | gRPC `
|
|
4879
|
-
| `direct` | In-process thread state (re-queryable while process lives, e.g. MCP mode) | No:
|
|
4880
|
-
| `httpgw` | In-process thread state (re-queryable while process lives, e.g. MCP mode) | No:
|
|
4964
|
+
| `transferd` | gRPC `QueryTransfer` (daemon left running, see below) | Yes |
|
|
4965
|
+
| `direct` | In-process thread state (re-queryable while process lives, e.g. MCP mode) | No: last saved status after restart |
|
|
4966
|
+
| `httpgw` | In-process thread state (re-queryable while process lives, e.g. MCP mode) | No: last saved status after restart |
|
|
4881
4967
|
|
|
4882
4968
|
For `direct` and `httpgw`, the transfer runs as a Ruby thread inside the `ascli` process.
|
|
4883
4969
|
The `job_id` is persisted on disk but the live thread state is only available as long as the same process is running.
|
|
4884
|
-
If the process is restarted, `config agents jobs status`
|
|
4970
|
+
If the process is restarted, `config agents jobs status` shows the last saved status of those jobs, with a `note`.
|
|
4885
4971
|
|
|
4886
|
-
|
|
4972
|
+
With agent `transferd`, the transfer runs in the daemon: an asynchronous transfer needs a daemon that stays after `ascli` exits, with parameter `stop` set to `false`, a fixed port in `url`, and parameter `api_key` (see [Agent: Transfer Daemon](#agent-transfer-daemon)).
|
|
4973
|
+
With the default (`stop` is `true`), the daemon started by `ascli` stops when `ascli` exits: the transfer stops, and its status can no longer be queried.
|
|
4974
|
+
The first command starts the daemon, the next ones use it.
|
|
4975
|
+
For example, with a preset:
|
|
4976
|
+
|
|
4977
|
+
```shell
|
|
4978
|
+
ascli config preset set daemon @json:'{"agent":"transferd","url":"127.0.0.1:55002","stop":false,"asynchronous":true,"api_key":"<API_KEY>"}'
|
|
4979
|
+
ascli server download /aspera-test-dir-large/1GB --transfer=@preset:daemon
|
|
4980
|
+
ascli config agents jobs list --transfer=@preset:daemon
|
|
4981
|
+
```
|
|
4982
|
+
|
|
4983
|
+
Parameters of the agent are persisted, except secrets (e.g. `password` of agent `node`, `api_key` of agent `transferd`): `config agents jobs status` and `list` take them from the current `transfer` option, if it is for the same agent (e.g. same option on command line, or in a preset).
|
|
4984
|
+
|
|
4985
|
+
`config agents jobs status` and `list` query the agent for the status of the jobs not ended (not `completed`, `failed` or `cancelled`), and save it.
|
|
4986
|
+
`list` queries the agents of 10 jobs at a time: an agent that does not answer costs its call timeout (e.g. parameter `timeout` of agent `transferd`) once for 10 jobs.
|
|
4987
|
+
When the agent gives no status (e.g. agent not reachable, missing secret), the last saved status is kept: `status` shows it with the `error`, and `list` shows it with a warning.
|
|
4887
4988
|
|
|
4888
4989
|
> [!NOTE]
|
|
4889
4990
|
> **`asynchronous` and MCP** - When `ascli` is used as an MCP server, an AI assistant calling
|
|
@@ -5369,7 +5470,7 @@ Options for `transfer` are:
|
|
|
5369
5470
|
|
|
5370
5471
|
| Field | Type | Description |
|
|
5371
5472
|
| ------- | ------ | -------------------------------------------------------------------------------- |
|
|
5372
|
-
| `api_key` | `String` | API key of an existing daemon
|
|
5473
|
+
| `api_key` | `String` | API key of the daemon, sent in the metadata `api_key` of each call. For an existing daemon: required if it has `authentication` enabled in its configuration. For a daemon started by `ascli`: it is given `authentication` with this key, else with a random key if `stop` is `true`, else without authentication (warning): set it so that a daemon left running can be used only by the executions that know it. |
|
|
5373
5474
|
| `ca_file` | `String` | Path to the certificate authority file (PEM) that signed the certificate of an existing daemon (`start` is `false`) that has `tls` enabled in its configuration. A self-signed certificate is its own authority. |
|
|
5374
5475
|
| `start` | `Bool` | Start a new daemon instance.<br/>Default: `true`. |
|
|
5375
5476
|
| `stop` | `Bool` | Stop the daemon when `ascli` exits.<br/>Default: `true`. |
|
|
@@ -5377,8 +5478,13 @@ Options for `transfer` are:
|
|
|
5377
5478
|
|
|
5378
5479
|
> [!NOTE]
|
|
5379
5480
|
> If port zero is specified in the URL, then the daemon will listen on a random available port.
|
|
5481
|
+
> `ascli` reads that port in the file that `transferd` (version 1.1.7 and later) writes in a folder of its own, next to its configuration file, else in its log.
|
|
5380
5482
|
> If no address is specified, then `127.0.0.1` is used.
|
|
5381
5483
|
|
|
5484
|
+
A daemon started by `ascli` requires an API key, so that other users of the host cannot use it: the one of parameter `api_key`, else a random one.
|
|
5485
|
+
A daemon left running (`stop` is `false`) never gets a random key, as the next executions could not know it: set parameter `api_key` (for all executions), else it has no authentication (a warning tells it).
|
|
5486
|
+
Its configuration file is in the temporary folder, readable only by the user.
|
|
5487
|
+
|
|
5382
5488
|
For example, to use an external, already running `transferd`, use option:
|
|
5383
5489
|
|
|
5384
5490
|
```shell
|
|
@@ -5658,6 +5764,8 @@ ascli config ascp schema transferd --format=jsonpp
|
|
|
5658
5764
|
|
|
5659
5765
|
The description gives the supported agents, if not all, and the corresponding `ascp` argument or environment variable.
|
|
5660
5766
|
|
|
5767
|
+
Values are given in the form described here, whatever the agent: `ascli` converts them for an agent that reads another form (e.g. `resume_policy` for `transferd`, `exclude_newer_than` for `connect`).
|
|
5768
|
+
|
|
5661
5769
|
#### Transfer Specification Reference
|
|
5662
5770
|
|
|
5663
5771
|
| ID | Name |
|
|
@@ -5685,8 +5793,8 @@ The description gives the supported agents, if not all, and the corresponding `a
|
|
|
5685
5793
|
| `destination_root_id` | `String` | The file ID of the destination root directory.<br/>Required when using Bearer token auth for the destination node.<br/>(T) |
|
|
5686
5794
|
| `dgram_size` | `Integer` | UDP datagram size in bytes.<br/>(`-Z {integer}`) |
|
|
5687
5795
|
| `direction` | `Enum[String]` | Direction of transfer (on client side).<br/>Required.<br/>Allowed values: `send`, `receive`.<br/>(`--mode=(conversion){enum}`) |
|
|
5688
|
-
| `exclude_newer_than` | `String` | Exclude files, but not directories, from the transfer if they are newer than
|
|
5689
|
-
| `exclude_older_than` | `String` | Exclude files, but not directories, from the transfer if they are older than
|
|
5796
|
+
| `exclude_newer_than` | `Integer, String` | Exclude files, but not directories, from the transfer if they are newer than this modification time: number of seconds since the epoch of the source file system (usually 1970-01-01), or, if negative, relative to the present time.<br/>e.g. `-86400` for newer than a day back.<br/>An integer, or a string of an integer. Agent `connect` accepts only a time after the epoch (not negative).<br/>(`--exclude-newer-than={integer\|string}`) |
|
|
5797
|
+
| `exclude_older_than` | `Integer, String` | Exclude files, but not directories, from the transfer if they are older than this modification time: number of seconds since the epoch of the source file system (usually 1970-01-01), or, if negative, relative to the present time.<br/>e.g. `-86400` for older than a day back.<br/>An integer, or a string of an integer. Agent `connect` accepts only a time after the epoch (not negative).<br/>(`--exclude-older-than={integer\|string}`) |
|
|
5690
5798
|
| `fail_bad_filepass` | `Bool` | Fail on bad file decryption passphrase.<br/>(A, T)<br/>(`--fail-bad-filepass`) |
|
|
5691
5799
|
| `fasp_port` | `Integer` | Specifies fasp (UDP) port.<br/>Default: `33001`.<br/>(`-O {integer}`) |
|
|
5692
5800
|
| `fasp_proxy` | `Hash` | Proxy for communications between the remote server and the (local) client.<br/>(T) |
|
|
@@ -5734,7 +5842,7 @@ The description gives the supported agents, if not all, and the corresponding `a
|
|
|
5734
5842
|
| `remove_empty_source_dir` | `Bool` | Remove empty source subdirectories and remove the source directory itself, if empty.<br/>(T) |
|
|
5735
5843
|
| `remove_empty_source_directory` | `Bool` | Remove empty source subdirectories and remove the source directory itself, if empty.<br/>(A)<br/>(`--remove-empty-source-directory`) |
|
|
5736
5844
|
| `remove_skipped` | `Bool` | Must also have `remove_after_transfer` set to `true`. Defaults to `false`. If `true`, skipped files will be removed as well.<br/>(A, C, N)<br/>(`--remove-skipped`) |
|
|
5737
|
-
| `resume_policy` | `Enum[String]` | If a transfer is interrupted or fails to finish, this policy directs the transfer to resume without retransferring the files. Allowable values:<br/>- `none` : Always re-transfer the entire file.<br/>- `attrs` : Compare file attributes and resume if they match, and re-transfer if they do not.<br/>- `sparse_csum` : Compare file attributes and the sparse file checksums; resume if they match, and re-transfer if they do not.<br/>- `full_csum` : Compare file attributes and the full file checksums; resume if they match, and re-transfer if they do not.<br/>
|
|
5845
|
+
| `resume_policy` | `Enum[String]` | If a transfer is interrupted or fails to finish, this policy directs the transfer to resume without retransferring the files. Allowable values:<br/>- `none` : Always re-transfer the entire file.<br/>- `attrs` : Compare file attributes and resume if they match, and re-transfer if they do not.<br/>- `sparse_csum` : Compare file attributes and the sparse file checksums; resume if they match, and re-transfer if they do not.<br/>- `full_csum` : Compare file attributes and the full file checksums; resume if they match, and re-transfer if they do not.<br/>Agents `transferd` and `desktop` use values `attributes`, `sparse_checksum`, `full_checksum`: `ascli` converts them.<br/>Allowed values: `none`, `attrs`, `sparse_csum`, `full_csum`.<br/>Default: `faspmgr:none;other:sparse_csum`.<br/>(`-k (conversion){enum}`) |
|
|
5738
5846
|
| `retry_duration` | `Integer, String` | Specifies how long to wait before retrying transfer (e.g. `5min`).<br/>(T) |
|
|
5739
5847
|
| `save_before_overwrite` | `Bool` | If a transfer would result in an existing file <filename>.<ext> being overwritten, move that file to <filename>.yyyy.mm.dd.hh.mm.ss.index.<ext> (where index is set to 1 at the beginning of each new second and incremented for each file saved in this manner during the same second) in the same directory before writing the new file.<br/>File attributes are maintained in the renamed file.<br/>(A, N, T)<br/>(`--save-before-overwrite`) |
|
|
5740
5848
|
| `skip_duplicate_check` | `Bool` | Don't check for duplicate files at the destination.<br/>(A, T)<br/>(`--skip-dir-traversal-dupes`) |
|
|
@@ -6325,6 +6433,24 @@ The following is an extract of the man page of `ascp`.
|
|
|
6325
6433
|
|
|
6326
6434
|
To discard data at the destination, the destination argument is set to `faux://`.
|
|
6327
6435
|
|
|
6436
|
+
> [!IMPORTANT]
|
|
6437
|
+
> A `faux:` URL, as source or destination, is used as is only on a side where no docroot applies.
|
|
6438
|
+
> Where a docroot applies, `ascp` builds the storage URL by prepending the docroot to the path given by the client, so a URL cannot be given:
|
|
6439
|
+
>
|
|
6440
|
+
> - Server side: the transfer user has a docroot, or the transfer uses an access key (its storage root plays the role of the docroot).
|
|
6441
|
+
> This is the case on most servers, and with `node` and `shares`.
|
|
6442
|
+
> - Client side: no docroot applies, unless the local docroot is applied with `--ts.apply_local_docroot=true` (added automatically when the Node API starts a transfer).
|
|
6443
|
+
>
|
|
6444
|
+
> Then, a `faux://` destination fails with `Destination cannot be URI if docroot defined`, and a `faux:` source with `No such file or directory`.
|
|
6445
|
+
> With `node` and `shares`, the Node API (`files/upload_setup`) first checks that the destination folder exists, so the error is `Path not found`.
|
|
6446
|
+
>
|
|
6447
|
+
> So, `--to-folder=faux://` works for a download, and for an upload only if the transfer user on the server has no docroot, or an empty one.
|
|
6448
|
+
> The source and the destination can both be `faux:`, to test the network with no disk I/O on either side, when no docroot applies on either side.
|
|
6449
|
+
>
|
|
6450
|
+
> When a docroot applies at the destination, give a real destination folder and the `ascp` option `--no-write` (not listed by `ascp -h`), with the `direct` agent: `--transfer.ascp_args.0=--no-write`.
|
|
6451
|
+
> The data is transferred but not written: each file is created at the destination with a size of 0.
|
|
6452
|
+
> This works for upload and download.
|
|
6453
|
+
|
|
6328
6454
|
To send uninitialized data in place of an actual source file, the source file is replaced with an argument of the form:
|
|
6329
6455
|
|
|
6330
6456
|
```shell
|
|
@@ -6391,12 +6517,30 @@ Examples:
|
|
|
6391
6517
|
ascli server upload faux:///myfile\?20g --to-folder=/Upload
|
|
6392
6518
|
```
|
|
6393
6519
|
|
|
6394
|
-
- Upload a file /tmp/sample but do not save results to disk (no docroot on
|
|
6520
|
+
- Upload a file /tmp/sample but do not save results to disk (the transfer user has no docroot on the server)
|
|
6395
6521
|
|
|
6396
6522
|
```shell
|
|
6397
6523
|
ascli server upload /tmp/sample --to-folder=faux://
|
|
6398
6524
|
```
|
|
6399
6525
|
|
|
6526
|
+
- Upload 1 gibibyte of generated data and discard it at the destination: network only, no disk I/O on either side (the transfer user has no docroot on the server)
|
|
6527
|
+
|
|
6528
|
+
```shell
|
|
6529
|
+
ascli server upload 'faux:///myfile?1g' --to-folder=faux://
|
|
6530
|
+
```
|
|
6531
|
+
|
|
6532
|
+
- Upload 1 gibibyte of generated data to `/Upload` without writing it to disk on the server, also when the transfer user has a docroot (file `myfile` is created with size 0)
|
|
6533
|
+
|
|
6534
|
+
```shell
|
|
6535
|
+
ascli server upload 'faux:///myfile?1g' --to-folder=/Upload --transfer.ascp_args.0=--no-write
|
|
6536
|
+
```
|
|
6537
|
+
|
|
6538
|
+
- Download file `/Upload/myfile` but do not save it on the local disk
|
|
6539
|
+
|
|
6540
|
+
```shell
|
|
6541
|
+
ascli server download /Upload/myfile --to-folder=faux://
|
|
6542
|
+
```
|
|
6543
|
+
|
|
6400
6544
|
- Upload a faux directory `mydir` containing 1 million files, sequentially with sizes ranging from 0 to 2 Mebibyte - 2 bytes, with the base name of each file being `testfile` to /Upload
|
|
6401
6545
|
|
|
6402
6546
|
```shell
|
|
@@ -6568,7 +6712,7 @@ If the transfer user has no docroot and the transfer does not use a token, you c
|
|
|
6568
6712
|
```text
|
|
6569
6713
|
ascli -h
|
|
6570
6714
|
NAME
|
|
6571
|
-
ascli -- a command line tool for Aspera Applications (v4.
|
|
6715
|
+
ascli -- a command line tool for Aspera Applications (v4.30.0)
|
|
6572
6716
|
|
|
6573
6717
|
SYNOPSIS
|
|
6574
6718
|
ascli [GLOBAL_OPTIONS] <command> [OPTIONS] [ARGS]
|
|
@@ -6591,8 +6735,10 @@ COMMANDS
|
|
|
6591
6735
|
OPTIONS
|
|
6592
6736
|
Options begin with a '-' (minus), and value is provided on command line.
|
|
6593
6737
|
Special values are supported beginning with special prefix @pfx:, where pfx is one of:
|
|
6594
|
-
val, base64, csvt, env, file, uri, json, lines, list, none, path, re, ruby, s, secret, stdin, yaml, zlib, extend, preset, vault
|
|
6595
|
-
|
|
6738
|
+
val, base64, csvt, date, env, file, uri, json, lines, list, none, path, re, ruby, s, secret, stdin, yaml, zlib, extend, preset, vault
|
|
6739
|
+
Durations: a number of seconds, or with units w, d, h, m, s, ms, us (e.g. 1h30m), or 1d 02:00:00
|
|
6740
|
+
Dates: @date:<DATE> gives <DATE> in UTC, ISO 8601. <DATE> is a date (e.g. 2026-11-27 10:00:00),
|
|
6741
|
+
or now, today, yesterday, tomorrow, optionally followed by -<DURATION> or +<DURATION> (e.g. now-24h)
|
|
6596
6742
|
|
|
6597
6743
|
ARGS
|
|
6598
6744
|
Some commands require mandatory arguments, e.g. a path.
|
|
@@ -6653,7 +6799,7 @@ OPTIONS: global
|
|
|
6653
6799
|
--ascp-logs=HASH Ascp: log analysis (dot-notation: period, zero_bytes, mtu, resolve, thresholds, timezone, health_minutes, remote_max_size)
|
|
6654
6800
|
-P, --preset=VALUE Load the named option preset from current config file
|
|
6655
6801
|
--version-check-days=INT Period in days to check new version (zero to disable)
|
|
6656
|
-
--plugin-folder=
|
|
6802
|
+
--plugin-folder=LIST Folders where to find additional plugins (DEF: folder plugins of the configuration folder)
|
|
6657
6803
|
--sdk-url=VALUE Ascp: URL to get Aspera Transfer Executables
|
|
6658
6804
|
--locations-url=LIST Ascp: URLs to get download locations of Aspera Transfer Daemon
|
|
6659
6805
|
--sdk-folder=VALUE Ascp: Path to folder with ascp (or product with "product:")
|
|
@@ -6718,13 +6864,20 @@ ascli config plugins list
|
|
|
6718
6864
|
```
|
|
6719
6865
|
|
|
6720
6866
|
```text
|
|
6721
|
-
|
|
6722
|
-
│ plugin │ detect │ wizard │ path │
|
|
6723
|
-
|
|
6724
|
-
│ shares │ ✓ │ ✓ │ .../aspera-cli/lib/aspera/
|
|
6725
|
-
│ node │ ✓ │ ✓ │ .../aspera-cli/lib/aspera/
|
|
6867
|
+
╭────────┬────────┬────────┬───────────┬─────────────────────────────────────────────────╮
|
|
6868
|
+
│ plugin │ detect │ wizard │ status │ path │
|
|
6869
|
+
╞════════╪════════╪════════╪═══════════╪═════════════════════════════════════════════════╡
|
|
6870
|
+
│ shares │ ✓ │ ✓ │ available │ .../aspera-cli/lib/aspera/plugins/shares │
|
|
6871
|
+
│ node │ ✓ │ ✓ │ available │ .../aspera-cli/lib/aspera/plugins/node │
|
|
6726
6872
|
...
|
|
6727
|
-
|
|
6873
|
+
╰────────┴────────┴────────┴───────────┴─────────────────────────────────────────────────╯
|
|
6874
|
+
```
|
|
6875
|
+
|
|
6876
|
+
Column `status` is `available`, or the reason why the plugin cannot be used (e.g. `missing gem <gem>`).
|
|
6877
|
+
Details of one plugin (source, form, capabilities, dependencies, gems, security level):
|
|
6878
|
+
|
|
6879
|
+
```shell
|
|
6880
|
+
ascli config plugins show node
|
|
6728
6881
|
```
|
|
6729
6882
|
|
|
6730
6883
|
Most plugins will take the URL option: `url` to identify their location.
|
|
@@ -6733,7 +6886,14 @@ REST APIs of Aspera legacy applications (Aspera Node, Shares, Console, Orchestra
|
|
|
6733
6886
|
|
|
6734
6887
|
Aspera on Cloud and Faspex 5 rely on OAuth.
|
|
6735
6888
|
|
|
6736
|
-
|
|
6889
|
+
Plugins are looked up in the folder of the gem (built-in plugins), and in the folders of option `plugin_folder` (list):
|
|
6890
|
+
|
|
6891
|
+
- By default (`DEF`): folder `plugins` of the configuration folder (option `home`).
|
|
6892
|
+
- Folders given replace the default, which can still be included with the special value `DEF`.
|
|
6893
|
+
- Each use of the option appends to the list: `--plugin-folder=DEF --plugin-folder=<FOLDER>`. A plugin of a folder later in the list has priority over one of the same name.
|
|
6894
|
+
- `--plugin-folder=@json:[]`: no folder other than the one of the gem.
|
|
6895
|
+
|
|
6896
|
+
The folders of option `plugin_folder`:
|
|
6737
6897
|
|
|
6738
6898
|
```shell
|
|
6739
6899
|
ascli --show-config --fields=plugin_folder
|
|
@@ -6755,19 +6915,22 @@ ascli --plugin-folder=. foo
|
|
|
6755
6915
|
|
|
6756
6916
|
#### Writing a plugin
|
|
6757
6917
|
|
|
6758
|
-
A plugin is
|
|
6918
|
+
A plugin is, in a plugin folder (option `plugin_folder`, by default folder `plugins` of the configuration folder), either a Ruby file (this section), or a folder with a manifest, for a plugin with several files, a transfer agent or schemas (see [Writing a plugin bundle](#writing-a-plugin-bundle)).
|
|
6759
6919
|
|
|
6760
6920
|
- **Name**: the file name is the plugin name, which is the first command, e.g. file `my_app.rb` for command `my_app`.
|
|
6761
|
-
The file defines class `Aspera::Cli::Plugins::<Class>`, the name in CamelCase (`MyApp`), subclass of
|
|
6762
|
-
|
|
6921
|
+
The file defines class `Aspera::Cli::Plugins::<Class>`, the name in CamelCase (`MyApp`), subclass of `Base` (`aspera/cli/plugins/base`).
|
|
6922
|
+
For common options, the class includes one of these modules (`include <Module>`):
|
|
6763
6923
|
- `BasicAuth` (`aspera/cli/plugins/basic_auth`): options `url`, `username`, `password`, method `basic_auth_api` returns a REST client with HTTP Basic authentication.
|
|
6764
6924
|
- `Oauth` (`aspera/cli/plugins/oauth`): options of `BasicAuth`, and `auth` (default `jwt`), `client_id`, `client_secret`, `redirect_uri`, `private_key`, `passphrase`.
|
|
6765
6925
|
- **Requires**: the plugin requires the files of the gem that it uses, e.g. `require 'aspera/cli/plugins/base'` (the `lib` folder of the gem is in the Ruby load path).
|
|
6766
|
-
Built-in plugins load only what they use: a class of the gem (for example `Plugins::Oauth`, `Rest::Client`) may not be loaded yet when the plugin is read (`NameError: uninitialized constant`).
|
|
6926
|
+
Built-in plugins load only what they use: a class or module of the gem (for example `Plugins::Oauth`, `Rest::Client`) may not be loaded yet when the plugin is read (`NameError: uninitialized constant`).
|
|
6767
6927
|
- **Options**: `option :<name>, description: '...'` (optional: `default:`, `allowed:` a type or a list of values), value read with `options.get_option(:<name>)` (`mandatory: true` to require it).
|
|
6768
6928
|
`use_options <Module>` adds the options of a module, e.g. `use_options OauthWebOptions` (`client_id`, `client_secret`, `redirect_uri`) for the OAuth web flow only, without the other options of `Oauth`.
|
|
6929
|
+
In the help, the options of `use_options` and of an included module (`BasicAuth`, `Oauth`) are listed in the order of these lines in the class.
|
|
6769
6930
|
- **Commands**: `command :<name>, description: '...'`, inside `commands_under :<name> do ... end` for sub-commands.
|
|
6770
6931
|
Positional arguments: `arguments: [{name: :<name>, description: '...'}]` (optional: `mandatory: false`, `default:`, `type: Hash`, `multiple: true`).
|
|
6932
|
+
An argument that is a local path adds `complete: :file` (or `:folder`) for shell completion, and then `access:` so the path is checked against the [Security Level](#security-level): `:read` (the command reads it), `:write` (the command writes it), or `:none` (not a local path read or written by `ascli`, for example a remote path, or a path given to another program).
|
|
6933
|
+
With `access: :read`, `stdin: true` makes `-` (and `@stdin:stream`) the standard input, read by the action: the action receives an `Aspera::StandardInput` (`read` gives the content, `to_s` is `-`) instead of a path (refused in MCP server mode); without it, `-` is a path like any other.
|
|
6771
6934
|
`read_only: true` for a command that changes nothing (allowed with option `poll`).
|
|
6772
6935
|
- **Actions**: the method `action_<command path>`, e.g. `action_item_show` for `item show`, receives the arguments as keyword arguments (and `**` for others).
|
|
6773
6936
|
It returns a result, displayed according to option `format`: `Result::SingleObject.new(<Hash>)`, `Result::ObjectList.new(<Array of Hash>)`, `Result::Status.new('<text>')`, `Result::Nothing.new`.
|
|
@@ -6791,8 +6954,10 @@ require 'aspera/cli/plugins/basic_auth'
|
|
|
6791
6954
|
module Aspera
|
|
6792
6955
|
module Cli
|
|
6793
6956
|
module Plugins
|
|
6794
|
-
|
|
6795
|
-
|
|
6957
|
+
class MyApp < Base
|
|
6958
|
+
# Options `url`, `username` and `password`, method `basic_auth_api`
|
|
6959
|
+
include BasicAuth
|
|
6960
|
+
|
|
6796
6961
|
application_name 'My Application'
|
|
6797
6962
|
option :page_size, description: 'Number of items per page', allowed: Integer, default: 100
|
|
6798
6963
|
|
|
@@ -6825,6 +6990,122 @@ end
|
|
|
6825
6990
|
ascli --plugin-folder=<FOLDER> my_app item list --url=https://app.example.com/api --username=<USERNAME> --password=<PASSWORD> --page-size=10
|
|
6826
6991
|
```
|
|
6827
6992
|
|
|
6993
|
+
#### Writing a plugin bundle
|
|
6994
|
+
|
|
6995
|
+
A bundle is a folder `<name>/` of a plugin folder, with a manifest `plugin.yaml`: the built-in plugins (`aoc`, `node`, `transferd`, ...) are bundles, in `lib/aspera/plugins/<name>/` of the gem.
|
|
6996
|
+
A single file stays the simplest form, for a plugin that has commands only.
|
|
6997
|
+
The manifest is data: reading it never runs code of the bundle, and `config plugins list` and `config plugins show <NAME>` show the plugin, also when it is unavailable (invalid manifest, missing dependency), with the reason.
|
|
6998
|
+
|
|
6999
|
+
```text
|
|
7000
|
+
<PLUGIN_FOLDER>/my_app/
|
|
7001
|
+
plugin.yaml manifest
|
|
7002
|
+
commands.rb class Aspera::Plugins::MyApp::Commands: top level command `my_app`
|
|
7003
|
+
<other>.rb other files, declared in the manifest if the manifest loads them
|
|
7004
|
+
schemas/ schemas (JSON or YAML), declared in the manifest
|
|
7005
|
+
```
|
|
7006
|
+
|
|
7007
|
+
- **Names**: the name of the folder is the name of the plugin, and the field `name` of the manifest: lower case letters, digits and `_`, starting with a letter.
|
|
7008
|
+
A file `<file>.rb` of the bundle defines the constant `Aspera::Plugins::<Name>::<Const>`, where `<Name>` is the name in CamelCase (`MyApp`): `commands.rb` defines `Commands`, a subclass of `Cli::Plugins::Base`, as a single file, with `include Cli::Plugins::BasicAuth` or `Oauth` for the common options.
|
|
7009
|
+
Constants in the manifest (`class`, `module`) are relative to `Aspera::Plugins::<Name>`, file names to the folder of the bundle (no `..`, no hidden file).
|
|
7010
|
+
- **Same name**: for a name that is both a file `<name>.rb` and a folder `<name>/` of the same plugin folder, the bundle is used, with a warning.
|
|
7011
|
+
- **Requires**: as for a single file, the code requires the files of the gem that it uses.
|
|
7012
|
+
The code is loaded when the plugin is used (command, agent, service), not when it is listed.
|
|
7013
|
+
- **Options**: as for a single file.
|
|
7014
|
+
`option <NAME>, before: <OTHER>` places an option before another one in the help, also an option of a module mounted on another plugin (e.g. before `smtp` of `config`).
|
|
7015
|
+
An option placed `before:` an unknown option, or in a cycle of `before:`, goes at the end, with a warning in the log: the other options and the commands work.
|
|
7016
|
+
|
|
7017
|
+
Manifest `plugin.yaml` (schema `lib/aspera/plugin.schema.yaml`: no other field than these, at each level):
|
|
7018
|
+
|
|
7019
|
+
| Field | Default | Content |
|
|
7020
|
+
| --- | --- | --- |
|
|
7021
|
+
| `name` | (mandatory) | Name of the plugin, same as the folder |
|
|
7022
|
+
| `title` | (mandatory) | Name of the product, in the lists and in the instructions of `mcp server` |
|
|
7023
|
+
| `mcp` | none | Section added to the instructions of `mcp server` for the AI client, about the use of the plugin (e.g. development guides). `%{<POINT>}` is replaced by the list of the entries of the extension point `<POINT>`: the field `name` of each entry, with the title of its bundle, so the schema of an extension point used this way requires `name` |
|
|
7024
|
+
| `depends` | `[]` | Bundles that this one uses. If one is missing or unavailable, this bundle is unavailable |
|
|
7025
|
+
| `gems` | `[]` | Optional gems required by the code, checked when the code is loaded: the error tells `gem install <GEM>` |
|
|
7026
|
+
| `commands` | `false` | `true`: `commands.rb` defines `Commands`, the top level command `<name>` |
|
|
7027
|
+
| `schemas` | `[]` | Schemas added to the registry: `key` (unique), `file`, `owned` (default `false`: schema of a vendor API, not used to check values), `source` (`url`, `version` of a downloaded schema, used by `rake tools:openapi`) |
|
|
7028
|
+
| `extension_points` | `[]` | Points that other bundles extend: `name`, `schema` (file: schema of one entry) |
|
|
7029
|
+
| `extensions` | `{}` | Entries for the extension points of other bundles, by name of point: `file` and `class` of the code, and the fields defined by the schema of the point |
|
|
7030
|
+
| `mounts` | `[]` | Modules added to the commands of another plugin: `target` (plugin name), `file`, `module` |
|
|
7031
|
+
| `services` | `[]` | Objects shared through the context, created on first use: `name`, `file`, `class` |
|
|
7032
|
+
|
|
7033
|
+
A bundle can add a transfer agent: the built-in bundle `xfer` declares the extension point `agent`. An entry has `name` (value of option `transfer`), `short` (one letter, unique), `file`, `class` (subclass of `Aspera::Agent::Base`) and `options_schema` (schema file of the parameters of the agent):
|
|
7034
|
+
|
|
7035
|
+
```yaml
|
|
7036
|
+
name: my_agent
|
|
7037
|
+
title: My transfer agent
|
|
7038
|
+
depends:
|
|
7039
|
+
- xfer
|
|
7040
|
+
extensions:
|
|
7041
|
+
agent:
|
|
7042
|
+
- name: my_agent
|
|
7043
|
+
short: m
|
|
7044
|
+
file: agent.rb
|
|
7045
|
+
class: Agent
|
|
7046
|
+
options_schema: schemas/agent_options.yaml
|
|
7047
|
+
```
|
|
7048
|
+
|
|
7049
|
+
Example: bundle `my_app`, the same plugin as above, in folder `<PLUGIN_FOLDER>/my_app/`.
|
|
7050
|
+
|
|
7051
|
+
File `plugin.yaml`:
|
|
7052
|
+
|
|
7053
|
+
```yaml
|
|
7054
|
+
name: my_app
|
|
7055
|
+
title: My Application
|
|
7056
|
+
commands: true
|
|
7057
|
+
mcp: >-
|
|
7058
|
+
Use `my_app` to manage the items of My Application.
|
|
7059
|
+
```
|
|
7060
|
+
|
|
7061
|
+
File `commands.rb`:
|
|
7062
|
+
|
|
7063
|
+
```ruby
|
|
7064
|
+
# Files of the gem used by the plugin (its `lib` folder is in the load path)
|
|
7065
|
+
require 'aspera/cli/plugins/base'
|
|
7066
|
+
require 'aspera/cli/plugins/basic_auth'
|
|
7067
|
+
|
|
7068
|
+
module Aspera
|
|
7069
|
+
module Plugins
|
|
7070
|
+
module MyApp
|
|
7071
|
+
# Top level command `my_app`
|
|
7072
|
+
class Commands < Cli::Plugins::Base
|
|
7073
|
+
# Options `url`, `username` and `password`, method `basic_auth_api`
|
|
7074
|
+
include Cli::Plugins::BasicAuth
|
|
7075
|
+
|
|
7076
|
+
application_name 'My Application'
|
|
7077
|
+
option :page_size, description: 'Number of items per page', allowed: Integer, default: 100
|
|
7078
|
+
|
|
7079
|
+
command :info, description: 'Show application information', read_only: true
|
|
7080
|
+
commands_under :item, description: 'Manage items' do
|
|
7081
|
+
command :list, description: 'List items', read_only: true
|
|
7082
|
+
command :show, description: 'Show an item', arguments: [{name: :id, description: 'Item identifier'}], read_only: true
|
|
7083
|
+
end
|
|
7084
|
+
|
|
7085
|
+
# Command `info`
|
|
7086
|
+
def action_info(**) = Cli::Result::SingleObject.new(api.read('info'))
|
|
7087
|
+
|
|
7088
|
+
# Command `item list`
|
|
7089
|
+
def action_item_list(**) = Cli::Result::ObjectList.new(api.read('items', {limit: options.get_option(:page_size)}))
|
|
7090
|
+
|
|
7091
|
+
# Command `item show <ID>`, with arguments as keyword arguments
|
|
7092
|
+
def action_item_show(id:, **) = Cli::Result::SingleObject.new(api.read("items/#{id}"))
|
|
7093
|
+
|
|
7094
|
+
private
|
|
7095
|
+
|
|
7096
|
+
# REST client of the application, with Basic authentication
|
|
7097
|
+
def api = @api ||= basic_auth_api
|
|
7098
|
+
end
|
|
7099
|
+
end
|
|
7100
|
+
end
|
|
7101
|
+
end
|
|
7102
|
+
```
|
|
7103
|
+
|
|
7104
|
+
```shell
|
|
7105
|
+
ascli --plugin-folder=<FOLDER> config plugins show my_app
|
|
7106
|
+
ascli --plugin-folder=<FOLDER> my_app item list --url=https://app.example.com/api --username=<USERNAME> --password=<PASSWORD> --page-size=10
|
|
7107
|
+
```
|
|
7108
|
+
|
|
6828
7109
|
### Plugins vs Transfer Agents
|
|
6829
7110
|
|
|
6830
7111
|
Plugins typically represent a specific remote application on which `ascli` can operate, while transfer agents are the underlying components that handle the actual data transfer.
|
|
@@ -7301,7 +7582,8 @@ The tool reuses valid tokens and automatically triggers a refresh or regeneratio
|
|
|
7301
7582
|
#### API Client Registration
|
|
7302
7583
|
|
|
7303
7584
|
> [!NOTE]
|
|
7304
|
-
>
|
|
7585
|
+
> The pre-registered `client_id` (default, and used by the wizard) supports only `auth=jwt`: in that case, skip this and do not set `client_id` and `client_secret` in next section.
|
|
7586
|
+
> For `auth=web`, register an API client as below, and set its `client_id`, `client_secret` and a `redirect_uri` equal to one of its **Redirect URIs**.
|
|
7305
7587
|
|
|
7306
7588
|
You can use a specific OAuth API `client_id`.
|
|
7307
7589
|
The first step is to declare `ascli` in Aspera on Cloud using the admin interface.
|
|
@@ -7355,8 +7637,17 @@ ascli config preset set default aoc <AOC_ORG>
|
|
|
7355
7637
|
```
|
|
7356
7638
|
|
|
7357
7639
|
> [!NOTE]
|
|
7358
|
-
> Default `auth`
|
|
7359
|
-
>
|
|
7640
|
+
> Default `auth` is `jwt` (see next section).
|
|
7641
|
+
> For web authentication, also set `auth=web` and `redirect_uri=http://localhost:12345` (the value registered in the API client):
|
|
7642
|
+
>
|
|
7643
|
+
> ```shell
|
|
7644
|
+
> ascli config preset set <AOC_ORG> @: auth=web redirect_uri=http://localhost:12345
|
|
7645
|
+
> ```
|
|
7646
|
+
|
|
7647
|
+
If the browser shows: _Add the redirect URI for your API client in the admin application of IBM Aspera on Cloud and make sure it matches 'redirect_uri' query parameter exactly_, then either:
|
|
7648
|
+
|
|
7649
|
+
- no `client_id` is set: the pre-registered client does not support `auth=web`, or
|
|
7650
|
+
- `redirect_uri` is not exactly one of the **Redirect URIs** of the API client: scheme (`http` or `https`), host (`localhost` or `127.0.0.1`), port, and trailing `/` shall be identical.
|
|
7360
7651
|
|
|
7361
7652
|
#### Authentication with private key
|
|
7362
7653
|
|
|
@@ -7530,14 +7821,21 @@ empty
|
|
|
7530
7821
|
|
|
7531
7822
|
### Calling AoC APIs from command line
|
|
7532
7823
|
|
|
7533
|
-
The command `ascli aoc bearer_token`
|
|
7824
|
+
The command `ascli aoc bearer_token` generates an OAuth token to call AoC APIs as user (scope `user:all`).
|
|
7825
|
+
The command `ascli aoc admin bearer_token` generates a token with scope `admin:all`, required by administration APIs, such as `group_memberships`.
|
|
7534
7826
|
This can be useful when a command is not yet available.
|
|
7535
7827
|
The token is a secret: it is hidden in the output, unless option `--out.secrets=yes` is used.
|
|
7536
7828
|
|
|
7537
|
-
Example:
|
|
7829
|
+
Example: list members of groups, with the name of group and member (option `-g` of `curl`: the brackets of `embed[]` are not a URL range):
|
|
7538
7830
|
|
|
7539
7831
|
```shell
|
|
7540
|
-
curl -s -H "Authorization: $(ascli aoc bearer_token --out.secrets=yes)" 'https://api.ibmaspera.com/api/v1/group_memberships?embed[]=
|
|
7832
|
+
curl -s -g -H "Authorization: $(ascli aoc admin bearer_token --out.secrets=yes)" 'https://api.ibmaspera.com/api/v1/group_memberships?embed[]=group&embed[]=member'|jq -r '.[]|(.group.name + " -> " + .member.name)'
|
|
7833
|
+
```
|
|
7834
|
+
|
|
7835
|
+
The same with `ascli` (a parameter with several values is given as an array, with `[]` in its name):
|
|
7836
|
+
|
|
7837
|
+
```shell
|
|
7838
|
+
ascli aoc admin group_membership list --query=@json:'{"embed[]":["group","member"]}' --fields=group.name,member.name
|
|
7541
7839
|
```
|
|
7542
7840
|
|
|
7543
7841
|
It is also possible to get the bearer token for node, as user or as admin using:
|
|
@@ -7663,7 +7961,7 @@ api.ibmaspera.com 422 Unprocessable Entity
|
|
|
7663
7961
|
Remove the offending parameters and try again.
|
|
7664
7962
|
|
|
7665
7963
|
> [!NOTE]
|
|
7666
|
-
> Some properties that are shown in the web UI, such as membership, are not listed directly in the resource, but instead another resource is created to link a user and its group: `group_membership`
|
|
7964
|
+
> Some properties that are shown in the web UI, such as membership, are not listed directly in the resource, but instead another resource is created to link a user and its group: `group_membership`, or the owners and managers of a group: `group_permission`
|
|
7667
7965
|
|
|
7668
7966
|
#### Access Key secrets
|
|
7669
7967
|
|
|
@@ -7808,7 +8106,7 @@ ascli aoc admin user list --query.q=dummyuser --fields=id --out.level=data --for
|
|
|
7808
8106
|
#### Example: Find deactivated users for more than 2 years
|
|
7809
8107
|
|
|
7810
8108
|
```shell
|
|
7811
|
-
ascli aoc admin user list --query=@
|
|
8109
|
+
ascli aoc admin user list --query=@json:@extend:'{"deactivated":true,"q":"last_login_at:<@date:now-730d@"}'
|
|
7812
8110
|
```
|
|
7813
8111
|
|
|
7814
8112
|
To delete them use the same method as before.
|
|
@@ -8009,6 +8307,36 @@ User: <USER_ID>
|
|
|
8009
8307
|
ascli aoc admin group_membership create @json:'{"group_id":<GROUP_ID>,"member_type":"user","member_id":<USER_ID>}'
|
|
8010
8308
|
```
|
|
8011
8309
|
|
|
8310
|
+
#### Example: Owners and managers of a group
|
|
8311
|
+
|
|
8312
|
+
An owner or a manager of a group can manage its members, an owner can also modify or delete the group.
|
|
8313
|
+
A `group_permission` gives the level `owner` or `manager` on a group to a user or a group (`entity_type` and `entity_id`).
|
|
8314
|
+
Organization administrators are owners of all groups, without `group_permission`.
|
|
8315
|
+
|
|
8316
|
+
- List the owners and managers of a group (tab **Managers** of the group in the web UI)
|
|
8317
|
+
|
|
8318
|
+
```shell
|
|
8319
|
+
ascli aoc admin group_permission list --query=@json:'{"group_id":<GROUP_ID>,"embed[]":["entity"],"sort":"entity_name"}' --fields=id,level,entity_type,entity.name
|
|
8320
|
+
```
|
|
8321
|
+
|
|
8322
|
+
- Make a user manager of a group
|
|
8323
|
+
|
|
8324
|
+
```shell
|
|
8325
|
+
ascli aoc admin group_permission create @json:'{"group_id":<GROUP_ID>,"entity_type":"user","entity_id":<USER_ID>,"level":"manager"}'
|
|
8326
|
+
```
|
|
8327
|
+
|
|
8328
|
+
- Change the level of a permission (only the level can be changed)
|
|
8329
|
+
|
|
8330
|
+
```shell
|
|
8331
|
+
ascli aoc admin group_permission modify <PERMISSION_ID> @json:'{"level":"owner"}'
|
|
8332
|
+
```
|
|
8333
|
+
|
|
8334
|
+
- Revoke a permission
|
|
8335
|
+
|
|
8336
|
+
```shell
|
|
8337
|
+
ascli aoc admin group_permission delete <PERMISSION_ID>
|
|
8338
|
+
```
|
|
8339
|
+
|
|
8012
8340
|
#### Example: Perform a multi Gbps transfer between two remote shared folders
|
|
8013
8341
|
|
|
8014
8342
|
In this example, a user has access to a workspace where two shared folders are located on different sites, for example, different cloud regions.
|
|
@@ -8788,6 +9116,7 @@ admin analytics application_events
|
|
|
8788
9116
|
admin analytics files organization '' <ID>
|
|
8789
9117
|
admin analytics transfers organization --query=@json:'{"status":"completed","direction":"receive","limit":2}' --notify-to=my_email_external --notify-template=@ruby:'%Q{From: <%=from_name%> <<%=from_email%>>\nTo: <<%=to%>>\nSubject: <%=ev["files_completed"]%> files received\n\n<%=ev.to_yaml%>}'
|
|
8790
9118
|
admin analytics transfers users --once-only=yes
|
|
9119
|
+
admin app_collaborator list
|
|
8791
9120
|
admin application instance list
|
|
8792
9121
|
admin application instance list --query.aspera_app_type=files
|
|
8793
9122
|
admin application instance list --query.organization_apps=true
|
|
@@ -8803,20 +9132,42 @@ admin ats cluster list
|
|
|
8803
9132
|
admin ats cluster show --cloud=aws --region=eu-west-1
|
|
8804
9133
|
admin ats cluster show 1f412ae7-869a-445c-9c05-02ad16813be2
|
|
8805
9134
|
admin auth_providers list
|
|
9135
|
+
admin auth_providers show <ID>
|
|
8806
9136
|
admin bearer_token --out.level=data --out.secrets=yes
|
|
8807
9137
|
admin client list
|
|
8808
9138
|
admin client_access_key list
|
|
9139
|
+
admin client_authorization list
|
|
8809
9140
|
admin client_registration_token create @json:'{"data":{"name":"test_client_reg1","client_subject_scopes":["alee","aejd"],"client_subject_enabled":true}}'
|
|
8810
9141
|
admin client_registration_token delete <ID>
|
|
8811
9142
|
admin client_registration_token list
|
|
8812
9143
|
admin configuration_policy list
|
|
8813
9144
|
admin configuration_policy show <ID>
|
|
9145
|
+
admin connect_suppressed_permission list
|
|
8814
9146
|
admin contact list
|
|
9147
|
+
admin distribution_list create @json:'{"name":"test_dl_ascli","owner_type":"user","owner_id":"<AOC_ADM_DL_OWNER>"}'
|
|
9148
|
+
admin distribution_list delete %name:test_dl_ascli_2
|
|
9149
|
+
admin distribution_list list
|
|
9150
|
+
admin distribution_list modify %name:test_dl_ascli @json:'{"name":"test_dl_ascli_2"}'
|
|
9151
|
+
admin distribution_list_membership create @json:'{"distribution_list_id":"<ID>","member_type":"email","member_id":"test.ascli@example.com"}' --fields=id
|
|
9152
|
+
admin distribution_list_membership delete <AOC_ADM_DL_MEMBER_CREATE>
|
|
9153
|
+
admin distribution_list_membership list --query=@json:'{"distribution_list_id":"<ID>"}'
|
|
9154
|
+
admin dropbox join_request %name:my_shared_inbox_name list
|
|
8815
9155
|
admin dropbox list
|
|
8816
9156
|
admin dropbox_membership list
|
|
9157
|
+
admin email_template effective --query=@json:'{"source_type":"organization","source_id":"<ID>","email_type":"invitation"}'
|
|
9158
|
+
admin email_template list --query.max=5
|
|
9159
|
+
admin file_deletion_policy show --query=@json:'{"node_id":"<AOC_ADM_FDP_NODE>"}'
|
|
8817
9160
|
admin group list
|
|
8818
|
-
admin group_membership list --fields=
|
|
9161
|
+
admin group_membership list --fields=id,group.name,member_type,member.name --query=@json:'{"max":50,"per_page":50,"embed[]":["group","member"],"sort":"member.name"}'
|
|
9162
|
+
admin group_permission list --fields=id,group.name,level,entity_type,entity_id,entity.name --query=@json:'{"max":50,"per_page":50,"embed[]":["group","entity"],"sort":"group_name"}'
|
|
9163
|
+
admin integrations list
|
|
8819
9164
|
admin kms_profile list
|
|
9165
|
+
admin network_policy access_control_rule %name:test_np_ascli create <AOC_ADM_FDP_NODE>
|
|
9166
|
+
admin network_policy access_control_rule %name:test_np_ascli list
|
|
9167
|
+
admin network_policy create @json:'{"name":"test_np_ascli","initiation_policy_type":"listed","access_control_type":"allow_following"}'
|
|
9168
|
+
admin network_policy delete %name:test_np_ascli
|
|
9169
|
+
admin network_policy initiation_rule %name:test_np_ascli create <AOC_ADM_FDP_NODE>
|
|
9170
|
+
admin network_policy initiation_rule %name:test_np_ascli delete <ID>
|
|
8820
9171
|
admin network_policy list
|
|
8821
9172
|
admin network_policy show <ID>
|
|
8822
9173
|
admin node bearer_token %name:my_node_name user:all
|
|
@@ -8836,19 +9187,27 @@ admin node do %name:my_node_name perm test_shared_folder create @json:'{"with":"
|
|
|
8836
9187
|
admin node do %name:my_node_name perm test_shared_folder create @json:'{"with":"my_user_group","as":"other_name_shared"}' --workspace=my_workspace_shared_inbox
|
|
8837
9188
|
admin node list
|
|
8838
9189
|
admin operation list
|
|
9190
|
+
admin organization modify @json:'{"name":"<AOC_ADM_ORG_NAME>"}'
|
|
8839
9191
|
admin organization show
|
|
8840
9192
|
admin package list --http-options.read_timeout=120.0
|
|
9193
|
+
admin saml_configuration create @json:'{"name":"test_saml_ascli","enabled":false,"sso_target_url":"https://idp.example.com/saml/sso","fingerprint":"00:01:02:03:04:05:06:07:08:09:0A:0B:0C:0D:0E:0F:10:11:12:13","attribute_mapping":{"email":"email","first_name":"given_name","last_name":"surname","member_of":"groups"}}'
|
|
9194
|
+
admin saml_configuration delete %name:test_saml_ascli
|
|
8841
9195
|
admin saml_configuration list
|
|
9196
|
+
admin saml_configuration modify %name:test_saml_ascli @json:'{"login_text":"Sign in with test SAML"}'
|
|
9197
|
+
admin saml_configuration show %name:test_saml_ascli
|
|
8842
9198
|
admin self show
|
|
8843
9199
|
admin short_link list
|
|
8844
9200
|
admin subscription account
|
|
8845
9201
|
admin subscription usage
|
|
8846
9202
|
admin subscription usage MONTH
|
|
9203
|
+
admin trend_micro_profile list
|
|
8847
9204
|
admin user list
|
|
8848
9205
|
admin user list --out.query='[?ats_admin].{name: name, email: email}'
|
|
8849
9206
|
admin user modify %name:my_user_email @: deactivated=false
|
|
8850
9207
|
admin user notifications %name:my_user_email show
|
|
8851
9208
|
admin user preferences %name:my_user_email show
|
|
9209
|
+
admin user shared_folders %name:my_user_email --http-options.read_timeout=300
|
|
9210
|
+
admin watermark_profile list
|
|
8852
9211
|
admin workspace dropbox %name:my_other_workspace list
|
|
8853
9212
|
admin workspace list
|
|
8854
9213
|
admin workspace shared_folder %name:my_other_workspace list
|
|
@@ -8907,6 +9266,7 @@ organization
|
|
|
8907
9266
|
organization --format=image --fields=background_image_url --ui=text
|
|
8908
9267
|
organization --url=<PUBLIC_LINK_RECV_FROM_AOC_USER>
|
|
8909
9268
|
packages browse <ID> /
|
|
9269
|
+
packages download_counts <ID>
|
|
8910
9270
|
packages list
|
|
8911
9271
|
packages list --query=@json:'{"dropbox_name":"my_shared_inbox_name","sort":"-received_at","archived":false,"received":true,"has_content":true,"exclude_dropbox_packages":false}'
|
|
8912
9272
|
packages receive <ID> --to-folder=.
|
|
@@ -8934,6 +9294,7 @@ remind --username=my_user_email --url=https://aoc.example.com/path
|
|
|
8934
9294
|
servers --url=https://aoc.example.com/path
|
|
8935
9295
|
tier_restrictions
|
|
8936
9296
|
user contacts list
|
|
9297
|
+
user file_upload_notifications list
|
|
8937
9298
|
user pref modify @: default_language=en-us
|
|
8938
9299
|
user pref show
|
|
8939
9300
|
user profile modify @: 'name=dummy change'
|
|
@@ -9162,6 +9523,10 @@ upload /test_file.bin --to-folder=my_upload_folder --transfer.agent=node --trans
|
|
|
9162
9523
|
upload test_file.bin --to-folder=my_inside_folder --ts=@json:'{"multi_session":3,"multi_session_threshold":1,"resume_policy":"none","target_rate_kbps":100000}' --transfer=@json:'{"spawn_delay_sec":2.5,"multi_incr_udp":false}' --progress-bar=yes
|
|
9163
9524
|
```
|
|
9164
9525
|
|
|
9526
|
+
The file commands (`ls`, `rm`, `mkdir`, ...) are executed by `ascmd`, which processes all the paths given, even after one failed, and reports each failed path with its error.
|
|
9527
|
+
The exit code (see [Exit status](#exit-status)) is then `4` when the file or folder is not found, `3` when the access is refused (permissions, or a path outside the docroot), else `7`.
|
|
9528
|
+
With several paths, it is `4` or `3` only when all failed for that reason.
|
|
9529
|
+
|
|
9165
9530
|
### Authentication on Server with SSH session
|
|
9166
9531
|
|
|
9167
9532
|
If SSH is the session protocol (by default, that is, not WSS), then the following session authentication methods are supported:
|
|
@@ -9171,6 +9536,9 @@ If SSH is the session protocol (by default, that is, not WSS), then the followin
|
|
|
9171
9536
|
|
|
9172
9537
|
If `username` is not provided then the default transfer user `xfer` is used.
|
|
9173
9538
|
|
|
9539
|
+
When the authentication fails, the command fails (exit code `3`): the password, or the passphrase of a key, is asked in a terminal only with `--interactive=yes`.
|
|
9540
|
+
Parameter `non_interactive` of option `ssh_options` overrides this.
|
|
9541
|
+
|
|
9174
9542
|
If neither SSH password nor key is provided and a transfer token is provided in transfer spec (option `ts`), then the standard SSH bypass keys are used.
|
|
9175
9543
|
|
|
9176
9544
|
Example:
|
|
@@ -9200,9 +9568,11 @@ For a list of SSH client options, refer to the Ruby documentation of [Net::SSH](
|
|
|
9200
9568
|
|
|
9201
9569
|
Among the 50 available SSH options:
|
|
9202
9570
|
|
|
9203
|
-
|
|
9204
|
-
|
|
9205
|
-
|
|
9571
|
+
| Field | Type | Description |
|
|
9572
|
+
| ---------- | ------ | -------------------------------------------------------------------------------- |
|
|
9573
|
+
| `passphrase` | `String` | Passphrase of the SSH private keys (also set by option `passphrase`). |
|
|
9574
|
+
| `use_agent` | `Bool` | Use the keys of a running `ssh-agent`.<br/>Default: `false`. |
|
|
9575
|
+
| `verbose` | | Log level of `Net::SSH`: an `Integer`, from `0` (debug) to `4` (fatal). Default: warnings. |
|
|
9206
9576
|
|
|
9207
9577
|
By default, the SSH library will check if a local `ssh-agent` is running.
|
|
9208
9578
|
|
|
@@ -9333,14 +9703,17 @@ Special parameters can be placed in option `query` for "gen3" browse:
|
|
|
9333
9703
|
|
|
9334
9704
|
This is when executing `browse` in `aoc files` or in `node access_keys do`.
|
|
9335
9705
|
|
|
9336
|
-
Option `node_api`
|
|
9706
|
+
Option `node_api` controls the use of the Node API, with the following parameters:
|
|
9707
|
+
|
|
9708
|
+
| Field | Type | Description |
|
|
9709
|
+
| -------------- | ---- | -------------------------------------------------------------------------------- |
|
|
9710
|
+
| `accept_v4` | `Bool` | `true`: use API header `Accept-Version: 4.0`. `false`: use the legacy method (refer to Node API).<br/>Default: `true`. |
|
|
9711
|
+
| `cache` | `Bool` | `true`: folder content is retrieved from the Redis database (faster). `false`: folder content is retrieved from storage.<br/>Default: `true`. |
|
|
9712
|
+
| `standard_ports` | `Bool` | `true`: use hard coded standard ports (`33001`). `false`: retrieve server ports from an API call (`download_setup`), which reads the information from `aspera.conf` on the server.<br/>Default: `true`. |
|
|
9337
9713
|
|
|
9338
|
-
|
|
9339
|
-
|
|
9340
|
-
|
|
9341
|
-
| `standard_ports` | `true` | `true` Use hard coded standard ports (`33001`)<br/>`false` Retrieve server ports from an API call (`download_setup`) which reads the information from `aspera.conf` on the server. |
|
|
9342
|
-
| `accept_v4` | `true` | `true` (default) uses API header: `Accept-Version: 4.0`.<br/>`false` uses legacy method (refer to node API). |
|
|
9343
|
-
| `per_page` | - | Requested number of items per API call.<br/>Set to `nil` (`@none:`) to deactivate paging.<br/>Default: `1000` when `accept_v4` is `true`. |
|
|
9714
|
+
The number of items requested per API call is the parameter `per_page` of option `query`.
|
|
9715
|
+
Set to `nil` (`@none:`) to deactivate paging.
|
|
9716
|
+
Default: `1000` when `accept_v4` is `true`.
|
|
9344
9717
|
|
|
9345
9718
|
### Operation `find` on **gen4/access key**
|
|
9346
9719
|
|
|
@@ -9715,7 +10088,7 @@ ascli node access_keys modify %id:self @ruby:'{token_verification_key: File.read
|
|
|
9715
10088
|
> [!NOTE]
|
|
9716
10089
|
> The Bearer token can also be created using command `asnodeadmin` on HSTS.
|
|
9717
10090
|
> See the [HSTS manual](https://www.ibm.com/docs/en/ahts): `Bearer tokens` section.
|
|
9718
|
-
> Code for token generation is provided in [`lib/aspera/
|
|
10091
|
+
> Code for token generation is provided in [`lib/aspera/plugins/node/api.rb`](../lib/aspera/plugins/node/api.rb)
|
|
9719
10092
|
|
|
9720
10093
|
#### Bearer token: User side
|
|
9721
10094
|
|
|
@@ -10037,7 +10410,7 @@ For more information on the JWT method, refer to the section below.
|
|
|
10037
10410
|
If you have generated a private key with the wizard and lost the public key, you can retrieve the public key like this:
|
|
10038
10411
|
|
|
10039
10412
|
```shell
|
|
10040
|
-
ascli faspex5 --show-config --out.secrets=yes --fields=private_key | ascli config pubkey @stdin:
|
|
10413
|
+
ascli faspex5 --show-config --out.secrets=yes --fields=private_key | ascli config pubkey @stdin:
|
|
10041
10414
|
```
|
|
10042
10415
|
|
|
10043
10416
|
### Faspex 5 JWT authentication
|
|
@@ -10053,8 +10426,9 @@ Activation is in two steps:
|
|
|
10053
10426
|
- As Admin, Navigate to the web UI: Admin → Configurations → API Clients → Create
|
|
10054
10427
|
- Give a name, like `ascli`
|
|
10055
10428
|
- Activate JWT
|
|
10056
|
-
-
|
|
10057
|
-
|
|
10429
|
+
- Leave **Global key** off, unless you want impersonation: with a global public key and **Access**: **All users**,
|
|
10430
|
+
the owner of the matching private key gets a token for any user.
|
|
10431
|
+
See [Faspex 5: Admin: Change the preferences of users](#faspex-5-admin-change-the-preferences-of-users).
|
|
10058
10432
|
- Click **Create**
|
|
10059
10433
|
- Take note of Client ID (and Client Secret, but not used in current version)
|
|
10060
10434
|
|
|
@@ -10159,7 +10533,7 @@ admin distribution_lists delete %name:test4
|
|
|
10159
10533
|
admin distribution_lists list --query.type=global
|
|
10160
10534
|
admin email_notifications list
|
|
10161
10535
|
admin email_notifications show welcome_email
|
|
10162
|
-
admin event application --query=@
|
|
10536
|
+
admin event application --query=@json:@extend:'{"event_type[]":["login_success"],"created_at_start":"@date:now-1h@"}'
|
|
10163
10537
|
admin event webhook
|
|
10164
10538
|
admin jobs list --query=@json:'{"job_type":"email","status":"failed"}' --fields=id,error_desc
|
|
10165
10539
|
admin metadata_profiles list
|
|
@@ -10603,6 +10977,37 @@ ascli faspex5 admin accounts modify %name:some.user@example.com @json:'{"account
|
|
|
10603
10977
|
|
|
10604
10978
|
To send a password reset link to a user, use command `faspex5 admin accounts reset_password <ACCOUNT_ID>`.
|
|
10605
10979
|
|
|
10980
|
+
### Faspex 5: Admin: Change the preferences of users
|
|
10981
|
+
|
|
10982
|
+
Command `faspex5 user profile modify` changes the preferences of the user of the token only (`PUT /api/v5/account/preferences`):
|
|
10983
|
+
`client_settings`, `rows_per_page`, `locale`, and so on.
|
|
10984
|
+
Command `faspex5 admin accounts modify` refuses them (error 1014: unpermitted parameter).
|
|
10985
|
+
|
|
10986
|
+
To change them for other users, an administrator creates an API client that allows impersonation.
|
|
10987
|
+
In the web UI: Admin → Configurations → API Clients → Create:
|
|
10988
|
+
|
|
10989
|
+
- **Enable JWT grant type**: checked (`allow_jwt_grant`)
|
|
10990
|
+
- **Authentication**: **Global key** (`allow_global_key`), and paste the public key of `<PRIVATE_KEY_FILE>` in **Global public key in PEM format** (`public_key`)
|
|
10991
|
+
- **Access**: **All users** (`access_grant_all_users`)
|
|
10992
|
+
|
|
10993
|
+
With the private key of this client, `ascli` gets a token for the user given in option `username`:
|
|
10994
|
+
|
|
10995
|
+
```shell
|
|
10996
|
+
ascli faspex5 user profile show --auth=jwt --client-id=<CLIENT_ID> --private-key=@file:<PRIVATE_KEY_FILE> --username=<USERNAME>
|
|
10997
|
+
```
|
|
10998
|
+
|
|
10999
|
+
> [!WARNING]
|
|
11000
|
+
> The private key of this client opens a session as any user: keep it secret, or delete the client after use.
|
|
11001
|
+
|
|
11002
|
+
`client_settings` is a JSON object in a string, written by the web UI, and a new value replaces the previous one.
|
|
11003
|
+
To change one key, read the value, change the key, and write the whole object.
|
|
11004
|
+
For example, key `transferClient` is the transfer client chosen by the user, `CONNECT` or `DESKTOP`.
|
|
11005
|
+
With options `url`, `auth`, `client_id` and `private_key` in the default preset:
|
|
11006
|
+
|
|
11007
|
+
```shell
|
|
11008
|
+
ascli faspex5 user profile show --username=<USERNAME> --format=text --out.query=@ruby:'->(p){(JSON.parse(p["client_settings"]) rescue {}).merge("transferClient"=>"DESKTOP").to_json}' | ascli faspex5 user profile modify --username=<USERNAME> @: client_settings=@stdin:chomp
|
|
11009
|
+
```
|
|
11010
|
+
|
|
10606
11011
|
### Faspex 5: Faspex 4-style post-processing
|
|
10607
11012
|
|
|
10608
11013
|
The command `ascli faspex5 postprocessing` emulates Faspex 4 post-processing script execution in Faspex 5.
|
|
@@ -10883,6 +11288,15 @@ share list
|
|
|
10883
11288
|
|
|
10884
11289
|
Listing transfers supports the API syntax.
|
|
10885
11290
|
|
|
11291
|
+
Query parameters `from` and `to` select the period (at most 24 hours), by default the last 24 hours.
|
|
11292
|
+
They also accept the syntax of [`@date:`](#dates), for example:
|
|
11293
|
+
|
|
11294
|
+
```shell
|
|
11295
|
+
ascli console transfer current list --query=@json:'{"from":"now-2h"}'
|
|
11296
|
+
```
|
|
11297
|
+
|
|
11298
|
+
A date without time zone is in UTC, as for Console, e.g. `2013-02-28 12:00:00`.
|
|
11299
|
+
|
|
10886
11300
|
In addition, it is possible to place a single `query` parameter in the request to filter the results: `filter`, following the syntax:
|
|
10887
11301
|
|
|
10888
11302
|
```text
|
|
@@ -11721,7 +12135,7 @@ trevents --once-only=yes --skip-types=office --log-level=info
|
|
|
11721
12135
|
|
|
11722
12136
|
## Plugin: `mcp`: Model Context Protocol server
|
|
11723
12137
|
|
|
11724
|
-
The `mcp` plugin starts a [Model Context Protocol (MCP)](https://modelcontextprotocol.io/) server that exposes `ascli` to AI assistants
|
|
12138
|
+
The `mcp` plugin starts a [Model Context Protocol (MCP)](https://modelcontextprotocol.io/) server that exposes `ascli` to AI assistants, LLM-based tools and agent builders such as [Langflow](#langflow).
|
|
11725
12139
|
The server registers a single tool, `execute_ascli_command`, which executes any `ascli` command in-process and returns the result as text.
|
|
11726
12140
|
|
|
11727
12141
|
> [!IMPORTANT]
|
|
@@ -11813,15 +12227,19 @@ With the `http` transport:
|
|
|
11813
12227
|
|
|
11814
12228
|
With both transports:
|
|
11815
12229
|
|
|
11816
|
-
- Extended value `@stdin:` is refused
|
|
12230
|
+
- Extended value `@stdin:` is refused, and so is the argument `-` (standard input, `@stdin:stream`) of `config ascp logs` and `sync logs`.
|
|
12231
|
+
- Commands sent by the client run in the main folder of the server (option `home`, `ASCLI_HOME`, or the default one), and use its configuration file (option `config_file`) and its vault (options `vault` and `vault_password`, also when set in a preset of the server).
|
|
12232
|
+
The client cannot change them: these options are refused at levels `medium` and `high`.
|
|
12233
|
+
If the command line of the server sets option `security` to `medium` or `high`, the server cannot set them on its command line: set them in its environment, for example `ASCLI_VAULT` and `ASCLI_VAULT_PASSWORD`.
|
|
11817
12234
|
- `@secret:` is entered by the user on a web page, see [Secrets entered in a web page](#secrets-entered-in-a-web-page).
|
|
11818
12235
|
- Secrets are hidden in responses, also a value shorter than 8 characters as a word in a text (for example, a short password in an error message).
|
|
11819
12236
|
- The [Security Level](#security-level) is `high` by default: `@ruby:`, `@file:` (also in the parameters of stores of option `vault`), `@uri:`, `@env:`, and `@zlib:` are refused, and a secret must be the whole value: hidden in results, it cannot be processed by another extended value.
|
|
11820
|
-
It applies to commands sent by the client, and to presets
|
|
12237
|
+
It applies to commands sent by the client, and to presets of the server.
|
|
12238
|
+
The configuration of the server (presets and vault) is read-only for the client, and a secret of the configuration is sent only to a URL of the configuration: the client uses the presets of the server, but cannot send their secrets to another host.
|
|
11821
12239
|
Commands sent by the client cannot change option `security`.
|
|
11822
12240
|
Features that execute code, such as option `notify_template` or command `config plugins create`, plugins, and writing to a file chosen by the client (option `out.file`), are refused, see [Security Level](#security-level).
|
|
11823
|
-
|
|
11824
|
-
|
|
12241
|
+
A transfer agent that runs on the system of the server, such as `direct` (the default), is refused: a transfer uses a remote agent, for example agent `node` (`--transfer=node`), which sends and receives the files on the node.
|
|
12242
|
+
Other files written on the system that runs the server (for example by `config download`) go only in `writable_paths`, none by default.
|
|
11825
12243
|
|
|
11826
12244
|
To use another level, set option `security` when starting the server, for example:
|
|
11827
12245
|
|
|
@@ -11829,14 +12247,18 @@ To use another level, set option `security` when starting the server, for exampl
|
|
|
11829
12247
|
ascli mcp server --security.level=medium --security.allowed_paths.0=$HOME/.aspera/ascli/my_private_key
|
|
11830
12248
|
```
|
|
11831
12249
|
|
|
11832
|
-
To let the client download files
|
|
12250
|
+
To let the client download files to a folder of the system that runs the server, use level `medium`, which allows a local agent (for example `direct`), and give the folder:
|
|
11833
12251
|
|
|
11834
12252
|
```shell
|
|
11835
|
-
ascli mcp server --security.writable_paths.0=$HOME/Downloads/ascli
|
|
12253
|
+
ascli mcp server --security.level=medium --security.writable_paths.0=$HOME/Downloads/ascli
|
|
11836
12254
|
```
|
|
11837
12255
|
|
|
12256
|
+
At level `medium`, a local agent also sends any file that the server can read, for example its configuration file: use it with a client that you trust.
|
|
12257
|
+
Or keep the level `high`, and use agent `node`: the files are received on the node, not on the system that runs the server.
|
|
12258
|
+
|
|
11838
12259
|
> [!NOTE]
|
|
11839
12260
|
> A level set by option also applies to the parameters of the `server` command: for example, `auth_token=@env:MCP_TOKEN` requires level `low`.
|
|
12261
|
+
> At levels `medium` and `high`, read the token from the standard input instead, for example: `printenv MCP_TOKEN | ascli mcp server --security.level=medium @: transport=http url=http://0.0.0.0:3000 auth_token=@stdin:chomp`.
|
|
11840
12262
|
> Without option `security`, the parameters of the `server` command are not restricted.
|
|
11841
12263
|
>
|
|
11842
12264
|
> A preset created by `aoc wizard` or `faspex5 wizard` reads the private key with `@file:`.
|
|
@@ -12145,6 +12567,81 @@ Add the `RUBYLIB` environment variable pointing to the `lib/` directory of the p
|
|
|
12145
12567
|
}
|
|
12146
12568
|
```
|
|
12147
12569
|
|
|
12570
|
+
#### Langflow
|
|
12571
|
+
|
|
12572
|
+
[Langflow](https://docs.langflow.org/) is an open-source visual builder of AI agents.
|
|
12573
|
+
An agent built with Langflow operates IBM Aspera products with `ascli` through the **MCP Tools** component, an MCP client (`stdio`, and Streamable HTTP since Langflow 1.7): no code to write.
|
|
12574
|
+
|
|
12575
|
+
##### Register the server in Langflow
|
|
12576
|
+
|
|
12577
|
+
In Langflow, click the profile icon, select **Settings**, then **MCP Servers**, and click **Add MCP Server**.
|
|
12578
|
+
|
|
12579
|
+
With the `stdio` transport, when `ascli` is installed on the host of Langflow, select **STDIO**:
|
|
12580
|
+
|
|
12581
|
+
| Field | Value |
|
|
12582
|
+
|-------|-------|
|
|
12583
|
+
| **Name** | `ascli` |
|
|
12584
|
+
| **Command** | Absolute path of `ascli`, given by `which ascli` (Windows: `where ascli`) |
|
|
12585
|
+
| **Arguments** | `mcp`, then `server` |
|
|
12586
|
+
|
|
12587
|
+
With the `http` transport, for example when Langflow runs in a container (its image has no Ruby), start the server with a static token (the MCP client of Langflow does not support OAuth):
|
|
12588
|
+
|
|
12589
|
+
```shell
|
|
12590
|
+
export MCP_TOKEN=$(openssl rand -hex 32)
|
|
12591
|
+
ascli mcp server @: transport=http url=http://0.0.0.0:3000 auth_token=@env:MCP_TOKEN
|
|
12592
|
+
```
|
|
12593
|
+
|
|
12594
|
+
`ascli` can also run in its own container, next to Langflow: the [container image](#container) includes the gems `mcp` and `rack`.
|
|
12595
|
+
To keep the presets and the transferred files, mount the configuration folder and a transfer folder (see [Container: Details](#container-details)).
|
|
12596
|
+
The transfers run in the container, with the local agent `direct`: use level `medium`, and let the agent write files in the transfer folder only (see [Security](#security)).
|
|
12597
|
+
At level `medium`, `@env:` is refused, also in the parameters of the server: the token is read from the standard input (`@stdin:chomp`).
|
|
12598
|
+
As user `root`, set the SDK folder of the image (`/home/cliuser/.aspera/sdk`), else `ascp` is looked for in `/root/.aspera/sdk`.
|
|
12599
|
+
With the same variable `MCP_TOKEN`:
|
|
12600
|
+
|
|
12601
|
+
```shell
|
|
12602
|
+
printenv MCP_TOKEN | podman run --interactive --rm --name ascli --publish 3000:3000 --user root --env ASCLI_HOME=/home/cliuser/.aspera/ascli --env ASCLI_SDK_FOLDER=/home/cliuser/.aspera/sdk --volume $HOME/.aspera/ascli:/home/cliuser/.aspera/ascli --volume $HOME/xferdir:/xferfiles docker.io/martinlaurent/ascli:latest mcp server --security.level=medium --security.writable_paths.0=/xferfiles @: transport=http url=http://0.0.0.0:3000 auth_token=@stdin:chomp
|
|
12603
|
+
```
|
|
12604
|
+
|
|
12605
|
+
The agent then uploads from, and downloads to, folder `/xferfiles`.
|
|
12606
|
+
|
|
12607
|
+
Then, in Langflow:
|
|
12608
|
+
|
|
12609
|
+
1. In **Settings** > **Global Variables**, create a **Credential** variable, for example `ASCLI_MCP_TOKEN`, with value `Bearer` followed by a space and the token.
|
|
12610
|
+
1. In **Add MCP Server**, select **HTTP/SSE**:
|
|
12611
|
+
- **Name**: `ascli`
|
|
12612
|
+
- **URL**: `http://<HOST>:3000/mcp`.
|
|
12613
|
+
When Langflow runs in Docker Desktop and `ascli` on the host (or with a published port): `http://host.docker.internal:3000/mcp`.
|
|
12614
|
+
When both containers are on the same network (option `--network`, or the same Docker Compose project): the name of the container (or of the service) of `ascli`, for example, `http://ascli:3000/mcp`.
|
|
12615
|
+
- **Headers**: key `Authorization`, value `ASCLI_MCP_TOKEN` (the name of the variable: Langflow replaces it with its value)
|
|
12616
|
+
|
|
12617
|
+
##### Add `ascli` to an agent
|
|
12618
|
+
|
|
12619
|
+
1. From the **MCP** sidebar, drag the server `ascli` to the flow: it adds an **MCP Tools** component.
|
|
12620
|
+
1. In field **Tool**, select `execute_ascli_command`.
|
|
12621
|
+
1. In the header menu of the component, enable **Tool mode**.
|
|
12622
|
+
1. Connect the port **Toolset** of the component to the port **Tools** of the **Agent** component.
|
|
12623
|
+
|
|
12624
|
+
Langflow gives the model the description of the tool, but not the instructions of the server.
|
|
12625
|
+
So that the agent uses `ascli` for requests about Aspera, and the presets for credentials, add this text to field **Agent Instructions** of the **Agent** component:
|
|
12626
|
+
|
|
12627
|
+
```text
|
|
12628
|
+
For any request about IBM Aspera, use the tool execute_ascli_command: file transfer (FASP), Aspera on Cloud (aoc), Faspex 5 (faspex5), Node API (node), HSTS and SSH servers (server), Shares (shares), Orchestrator (orchestrator), Console (console), IBM Cloud Object Storage (cos).
|
|
12629
|
+
Before a command whose syntax you have not checked in this conversation, list the commands of the plugin with ["config","commands","<PLUGIN>"], and get the fields of a Hash argument with "help" in its place.
|
|
12630
|
+
Credentials are in presets: list them with ["config","preset","overview"] and use --preset=<PRESET_NAME>. Never ask the user for a password: if no preset fits, tell the user which preset to create.
|
|
12631
|
+
A transfer returns immediately with a job_id: check it with ["config","agents","jobs","status","<JOB_ID>"].
|
|
12632
|
+
Filter long lists with --query, --out.select and --out.fields.
|
|
12633
|
+
```
|
|
12634
|
+
|
|
12635
|
+
##### Limits of Langflow
|
|
12636
|
+
|
|
12637
|
+
- **Secrets**: the MCP client of Langflow does not support URL mode elicitation: `@secret:` fails (see [Secrets entered in a web page](#secrets-entered-in-a-web-page)).
|
|
12638
|
+
Create the presets beforehand, with secrets in the [Secret Vault](#secret-vault).
|
|
12639
|
+
- **Results**: Langflow gives the model the text of the result only, not `structuredContent`.
|
|
12640
|
+
A list larger than `max_text_bytes` (100000 bytes by default) is truncated for the model: filter it (see [Filtering results](#filtering-results)), or raise `max_text_bytes`.
|
|
12641
|
+
- **Timeout**: a tool call fails after 180 seconds by default.
|
|
12642
|
+
The MCP server starts transfers in [asynchronous mode](#asynchronous-transfer-mode): a transfer returns immediately.
|
|
12643
|
+
For other long commands, raise **Tool Execution Timeout (seconds)** in the advanced settings of the **MCP Tools** component, or the environment variable `LANGFLOW_MCP_TOOL_EXECUTION_TIMEOUT` of Langflow.
|
|
12644
|
+
|
|
12148
12645
|
### Tested commands for `mcp`
|
|
12149
12646
|
|
|
12150
12647
|
> [!NOTE]
|
|
@@ -12352,6 +12849,11 @@ The following parameters are automatically filled from mandatory arguments, and
|
|
|
12352
12849
|
Parameter `name` is set to a default value if not provided in `sync_info`.
|
|
12353
12850
|
Parameter `quiet` is set to `false` if not provided in `sync_info` and a terminal is detected.
|
|
12354
12851
|
|
|
12852
|
+
> [!NOTE]
|
|
12853
|
+
> The configuration is passed to `async` on its command line (`--conf64`, the base64 of the JSON), which is visible to the other users of the host (for example with `ps`).
|
|
12854
|
+
> The remote password and token (`remote.pass`, `remote.token`) are **not** put there: they are passed in the environment variables `ASPERA_SCP_PASS` and `ASPERA_SCP_TOKEN`, which `async` reads when they are absent from the configuration.
|
|
12855
|
+
> `async` has no environment variable for the other secrets it reads only from the configuration (the proxy password, and `local.pass`): these stay in `--conf64`. They are hidden in the logs of `ascli`, but a user of the host can still read them (base64) while `async` runs. Prefer token-based authentication, or run on a host where other users are trusted.
|
|
12856
|
+
|
|
12355
12857
|
The documentation is available in the terminal with:
|
|
12356
12858
|
|
|
12357
12859
|
```shell
|
|
@@ -12520,6 +13022,8 @@ The `admin` command provides subcommands to inspect the state of an Async sync s
|
|
|
12520
13022
|
Most subcommands read the local snap database (`snap.db`) directly - no server connection is required.
|
|
12521
13023
|
The exception is `status`, which calls the `asyncadmin` utility available only on server products.
|
|
12522
13024
|
|
|
13025
|
+
The snap database is opened **read-only** (even with option `sql`), so the `admin` subcommands never modify it, even while `async` is synchronizing.
|
|
13026
|
+
|
|
12523
13027
|
These commands can also be run from the `config` plugin:
|
|
12524
13028
|
|
|
12525
13029
|
```shell
|
|
@@ -12685,6 +13189,30 @@ ascli ... sync admin file_info <FOLDER> --sql="WHERE state=20 ORDER BY f_meta_pa
|
|
|
12685
13189
|
| `tobe_deleted` | `Integer` | Set to 1 when the record is flagged for deletion (garbage collection pending). |
|
|
12686
13190
|
| `version` | `Integer` | Schema version field (not used). |
|
|
12687
13191
|
|
|
13192
|
+
#### Sync log analysis: `logs`
|
|
13193
|
+
|
|
13194
|
+
The `logs` command reads the `async` log files of the local host and reports only the **notable** events, skipping the bulk of the log (synchronized files, transfers, periodic statistics):
|
|
13195
|
+
|
|
13196
|
+
- File conflicts and errors: a `SYNC FILE STOP` line with `status=CONFLICT` or `status=ERROR` (a conflict is reported until both copies are identical).
|
|
13197
|
+
- Unsupported file-system events (`Unsupported file system event`).
|
|
13198
|
+
- Session lifecycle: session `start`, `stop` and `idle`.
|
|
13199
|
+
- Any `ERR`-level line (for example a connection or algorithm error).
|
|
13200
|
+
|
|
13201
|
+
```shell
|
|
13202
|
+
ascli ... sync logs [<PATHS>...]
|
|
13203
|
+
```
|
|
13204
|
+
|
|
13205
|
+
- `<PATHS>` - one or more `async` log files (`gzip` is supported), folders (only the `async*.log` files in them are read), or `-` for the standard input.
|
|
13206
|
+
- When no path is given, the log at the default location of the local host is read: `~/Library/Logs/Aspera/async.log` on macOS, the `syslog` files on Linux and Unix (`async` logs to `syslog`); on Windows `async` logs in its own working folder, so a path must be given.
|
|
13207
|
+
|
|
13208
|
+
The result is a list with the fields: `time`, `level`, `session` (pair name), `kind`, `path`, `status` and `detail`. Filter it with the standard output options, for example to show only conflicts:
|
|
13209
|
+
|
|
13210
|
+
```shell
|
|
13211
|
+
ascli config sync logs --out.select=@json:'{"kind":"file conflict"}'
|
|
13212
|
+
```
|
|
13213
|
+
|
|
13214
|
+
> **Note:** as for any command that reads a local path chosen by the client, the paths are checked against the security level (option `security`): reading is refused at level `high` and limited to `allowed_paths` at level `medium` (see [Security Level](#security-level)).
|
|
13215
|
+
|
|
12688
13216
|
### Hot folder
|
|
12689
13217
|
|
|
12690
13218
|
`ascli` does **not** have a standalone `hotfolder` command.
|
|
@@ -12821,7 +13349,7 @@ The `smtp` option is a `Hash` ([Extended Value](#extended-value-syntax)) with th
|
|
|
12821
13349
|
|
|
12822
13350
|
| Field | Type | Description |
|
|
12823
13351
|
| ---------- | ------- | -------------------------------------------------------------------------------- |
|
|
12824
|
-
| `domain` | `String` | Email domain of the user. Defaults to the domain part of `
|
|
13352
|
+
| `domain` | `String` | Email domain of the user. Defaults to the domain part of `from_email`.<br/>Example: `gmail.com`. |
|
|
12825
13353
|
| `from_email` | `String` | Sender address (used in `From:` header and as reply-to). Defaults to `username` when defined.<br/>Example: `johnny@example.com`. |
|
|
12826
13354
|
| `from_name` | `String` | Display name of the sender. Defaults to the local-part of `from_email`.<br/>Example: `John Wayne`. |
|
|
12827
13355
|
| `password` | `String` | Password for the above `username`.<br/>Example: `<PASSWORD>`. |
|
|
@@ -13020,7 +13548,9 @@ EXAMPLES
|
|
|
13020
13548
|
Main components:
|
|
13021
13549
|
|
|
13022
13550
|
- `Aspera` generic classes for REST and OAuth
|
|
13023
|
-
- `Aspera::
|
|
13551
|
+
- `Aspera::Plugins::Direct::Agent`: Starting and monitoring transfers using `ascp`.
|
|
13552
|
+
- `Aspera::Plugins::<Name>`: the code of each product (bundle `lib/aspera/plugins/<name>/`): `Api` (client of the product API, e.g. `Aspera::Plugins::Node::Api`), `Agent`, `Commands`. The files other than `commands.rb` do not use the command line: `require 'aspera/plugins/<name>/api'`.
|
|
13553
|
+
- `Aspera::Agent::Factory.instance.create(<AGENT>, <OPTIONS>)`: creates a transfer agent by its name (`direct`, `node`, ...).
|
|
13024
13554
|
- `Aspera::Cli`: `ascli`.
|
|
13025
13555
|
|
|
13026
13556
|
Working examples can be found in repo: <https://github.com/laurent-martin/aspera-api-examples> in Ruby examples.
|