Documentation
¶
Overview ¶
osf-cli-go is a command-line client for the Open Science Framework (OSF).
Overview ¶
osf-cli-go provides read-only access to OSF projects, components, and files through a Cobra-based CLI. It supports both JSON and human-readable output.
Commands ¶
osf auth whoami — Show the authenticated OSF account
osf projects list — List accessible projects
osf projects get <guid-or-url> — Show one project
osf components list <project> — List child components
osf files list <node> — List OSF Storage files
osf files download --file <id> — Download a single file
--tree <node> <dest> — Download a folder tree
osf completion bash|zsh|fish|powershell — Shell completions
Authentication ¶
Set the OSF_TOKEN environment variable to a valid OSF personal access token. Without a token, only public node metadata and public storage files are accessible.
Package Layout ¶
cmd/osf/ — CLI entry point internal/auth/ — Token loading and redaction internal/cli/ — Cobra command definitions and routing internal/download/ — Safe file download with conflict handling internal/osfapi/ — OSF API v2 JSON:API client internal/output/ — JSON and table output helpers
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
osf
command
|
|
|
osf-mcp
command
|
|
|
internal
|
|
|
auth
Package auth loads OSF credentials from caller-provided sources and redacts secrets from user-visible errors and logs.
|
Package auth loads OSF credentials from caller-provided sources and redacts secrets from user-visible errors and logs. |
|
buildinfo
Package buildinfo resolves the version embedded in a Go binary.
|
Package buildinfo resolves the version embedded in a Go binary. |
|
cli
Package cli builds and executes the osf command tree.
|
Package cli builds and executes the osf command tree. |
|
crossprovider
Package crossprovider models explicit, provenance-preserving transfers between OSF and Zenodo without implying mirroring or publication.
|
Package crossprovider models explicit, provenance-preserving transfers between OSF and Zenodo without implying mirroring or publication. |
|
download
Package download provides safe local file writes for OSF downloads, including conflict policies, path traversal protection, and folder-tree manifests.
|
Package download provides safe local file writes for OSF downloads, including conflict policies, path traversal protection, and folder-tree manifests. |
|
observability
Package observability defines the versioned, redacted operational event contract shared by the CLI, API client, transfer code, and MCP server.
|
Package observability defines the versioned, redacted operational event contract shared by the CLI, API client, transfer code, and MCP server. |
|
osfapi
Package osfapi implements the OSF API v2 HTTP client used by the CLI.
|
Package osfapi implements the OSF API v2 HTTP client used by the CLI. |
|
output
Package output renders command results as stable JSON or aligned text tables.
|
Package output renders command results as stable JSON or aligned text tables. |
|
repository
Package repository defines provider-qualified research repository contracts.
|
Package repository defines provider-qualified research repository contracts. |
|
repository/conformancetest
Package conformancetest provides reusable repository contract assertions.
|
Package conformancetest provides reusable repository contract assertions. |
|
zenodoapi
Package zenodoapi implements the reviewed read-only Zenodo REST adapter.
|
Package zenodoapi implements the reviewed read-only Zenodo REST adapter. |
|
zenodoid
Package zenodoid parses provider-qualified and canonical Zenodo identities.
|
Package zenodoid parses provider-qualified and canonical Zenodo identities. |
|
zenodooai
Package zenodooai implements bounded, read-only Zenodo OAI-PMH harvesting.
|
Package zenodooai implements bounded, read-only Zenodo OAI-PMH harvesting. |
|
zenodopublish
Package zenodopublish models and executes explicitly authorized Zenodo sandbox publication lifecycle actions.
|
Package zenodopublish models and executes explicitly authorized Zenodo sandbox publication lifecycle actions. |
|
zenodotransfer
Package zenodotransfer implements authenticated, sandbox-only Zenodo draft file transfers.
|
Package zenodotransfer implements authenticated, sandbox-only Zenodo draft file transfers. |
|
tools
|
|
|
checkapischema
command
Command checkapischema validates the pinned official OSF API schema manifest.
|
Command checkapischema validates the pinned official OSF API schema manifest. |
|
checkfeaturematrix
command
Command checkfeaturematrix validates and renders the canonical feature matrix.
|
Command checkfeaturematrix validates and renders the canonical feature matrix. |
|
checkmcpquality
command
Command checkmcpquality evaluates the offline MCP quality and compatibility contract.
|
Command checkmcpquality evaluates the offline MCP quality and compatibility contract. |
|
checkproviderrelease
command
Command checkproviderrelease validates dated, digest-bound provider claims.
|
Command checkproviderrelease validates dated, digest-bound provider claims. |
|
checkregistries
command
|
|
|
checkreleasecontract
command
Command checkreleasecontract validates the repository's release-readiness contract.
|
Command checkreleasecontract validates the repository's release-readiness contract. |
|
checkreviews
command
|
|
|
checkstubs
command
|
|
|
checksums
command
Command checksums writes SHA-256 checksums for files in a directory.
|
Command checksums writes SHA-256 checksums for files in a directory. |
|
checkzenodoapi
command
Command checkzenodoapi validates the pinned Zenodo API capability snapshot.
|
Command checkzenodoapi validates the pinned Zenodo API capability snapshot. |
|
crossprovidervalidation
command
Command crossprovidervalidation proves an OSF-qualified snapshot can be copied to and compensated from an unpublished Zenodo sandbox draft.
|
Command crossprovidervalidation proves an OSF-qualified snapshot can be copied to and compensated from an unpublished Zenodo sandbox draft. |
|
livevalidation
command
|
|
|
zenodopublicationvalidation
command
Command zenodopublicationvalidation records an offline plan or runs the explicitly opted-in Zenodo sandbox publication lifecycle proof.
|
Command zenodopublicationvalidation records an offline plan or runs the explicitly opted-in Zenodo sandbox publication lifecycle proof. |
|
zenodosandboxvalidation
command
|
Click to show internal directories.
Click to hide internal directories.