A Go command-line client for the Open Science Framework (OSF).
osf auth whoami— Identify the authenticated OSF accountosf projects list|get— List and inspect projectsosf components list— List project componentsosf files list|download— Browse and download OSF Storage filesosf completion bash|zsh|fish|powershell— Shell completion scripts- JSON and human-readable output modes
- Safe, atomic file downloads with conflict policy (fail/skip/overwrite)
Requirements:
- Go 1.26 or newer
go install github.com/edithatogo/osf-cli-go/cmd/osf@latestOr from a local checkout:
go build -o bin\osf.exe ./cmd/osf
.\scripts\build.ps1Set OSF_TOKEN in your shell session. Do not commit the token or write it into project files.
$env:OSF_TOKEN = '<your-token>'osf --help
osf auth whoami
osf projects list
osf projects get https://osf.io/abc12/
osf components list abc12
osf files list abc12
osf files download --file <file-id> ./output/
osf files download --tree abc12 ./output/All commands support --output table|json and --json shorthand:
osf projects list --json
osf auth whoami --output jsonAll 15 Conductor tracks are complete. The CLI is offline-tested for all read-only operations including file downloads with conflict handling, path traversal protection, symlink escape prevention, and atomic writes.
Apache 2.0 — see LICENSE.
If you use this software in your research, please cite it using the metadata in CITATION.cff.