Reference

iBridges CLI version 2.0.1

Usage: ibridges [subcommand] [options]

ibridges commands (v2.0.1):
    ls (list, l):
        List a collection on iRODS.
    pwd:
        Show current working collection.
    tree:
        Show collection/directory tree.
    meta-list:
        List the metadata of a data object or collection on iRODS.
    meta-add:
        Add a metadata item to a collection or data object.
    meta-del:
        Delete metadata for one collection or data object.
    mkcoll:
        Create a new collecion with all its parent collections.
    download:
        Download a data object or collection from an iRODS server.
    upload:
        Upload a data object or collection to an iRODS server.
    search:
        Search for dataobjects and collections.
    cd:
        Change current working collection for the iRODS server.
    rm (remove, del):
        Remove collection or data object.
    sync:
        Synchronize files/directories between local and remote.
    gui:
        Start the iBridges GUI.
    version:
        Print the version of iBridges.
    shell:
        Shell for ibridges commands with autocomplete.
    alias:
        Print existing aliases or create new ones.
    init:
        Create a cached password for future use.
    setup:
        Use templates to create an iRODS environment json.


    The iBridges CLI does not implement the complete iBridges API. For example, there
    are no commands to modify the access rights to data.

    Example usage:

        ibridges download "irods:~/test.txt"
        ibridges upload ~/test.txt "irods:/test"
        ibridges init
        ibridges sync ~/directory "irods:~/collection"
        ibridges list irods:~/collection
        ibridges meta-add irods:some_dataobj_or_collection new_key new_value new_units
        ibridges meta-list irods:some_dataobj_or_collection
        ibridges mkcoll irods://~/bli/bla/blubb
        ibridges tree irods:~/collection
        ibridges search --path-pattern "%.txt"
        ibridges search --metadata "key" "value" "units"
        ibridges search --metadata "key" --metadata "key2" "value2"
        ibridges setup uu-its

    Reuse a configuration by an alias:
        ibridges init ~/.irods/irods_environment.json --alias my_irods
        ibridges init my_irods

    Program information:
        -h, --help    - display this help file and exit

Positional Arguments

subcommand

Possible choices: ls, list, l, pwd, tree, meta-list, meta-add, meta-del, mkcoll, download, upload, search, cd, rm, remove, del, sync, gui, version, shell, alias, init, setup

Sub-commands

ls (list, l)

List a collection on iRODS.

ibridges ls [-h] [-m] [-i] [-l] [--nocolor] [remote_coll]

Positional Arguments

remote_coll

Path to remote iRODS location starting with ‘irods:’.

Default: “.”

Named Arguments

-m, --metadata

Show metadata for each iRODS location, only in combination with -i/–icommands.

Default: False

-i, --icommands

Display available data objects/collections in iCommands form.

Default: False

-l, --long

Display available data objects/collections in long form.

Default: False

--nocolor

Disable printing with color.

Default: False

Examples:

> ibridges ls > ibridges ls irods:some_collection

pwd

Show current working collection.

ibridges pwd [-h]

Examples:

> ibridges pwd

tree

Show collection/directory tree.

ibridges tree [-h] [--show-max SHOW_MAX] [--ascii] [--depth DEPTH]
              [remote_coll]

Positional Arguments

remote_coll

Path to collection to make a tree of.

Default: “.”

Named Arguments

--show-max

Show only up to this number of dataobject in the same collection, default 10.

Default: 10

--ascii

Print the tree in pure ascii.

Default: False

--depth

Maximum depth of the tree to be shown, default no limit.

Examples:

> ibridges tree > ibridges tree irods:some_collection

meta-list

List the metadata of a data object or collection on iRODS.

ibridges meta-list [-h] [remote_path]

Positional Arguments

remote_path

iRODS path for metadata listing, starting with ‘irods:’.

Default: “.”

Examples:

> ibridges meta-list > ibridges meta-list irods:remote_collection

meta-add

Add a metadata item to a collection or data object.

ibridges meta-add [-h] remote_path key value [units]

Positional Arguments

remote_path

Path to add a new metadata item to.

key

Key for the new metadata item.

value

Value for the new metadata item.

units

Units for the new metadata item.

Default: “”

Examples:

> ibridges meta-add irods:some_dataobj_or_collection new_key new_value new_units

meta-del

Delete metadata for one collection or data object.

ibridges meta-del [-h] [--key KEY] [--value VALUE] [--units UNITS]
                  [--ignore-blacklist]
                  remote_path

Positional Arguments

remote_path

Path to delete metadata entries from.

Named Arguments

--key

Key for which to delete the entries.

Default: Ellipsis

--value

Value for which to delete the entries.

Default: Ellipsis

--units

Units for which to delete the entries.

Default: Ellipsis

--ignore-blacklist

Ignore the metadata blacklist.

Default: False

Examples:

> ibridges meta-del irods:remote_dataobj_or_coll > ibridges meta-del irods:remote_dataobj_or_coll –key some_key > ibridges meta-del irods:some_obj –key some_key –value some_val –units some_units

mkcoll

Create a new collecion with all its parent collections.

ibridges mkcoll [-h] remote_coll

Positional Arguments

remote_coll

Path to a new collection, should start with ‘irods:’.

Examples:

> ibridges mkcoll irods:~/test

download

Download a data object or collection from an iRODS server.

ibridges download [-h] [--overwrite] [--resource RESOURCE] [--dry-run]
                  [--metadata [METADATA]] [--on-error ON_ERROR]
                  remote_path [local_path]

Positional Arguments

remote_path

Path to remote iRODS location starting with ‘irods:’.

local_path

Local path to download the data object/collection to.

Default: /home/docs/checkouts/readthedocs.org/user_builds/ibridges/checkouts/v2.0.1/docs/source

Named Arguments

--overwrite

Overwrite the local file(s) if it exists.

Default: False

--resource

Name of the resource from which the data is to be downloaded.

Default: “”

--dry-run

Do not perform the download, but list the files to be updated.

Default: False

--metadata

Path to the metadata file which will be created.

--on-error

When a transfer of a file fails, by default the whole transfer will stop and print the error message(fail). By setting ‘on-error’ to ‘warn’, those errors will be turned into warnings and the transfer continues with the next file. Setting ‘on-error’ to ‘skip’ will omit any message and simply proceed.

Examples:

> ibridges download irods:~/test.txt > ibridges download irods:~/some_collection

upload

Upload a data object or collection to an iRODS server.

ibridges upload [-h] [--overwrite] [--resource RESOURCE] [--dry-run]
                [--metadata [METADATA]] [--on-error ON_ERROR]
                local_path [remote_path]

Positional Arguments

local_path

Local path to upload the data object/collection from.

remote_path

Path to remote iRODS location starting with ‘irods:’.

Default: “.”

Named Arguments

--overwrite

Overwrite the remote file(s) if it exists.

Default: False

--resource

Name of the resource to which the data is to be uploaded.

Default: “”

--dry-run

Do not perform the upload, but list the files to be updated.

Default: False

--metadata

Path to the metadata json.

--on-error

When a transfer of a file fails, by default the whole transfer will stop and print the error message(fail). By setting ‘on-error’ to ‘warn’, those errors will be turned into warnings and the transfer continues with the next file. Setting ‘on-error’ to ‘skip’ will omit any message and simply proceed.

Default: “fail”

Examples:

> ibridges upload local_file.txt > ibridges upload local_file.txt irods:remote_collection > ibridges upload local_dir irods:remote_collection

cd

Change current working collection for the iRODS server.

ibridges cd [-h] [remote_coll]

Positional Arguments

remote_coll

Path to remote iRODS location.

Default: “~”

Examples:

> ibridges cd > ibridges cd irods:some_collection

rm (remove, del)

Remove collection or data object.

ibridges rm [-h] [-r] remote_path

Positional Arguments

remote_path

Collection or data object to remove.

Named Arguments

-r, --recursive

Remove collections and their content recursively.

Default: False

Examples:

> ibridges rm irods:~/test.txt > ibridges rm -r irods:~/test_collection

sync

Synchronize files/directories between local and remote.

ibridges sync [-h] [--dry-run] [--metadata [METADATA]] [--on-error ON_ERROR]
              source destination

Positional Arguments

source

Source path to synchronize from (collection on irods server or local directory).

destination

Destination path to synchronize to (collection on irods server or local directory).

Named Arguments

--dry-run

Do not perform the synchronization, but list the files to be updated.

Default: False

--metadata

Path to the metadata json file.

--on-error

When a transfer of a file fails, by default the whole transfer will stop and print the error message(fail). By setting ‘on-error’ to ‘warn’, those errors will be turned into warnings and the transfer continues with the next file. Setting ‘on-error’ to ‘skip’ will omit any message and simply proceed.

Default: “fail”

Examples:

> ibridges sync local_dir irods:remote_collection > ibridges sync irods:remote_collection local_dir

gui

Start the iBridges GUI.

ibridges gui [-h]

Examples:

> ibridges gui

version

Print the version of iBridges.

ibridges version [-h]

Examples:

> ibridges version

shell

Shell for ibridges commands with autocomplete.

ibridges shell [-h]

alias

Print existing aliases or create new ones.

ibridges alias [-h] [--delete] [alias] [env_path]

Positional Arguments

alias

The new alias to be created.

env_path

iRODS environment path.

Named Arguments

--delete, -d

Delete the alias.

Default: False

Examples:

> ibridges alias some_alias ~/.irods/irods_environment.json > ibridges alias other_alias –delete

init

Create a cached password for future use.

ibridges init [-h] [irods_env_path_or_alias]

Positional Arguments

irods_env_path_or_alias

The path to your iRODS environment JSON file or an alias for an environment.

Examples:

> ibridges init > ibridges init ~/.irods/another_env_path.json > ibridges init some_alias

setup

Use templates to create an iRODS environment json.

ibridges setup [-h] [--list] [-o OUTPUT] [--overwrite] [server_name]

Positional Arguments

server_name

Server name to create your irods_environment.json for.

Named Arguments

--list

List all available server names.

Default: False

-o, --output

Store the environment to a file.

Default: /home/docs/.irods/irods_environment.json

--overwrite

Overwrite the irods environment file.

Default: False

Examples:

> ibridges setup some-servername -o ~/.irods/some_server.json