← 全部工具

nemar-cli

热度 65 更新于 开发与构建

CLI for NEMAR (Neuroelectromagnetic Data Archive and Tools Resource) dataset management

npmauto-collected

安装

npm
npm install -g nemar-cli

通过 npm 安装。

NEMAR CLI

Command-line interface for NEMAR (Neuroelectromagnetic Data Archive and Tools Resource) dataset management.

Documentation | Quick Start | Commands

Documentation now lives in its own repository, nemarOrg/docs (Astro Starlight), and is published at docs.nemar.org.

Features

  • Dataset Management: Upload, download, validate, and version BIDS datasets
  • Resume Uploads: Failed uploads can be resumed; CLI stores state in .nemar/config.json
  • Smart Authentication: Verifies GitHub CLI authentication matches NEMAR user
  • Auto-Accept Invitations: Automatically accepts GitHub collaboration invitations
  • IAM Retry Logic: Handles AWS IAM eventual consistency with automatic retries
  • Commit Authorship: Commits attributed to your NEMAR user identity
  • Private First: New datasets are private; branch protection applied only on DOI creation
  • PR-Based Updates: After DOI, all changes require pull requests
  • Collaborative: Any NEMAR user can contribute to any dataset
  • BIDS Validation: Automatic validation before upload and on PRs
  • DOI Integration: Zenodo DOI creation for dataset versioning
  • DataLad Backend: Git-annex for large file management with S3 storage

Installation

Requires Bun runtime.

# Install Bun (if not already installed)
curl -fsSL https://bun.sh/install | bash

# Install NEMAR CLI
bun install -g nemar-cli

# Or run directly without installing
bunx nemar-cli

Prerequisites

For dataset operations:

  • DataLad and git-annex
  • Deno (for BIDS validation)
  • GitHub CLI (gh) - authenticated as your NEMAR user
  • SSH key registered with GitHub
# macOS
brew install datalad git-annex deno gh

# Ubuntu/Debian
sudo apt-get install git-annex
pip install datalad
curl -fsSL https://deno.land/install.sh | sh
# Install gh: https://github.com/cli/cli/blob/trunk/docs/install_linux.md

# Authenticate GitHub CLI (required for upload)
gh auth login

Important: The GitHub account authenticated with gh must match your NEMAR username. The CLI verifies this before upload.

Quick Start

# 1. Sign up for NEMAR
nemar auth signup

# 2. After admin approval, retrieve your API key
nemar auth retrieve-key

# 3. Login with your API key
nemar auth login

# 4. Complete sandbox training
nemar sandbox

nemar dataset validate /path/to/dataset