Skip to content

docs: write the CLI user guide - #122

Merged
uniqueg merged 2 commits into
mainfrom
docs/110-cli-user-guide
Nov 10, 2026
Merged

uniqueg merged 2 commits into
mainfrom
docs/110-cli-user-guide

Conversation

@uniqueg

@uniqueg uniqueg commented Nov 10, 2026 •

Copy link
Copy Markdown
Member

Summary

Rewrites the researcher page "Use the Command Line" (docs/researchers/cli.md) as the end-user guide for ga4gh-cli with ELIXIR On-Cloud, for ga4gh/ga4gh-sdk main at commit 8b8030f. The old page described commit 82432c3, before the CLI took API roots, so it said proTES couldn't work; that's no longer true.

Outline:

The researchers index row is updated to match. The page was already in the mkdocs.yml nav.

Closes #123

Part of #110; login, submission through the gateway and workflow runs follow in #124 (blocked by ga4gh/ga4gh-sdk#90 and #105).

Light lane: docs only. I reviewed the diff myself against cli/src of the SDK; every command and flag shown exists there.

Verification

  • python scripts/check_names.py: passed
  • mkdocs build --strict: passed, no warnings
  • pytest: 25 passed, 100% coverage
  • Built ga4gh-cli at 8b8030f in rust:1.97 (cargo build -p ga4gh-cli --locked) and compared all --help outputs with the page
  • registry list, list --type tes, get, types against the public Cloud Registry, anonymously: output as shown
  • All tes and drs commands on the page against a local mock with the APIs at /ga4gh/tes/v1 and /ga4gh/drs/v1: right paths and query parameters, output as shown; with a dummy token in the config, no request carried an Authorization header
  • CI: all checks passed (PR title, Docs, Test, CI passed, CodeQL, Read the Docs preview)
  • Not tested: a deployed TES or DRS service (none published for researchers yet, and the CLI can't send tokens)

Notes

The issue also mentions logging in and running a workflow, and "works against the deployed services". The CLI can't do either yet, so the page documents what works now and marks the rest as planned, with the SDK issues linked. The page will need an update when ga4gh/ga4gh-sdk#105, #115 and #31 land; #124 tracks that.

🤖 Generated with Claude Code

https://claude.ai/code/session_011FSoqMpmDCfbACLj3uy6xV

Rewrite the CLI page for ga4gh-sdk main (8b8030f): install with
cargo install, configure API roots per service (REGISTRY, TES, DRS),
find services in the Cloud Registry with the registry commands, run
TES tasks, look up DRS objects, and list what's planned (WES, TRS,
token support, device login, profiles, binaries) with links to the
SDK issues. Tokens are still not sent, so the curl fallback stays.

Closes #110

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_011FSoqMpmDCfbACLj3uy6xV
@sourcery-ai

sourcery-ai Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Reviewer's Guide

Documentation

Rewrite the CLI guide as a tested end-user reference for installing and configuring ga4gh-cli, discovering Cloud Registry services, using TES and DRS, and understanding authentication limits and planned features.

  • docs/researchers/cli.md L85-155, L263-318, L359-402 (+11 small edits)

Update the researchers index entry to reflect the CLI's current supported services and requirements.

  • docs/researchers/index.md L13

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@read-the-docs-community

read-the-docs-community Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

Documentation build overview

📚 elixir-on-cloud-docs | 🛠️ Build #35790542 | 📁 Comparing b778849 against latest (0ea20dd)

  🔍 Preview build  

2 files changed
± researchers/index.html
± researchers/cli/index.html

@uniqueg
uniqueg marked this pull request as ready for review November 10, 2026 16:47
@sourcery-ai

sourcery-ai Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Linked issues

Checked at commit b778849

#123 docs: document the current CLI · 6 of 7 met · 1 to check by hand

# Requirement Status Notes
1 Document how to install the CLI from the pinned SDK commit. ✅ Met The install steps check out commit 8b8030f and use cargo install --path cli --locked.
2 Document configuration for ELIXIR On-Cloud, including service API roots. ✅ Met The guide shows REGISTRY, TES and DRS sections and explains that base_path is the API root, including the proTES path.
3 Document finding services in the Cloud Registry and using a registry entry as a service address. ✅ Met The guide covers registry list, list --type, get and types, and explains how to set base_path from a service URL.
4 Document TES and DRS commands. ✅ Met The guide covers TES create, list, get, status and cancel, and DRS get and access.
5 Keep a curl fallback for using APIs with an LS Login token. ✅ Met The guide explains that the CLI does not send tokens and includes curl examples for TES and WES.
6 List planned features, including login, WES and TRS, with links to their SDK issues. ✅ Met The planned-features table links WES, TRS, token sending and device login to their SDK issues.
7 Ensure every documented command and flag matches the CLI at the pinned commit. 👀 Check by hand (external system) The guide says these were checked against the SDK source and help output, but a person must verify them against the external SDK repository at commit 8b8030f.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've found 4 issues

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location path="docs/researchers/cli.md" line_range="279" />
<code_context>
+```
+
+The answer can contain headers that you need to download the bytes. The CLI
+doesn't download them; use a tool such as `curl` with the URL. Both commands
+end with the exit code `1` on errors and `2` on missing arguments, like the
+`tes` commands.
</code_context>
<issue_to_address>
**DRS access URLs leak credentials**

When a DRS service returns a signed or bearer-capability URL and the researcher passes the literal URL to `curl`, `curl` receives the capability URL as an argument, exposing it in process listings and, when entered literally, shell history; anyone who can read either can fetch the object.

Warn that access URLs may be credentials and show a way to pass them to `curl` without putting them in command arguments or shell history.
</issue_to_address>

### Comment 2
<location path="docs/researchers/cli.md" line_range="57" />
<code_context>
-## Configure
+```bash
+mkdir -p ~/.ga4gh-cli
+cat > ~/.ga4gh-cli/config.json <<'JSON'
+{
+  "REGISTRY": {
</code_context>
<issue_to_address>
**Existing service settings disappear**

When the config already contains TES or DRS settings, or the heredoc write is interrupted, `cat >` truncates the existing config before writing the registry-only example, discarding those settings; an interrupted write leaves invalid JSON and CLI commands fail.

Change the instructions to preserve existing service sections and write config updates atomically.
</issue_to_address>

### Comment 3
<location path="docs/researchers/cli.md" line_range="255" />
<code_context>
 ```bash
-TASK_ID=$(cli tes create task.json)
-if [ -z "$TASK_ID" ]; then
+if ! TASK_ID=$(ga4gh-cli tes create task.json); then
   echo "The task was not created" >&2
   exit 1
</code_context>
<issue_to_address>
**Retries create duplicate tasks**

When the TES service accepts the create request but the response is lost or times out, the CLI returns an error and the script reports that the task was not created, so retrying creates a second task and duplicate executions.

Treat this outcome as unknown and instruct users to verify whether the task exists before retrying.
</issue_to_address>

### Comment 4
<location path="docs/researchers/cli.md" line_range="267" />
<code_context>
+an object, by its ID:
+
+```bash
+ga4gh-cli drs get <OBJECT_ID>
+```
+
</code_context>
<issue_to_address>
**DRS commands fail when copied**

When a reader copies either DRS command without replacing its angle-bracket placeholder, the shell parses `<OBJECT_ID>` or `<ACCESS_ID>` as redirection syntax, so the command fails before `ga4gh-cli` runs and the reader cannot look up the object as shown.

Use shell-safe placeholders and explain that readers must substitute the object or access ID before running the commands.

Also at `docs/researchers/cli.md:275`.
</issue_to_address>

Sourcery assessment

Approval pending. 4 findings to address first.

Blocking findings: docs/researchers/cli.md:279, docs/researchers/cli.md:57, docs/researchers/cli.md:255, docs/researchers/cli.md:267


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

Comment thread docs/researchers/cli.md Resolved
Comment thread docs/researchers/cli.md Resolved
Comment thread docs/researchers/cli.md Resolved
Comment thread docs/researchers/cli.md Resolved
Keep an existing config file, warn that a failed tes create can still
have created a task, use shell-safe DRS placeholders, and pass signed
access URLs to curl through stdin.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_011FSoqMpmDCfbACLj3uy6xV

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New gaps against the linked issues

Comment thread docs/researchers/cli.md Resolved
Comment thread docs/researchers/cli.md Resolved
@uniqueg
uniqueg merged commit db5e94f into main Nov 10, 2026
14 of 17 checks passed
@uniqueg
uniqueg deleted the docs/110-cli-user-guide branch November 10, 2026 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs: document the current CLI

1 participant