You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Make CLI independent of DataLad, bundle git-annex binaries #22
Make the NEMAR CLI truly standalone by removing the DataLad dependency and potentially bundling git-annex binaries.
Background
Currently, the CLI requires DataLad to be installed externally. Analysis shows that we only use 4 DataLad commands, all of which can be replaced with direct git-annex operations:
DataLad Command
Purpose
Replacement
datalad create
Initialize repo
git init + git annex init
datalad save
Stage + commit
git add + git annex add + git commit
datalad push
Push to remote
git push + git annex copy --to
datalad siblings add
Configure remotes
git remote add + git annex initremote
Proposed Approach
Phase 1: Replace DataLad with direct git-annex
Refactor src/lib/datalad.ts to use git-annex directly
Maintain the same API for consuming code
Still require external git-annex installation
Phase 2: Bundle git-annex binaries
Explore packaging pre-built git-annex binaries for major platforms:
macOS (x64, arm64)
Linux (x64)
Windows (x64)
Look at how other tools handle this (e.g., isomorphic-git approach)
Consider lazy download of binaries on first use
Phase 3: Alternative - Pure JavaScript
Investigate if git-annex operations can be replicated in JS
OpenNeuro CLI uses isomorphic-git for git operations
May not be feasible for all git-annex features
Benefits
Users don't need to install external dependencies
Simpler onboarding experience
More reliable CI/CD integration
Better cross-platform support
Considerations
Binary size for bundled git-annex (~50MB per platform)
Research: DataLad Compatibility with Pure git-annex Repos
Question: If we move to git-annex only (removing DataLad dependency), can users still pull data with DataLad?
Answer: Yes, DataLad users can still pull data from pure git-annex repos.
How it works
DataLad is built on top of git-annex, so compatibility goes both ways:
User has
Clone command
Get files
DataLad
datalad clone <url>
datalad get <files>
git-annex only
git clone <url>
git-annex get <files>
Both
Either works
Either works
Key findings from documentation
datalad clone auto-initializes annex - When cloning any git repo (including pure git-annex repos), DataLad automatically sets up the annex. From the DataLad clone docs: "pure Git repositories are equally supported."
OpenNeuro proves this works - Their datasets are git-annex repos that users access via both datalad get and git-annex get. From OpenNeuro Git docs: "The underlying format for datasets is a git-annex repo... To download the annexed objects, use DataLad or git-annex."
The .datalad/ directory is optional - It contains DataLad-specific metadata (like dataset ID), but is not required for data retrieval. A pure git-annex repo has all the information needed for annex operations.
What NEMAR would need to ensure
For DataLad users to seamlessly access NEMAR datasets:
S3 special remote must be configured - The repo needs git annex initremote set up so clones know where to fetch data
Push the git-annex branch - So clones can see remote configurations
Public S3 bucket or registered URLs - Either configure the S3 remote for public access, or use git annex addurl to register public URLs
What we lose (acceptable tradeoffs)
DataLad dataset ID (used for tracking lineage)
datalad run provenance tracking
Nested subdataset management
None of these affect basic data download workflows.
Conclusion
Moving to pure git-annex is safe for data consumers. This unblocks Phase 1 of the proposal.
Activity
neuromechanist commentedon Jan 21, 2026
Research: DataLad Compatibility with Pure git-annex Repos
Question: If we move to git-annex only (removing DataLad dependency), can users still pull data with DataLad?
Answer: Yes, DataLad users can still pull data from pure git-annex repos.
How it works
DataLad is built on top of git-annex, so compatibility goes both ways:
datalad clone <url>datalad get <files>git clone <url>git-annex get <files>Key findings from documentation
datalad cloneauto-initializes annex - When cloning any git repo (including pure git-annex repos), DataLad automatically sets up the annex. From the DataLad clone docs: "pure Git repositories are equally supported."OpenNeuro proves this works - Their datasets are git-annex repos that users access via both
datalad getandgit-annex get. From OpenNeuro Git docs: "The underlying format for datasets is a git-annex repo... To download the annexed objects, use DataLad or git-annex."The
.datalad/directory is optional - It contains DataLad-specific metadata (like dataset ID), but is not required for data retrieval. A pure git-annex repo has all the information needed for annex operations.What NEMAR would need to ensure
For DataLad users to seamlessly access NEMAR datasets:
git annex initremoteset up so clones know where to fetch datagit annex addurlto register public URLsWhat we lose (acceptable tradeoffs)
datalad runprovenance trackingNone of these affect basic data download workflows.
Conclusion
Moving to pure git-annex is safe for data consumers. This unblocks Phase 1 of the proposal.
refactor: remove DataLad dependency, use git-annex directly
Remove DataLad dependency, use git-annex directly (#63)