Usage:"downloads a swarm manifest or a file inside a manifest",
ArgsUsage:" <uri> [<dir>]",
Description:`Downloads a swarm bzz uri to the given dir. When no dir is provided, working directory is assumed. --recursive flag is expected when downloading a manifest with multiple entries.`,
Description:"Performs FUSE operations by mounting/unmounting/listing mount points. This assumes you already have a Swarm node running locally. For all operation you must reference the correct path to bzzd.ipc in order to communicate with the node",
Subcommands:[]cli.Command{
{
Action:mount,
CustomHelpTemplate:helpTemplate,
Name:"mount",
Flags:[]cli.Flag{utils.IPCPathFlag},
Usage:"mount a swarm hash to a mount point",
ArgsUsage:"swarm fs mount --ipcpath <path to bzzd.ipc> <manifest hash> <mount point>",
Description:"Mounts a Swarm manifest hash to a given mount point. This assumes you already have a Swarm node running locally. You must reference the correct path to your bzzd.ipc file",
},
{
Action:unmount,
CustomHelpTemplate:helpTemplate,
Name:"unmount",
Flags:[]cli.Flag{utils.IPCPathFlag},
Usage:"unmount a swarmfs mount",
ArgsUsage:"swarm fs unmount --ipcpath <path to bzzd.ipc> <mount point>",
Description:"Unmounts a swarmfs mount residing at <mount point>. This assumes you already have a Swarm node running locally. You must reference the correct path to your bzzd.ipc file",
},
{
Action:listMounts,
CustomHelpTemplate:helpTemplate,
Name:"list",
Flags:[]cli.Flag{utils.IPCPathFlag},
Usage:"list swarmfs mounts",
ArgsUsage:"swarm fs list --ipcpath <path to bzzd.ipc>",
Description:"Lists all mounted swarmfs volumes. This assumes you already have a Swarm node running locally. You must reference the correct path to your bzzd.ipc file",
Usage:"downloads a swarm manifest or a file inside a manifest",
ArgsUsage:" <uri> [<dir>]",
Description:`Downloads a swarm bzz uri to the given dir. When no dir is provided, working directory is assumed. --recursive flag is expected when downloading a manifest with multiple entries.`,
},
{
Name:"manifest",
CustomHelpTemplate:helpTemplate,
Usage:"perform operations on swarm manifests",
ArgsUsage:"COMMAND",
Description:"Updates a MANIFEST by adding/removing/updating the hash of a path.\nCOMMAND could be: add, update, remove",
Subcommands:[]cli.Command{
{
Action:manifestAdd,
CustomHelpTemplate:helpTemplate,
Name:"add",
Usage:"add a new path to the manifest",
ArgsUsage:"<MANIFEST> <path> <hash>",
Description:"Adds a new path to the manifest",
},
{
Action:manifestUpdate,
CustomHelpTemplate:helpTemplate,
Name:"update",
Usage:"update the hash for an already existing path in the manifest",
ArgsUsage:"<MANIFEST> <path> <newhash>",
Description:"Update the hash for an already existing path in the manifest",
},
{
Action:manifestRemove,
CustomHelpTemplate:helpTemplate,
Name:"remove",
Usage:"removes a path from the manifest",
ArgsUsage:"<MANIFEST> <path>",
Description:"Removes a path from the manifest",
},
},
},
{
Name:"fs",
CustomHelpTemplate:helpTemplate,
Usage:"perform FUSE operations",
ArgsUsage:"fs COMMAND",
Description:"Performs FUSE operations by mounting/unmounting/listing mount points. This assumes you already have a Swarm node running locally. For all operation you must reference the correct path to bzzd.ipc in order to communicate with the node",
Subcommands:[]cli.Command{
{
Action:mount,
CustomHelpTemplate:helpTemplate,
Name:"mount",
Flags:[]cli.Flag{utils.IPCPathFlag},
Usage:"mount a swarm hash to a mount point",
ArgsUsage:"swarm fs mount --ipcpath <path to bzzd.ipc> <manifest hash> <mount point>",
Description:"Mounts a Swarm manifest hash to a given mount point. This assumes you already have a Swarm node running locally. You must reference the correct path to your bzzd.ipc file",
},
{
Action:unmount,
CustomHelpTemplate:helpTemplate,
Name:"unmount",
Flags:[]cli.Flag{utils.IPCPathFlag},
Usage:"unmount a swarmfs mount",
ArgsUsage:"swarm fs unmount --ipcpath <path to bzzd.ipc> <mount point>",
Description:"Unmounts a swarmfs mount residing at <mount point>. This assumes you already have a Swarm node running locally. You must reference the correct path to your bzzd.ipc file",
},
{
Action:listMounts,
CustomHelpTemplate:helpTemplate,
Name:"list",
Flags:[]cli.Flag{utils.IPCPathFlag},
Usage:"list swarmfs mounts",
ArgsUsage:"swarm fs list --ipcpath <path to bzzd.ipc>",
Description:"Lists all mounted swarmfs volumes. This assumes you already have a Swarm node running locally. You must reference the correct path to your bzzd.ipc file",
},
},
},
{
Name:"db",
CustomHelpTemplate:helpTemplate,
Usage:"manage the local chunk database",
ArgsUsage:"db COMMAND",
Description:"Manage the local chunk database",
Subcommands:[]cli.Command{
{
Action:dbExport,
CustomHelpTemplate:helpTemplate,
Name:"export",
Usage:"export a local chunk database as a tar archive (use - to send to stdout)",
ArgsUsage:"<chunkdb> <file>",
Description:`
Export a local chunk database as a tar archive (use - to send to stdout).
swarm db export ~/.ethereum/swarm/bzz-KEY/chunks chunks.tar
The export may be quite large, consider piping the output through the Unix
pv(1) tool to get a progress bar:
swarm db export ~/.ethereum/swarm/bzz-KEY/chunks - | pv > chunks.tar
`,
},
{
Action:dbImport,
CustomHelpTemplate:helpTemplate,
Name:"import",
Usage:"import chunks from a tar archive into a local chunk database (use - to read from stdin)",
ArgsUsage:"<chunkdb> <file>",
Description:`Import chunks from a tar archive into a local chunk database (use - to read from stdin).
swarm db import ~/.ethereum/swarm/bzz-KEY/chunks chunks.tar
The import may be quite large, consider piping the input through the Unix
pv(1) tool to get a progress bar:
pv chunks.tar | swarm db import ~/.ethereum/swarm/bzz-KEY/chunks -`,