Support ad-hoc retrieval without separate `daemon` or `init`
- Dominant language
- Go
- Stars
- 17.1k
- Forks
- 3.2k
- Avg merge
- 3d 18h
- Merged PRs (30d)
- 11
Description
## Need
a subset of users needs a tool for ad-hoc downloads, similar to `curl`, `wget` or `aria2c`.
https://github.com/ipfs/ipget and https://github.com/filecoin-project/lassie exist, but are poorly maintained, and often lag behind libp2p/boxo updates. they are also not present in package managers the way Kubo's `ipfs` binary is
what I feel should happen, is NOT adding more unmaintained binaries, but leverage `ipfs` that users already have, and make it support running in similar way to `aria2c`
## Implementation idea
We want ability to run `ipfs cat`, `ipfs get` and `ipfs dag export` work in "ad-hoc" mode in CLI, without the need to initialize repo and start the daemon separately.
How could we implement an equivalent of `docker run --rm`, which would run with ephemeral repository initialized with random ports, and then remove it after exit?
Perhaps we could simply add support for `--foo` flag that:
- accepts an optional path, if not.. creates repo in systems temporary directory
- seamlessly starts ad-hoc demon against that config/repo from that dir
- executes `ipfs cmd` against that repo
- if no path was passed, removed the directory
cc @gammazero as we talked about it but never captured this idea in and issue
Contributor guide
Research direction
Start with the CLI entry points for `ipfs cat`, `ipfs get`, and `ipfs dag export`, then trace how repository initialization and daemon startup are currently required. Define and verify an ad-hoc execution path with an optional repository path, temporary cleanup, and ephemeral ports; the issue does not name specific files or tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- backend, cli
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100