defendable-science — a CLI for honest, defensible AI-assisted research (tooling for the defendable-science plugin)
Project description
Defendable Science
Research you can defend.
Defendable Science helps you keep research honest — especially now that AI is in the loop. You (not the AI) make and sign off every material decision, and you must be able to explain and defend the work; the tool keeps the accounts, advises, and probes. It supports honest, disclosable AI-assisted research — it does not certify that any work is honest.
This package is the CLI / tooling behind the
defendable-science Claude Code plugin.
The plugin (skills + methodology) stays pure-markdown; this package provides the
defendable-science command it calls — literature, dataset, defend, backlog,
and doctor — installed isolated, so it never touches your project's ML
environment.
Install
uv tool install defendable-science # recommended (isolated tool env)
# or: pipx install defendable-science
# or: pip install defendable-science
defendable-science --version
defendable-science doctor # reports python / uv / rclone
Documentation: https://defendable.science/
CLI
defendable-science --version
defendable-science doctor # environment report
defendable-science literature resolve|cites|refs|enrich|neighbors # citation graph (OpenAlex + S2)
defendable-science dataset validate|ingest|emit # manifest + Croissant
defendable-science dataset fetch|verify|mirror|audit # SHA-256 retrieval + rclone mirror
defendable-science defend record # understanding-status record
defendable-science backlog park|add|list|rank|promote|drop # exploration backlog
defendable-science keys set|list|check|unset|path # API-key & credential store
Every command is implemented and emits JSON (the skills parse it). Failures are
surfaced honestly: a rate-limit or transient network error is retried with
backoff (honoring Retry-After) and, if it persists, reported as a distinct,
actionable message — never a silent "not found" and never a traceback. A missing
API key or rclone binary is reported cleanly, and an optional key (e.g.
S2_API_KEY) simply lifts the rate ceiling — see
API keys & credentials.
API keys & credentials
Some services throttle hard without a key. Providing one is optional (the tooling degrades gracefully) but lifts the ceiling:
| Key | Service | What it buys | How to obtain |
|---|---|---|---|
S2_API_KEY |
Semantic Scholar | Rate limit well above the shared keyless pool. | https://www.semanticscholar.org/product/api#api-key |
OPENALEX_MAILTO |
OpenAlex | The "polite pool" (a contact email) — faster, more reliable. | https://docs.openalex.org/how-to-use-the-api/rate-limits-and-authentication |
RCLONE_CONFIG_<REMOTE>_* |
Private dataset mirror | rclone remote credentials passed as scoped env vars (no config file). | Per your rclone remote. |
Keys live in a CLI-managed JSON store at .defendable-science/keys.json
(gitignored, created 0600), read with os.environ > store > unset
precedence, so an environment variable always wins. Manage it with keys:
defendable-science keys set S2_API_KEY # hidden prompt, or reads piped stdin
echo "$MY_KEY" | defendable-science keys set S2_API_KEY
defendable-science keys set < keys.json # a JSON object sets many at once
defendable-science keys list # presence + source (never the value)
defendable-science keys check | unset | path
The value is read only from stdin or a hidden prompt — never argv — so it never
hits your shell history or the process list, and list/check/doctor report
presence only.
Plaintext at rest. The store is not encrypted; gitignore +
0600limit exposure but are not a vault. OS-keychain backing is a planned follow-up (#49).
Learn more
- Documentation: https://defendable.science/
- User guide: https://defendable.science/get-started/user-guide
- Plugin, source & full design record: https://github.com/davorrunje/defendable-science
- Disclose your AI use & cite Defendable Science: https://github.com/davorrunje/defendable-science/blob/main/DISCLOSURE.md
Changelog
https://github.com/davorrunje/defendable-science/blob/main/CHANGELOG.md
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file defendable_science-0.2.0.tar.gz.
File metadata
- Download URL: defendable_science-0.2.0.tar.gz
- Upload date:
- Size: 51.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1ece5cffc3645aa1019b51a8b77af2221d13b36b3203ed7e655c3fa70854295f
|
|
| MD5 |
c5481fdcc4090acda1c751dd56fd09b1
|
|
| BLAKE2b-256 |
038af6f44892244db67b1e0f13378aa02424499e35b6325d922a41f3182b42c3
|
Provenance
The following attestation bundles were made for defendable_science-0.2.0.tar.gz:
Publisher:
publish.yml on davorrunje/defendable-science
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
defendable_science-0.2.0.tar.gz -
Subject digest:
1ece5cffc3645aa1019b51a8b77af2221d13b36b3203ed7e655c3fa70854295f - Sigstore transparency entry: 2269121195
- Sigstore integration time:
-
Permalink:
davorrunje/defendable-science@f437e86fbc02141eb93d8e0d85ab5e5dd398dac3 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/davorrunje
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@f437e86fbc02141eb93d8e0d85ab5e5dd398dac3 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file defendable_science-0.2.0-py3-none-any.whl.
File metadata
- Download URL: defendable_science-0.2.0-py3-none-any.whl
- Upload date:
- Size: 57.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8caa9c722bd32dd5099b09f14cf12167f02d723fc969ec2aceb8a4c05e3323c3
|
|
| MD5 |
787e90be27af7ceeaaac42901bd17b14
|
|
| BLAKE2b-256 |
fb5a86cf3bf49bcdbe5ae10ca486d4df685d78d881efbd2bb6739d64a0ee9b7f
|
Provenance
The following attestation bundles were made for defendable_science-0.2.0-py3-none-any.whl:
Publisher:
publish.yml on davorrunje/defendable-science
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
defendable_science-0.2.0-py3-none-any.whl -
Subject digest:
8caa9c722bd32dd5099b09f14cf12167f02d723fc969ec2aceb8a4c05e3323c3 - Sigstore transparency entry: 2269121401
- Sigstore integration time:
-
Permalink:
davorrunje/defendable-science@f437e86fbc02141eb93d8e0d85ab5e5dd398dac3 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/davorrunje
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@f437e86fbc02141eb93d8e0d85ab5e5dd398dac3 -
Trigger Event:
workflow_dispatch
-
Statement type: