Skip to content

edithatogo/osf-cli-go

Repository files navigation

osf-cli-go

A Go command-line client for the Open Science Framework (OSF).

CI Lint Go Reference License Go Version

Features

  • osf auth whoami — Identify the authenticated OSF account
  • osf projects list|get — List and inspect projects
  • osf components list — List project components
  • osf files list|download — Browse and download OSF Storage files
  • osf completion bash|zsh|fish|powershell — Shell completion scripts
  • JSON and human-readable output modes
  • Safe, atomic file downloads with conflict policy (fail/skip/overwrite)

Install

Requirements:

  • Go 1.26 or newer
go install github.com/edithatogo/osf-cli-go/cmd/osf@latest

Or from a local checkout:

go build -o bin\osf.exe ./cmd/osf
.\scripts\build.ps1

Authentication

Set OSF_TOKEN in your shell session. Do not commit the token or write it into project files.

$env:OSF_TOKEN = '<your-token>'

Quick Start

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/

Output Modes

All commands support --output table|json and --json shorthand:

osf projects list --json
osf auth whoami --output json

Project Status

All 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.

Documentation

License

Apache 2.0 — see LICENSE.

Citation

If you use this software in your research, please cite it using the metadata in CITATION.cff.

About

A command-line client for the Open Science Framework

Topics

Resources

License

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Packages

 
 
 

Contributors

Languages