Epic: gh-style commands for Source Cooperative
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 20/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- rust
- Domain
- api, backend-api-design, cli
Research direction
Start with the existing CLI authentication and STS credential flows, then read the /api/v1 endpoint contract and published OpenAPI document. The source-coop api command is explicitly first and should support arbitrary methods, paths, fields, input files, and API error output. The epic is done only when its command groups and documentation paths are implemented as their dependent endpoints become available.
Written by the indexing model from the issue text.
Description
Tracks the CLI half of source-cooperative/source.coop#588.
Goal
source-coop becomes to Source Cooperative what gh is to GitHub: every task a person can do in the web UI can be done from a terminal or a script. The CLI already handles login (OIDC with PKCE) and STS credentials. This epic adds commands on top of the /api/v1 endpoints that the source.coop epic builds. Those endpoints enforce exactly the same validation as the web UI, so the CLI validates nothing itself: it sends the request and shows the API's field_errors.
Conveniences, modeled on gh
source-coop api <method> <path> [-f key=value] [--input file]: thegh apiequivalent. It works with any endpoint as soon as the endpoint ships, before a dedicated command exists. Build it first.--json <fields>and--jq <expr>on every read, and a table when output is a TTY.--webopens the matching source.coop page.account/productshorthand, e.g.source-coop product view radiant/landcover.- Interactive prompts for missing required arguments when a TTY is attached, and none otherwise.
- Authentication through the existing cached login, or a service account's API key (#20), sent as
Authorization: Bearer. --helpand any generated request types come from the published OpenAPI document atsource.coop/api/openapi.
Commands
Each command group depends on the source.coop sub-issue that ships its endpoints.
-
api: needs only the existing API -
auth status:GET /whoami(source-cooperative/source.coop#592) -
product list | view | create | edit | delete(source-cooperative/source.coop#590) -
product mirror list | add | edit | remove(source-cooperative/source.coop#591) -
member list | add | edit | remove,invite list | accept | reject(source-cooperative/source.coop#589) -
org create,account view | edit | search(source-cooperative/source.coop#592) -
connection list | view | create | edit | delete(source-cooperative/source.coop#593) -
service-account list | create | disable | delete,service-account trust add | remove(SERVICE_source-cooperative/source.coop#592), andservice-account key create | revoke(source-cooperative/source.coop#570) -
ls | cp | rm | syncfor product files, run against the data proxy's S3 API with the CLI's own STS credentials. These need no source.coop endpoint.
repo info (#16) folds into product view --json once the product endpoints land.
Docs
docs.source.coop docs/using-source/ gains a CLI path wherever a flow gets one.
- Dominant language
- Rust
- Stars
- 1
- Forks
- 0
- Avg merge
- 18h 52m
- Merged PRs (30d)
- 19
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from source-cooperative/source-coop-cli
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 28/100
source-cooperative/source-coop-cli#35 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 3/5 3-5 days Newbie friendliness 22/100
source-cooperative/source-coop-cli#34 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 28/100
source-cooperative/source-coop-cli#33 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 35/100
source-cooperative/source-coop-cli#32 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 3/5 1-2 days Newbie friendliness 28/100
source-cooperative/source-coop-cli#31 ·
Maintainers usually reply within 1 day
All issues in source-cooperative/source-coop-cli
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
Maintainers usually reply within 3 days
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Zellij doesn't validate hex colors correctly and crashesPossibly taken @ymcx claimed this today. Opensuspected bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
zellij-org/zellij#5732 ·
Maintainers usually reply within 1 day
-
bug(api): E_DOSE_ATTR_NONFINITE for a modeled D/R still says the value "never reaches you as a NaN"Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 63/100