7.5 Using the Command Line Tool
The dx tool has some pretty good help docs. You can access help for a command using the dx help command.
For example, to access help for dx upload, use the command:
## usage: dx upload [-h] [--visibility {hidden,visible}] [--property KEY=VALUE]
## [--type TYPE] [--tag TAG] [--details DETAILS] [-p]
## [--brief | --verbose] [--env-help] [--path [PATH]] [-r]
## [--wait] [--no-progress] [--buffer-size WRITE_BUFFER_SIZE]
## [--singlethread]
## filename [filename ...]
##
## Upload local file(s) or directory. If "-" is provided, stdin will be used
## instead. By default, the filename will be used as its new name. If
## --path/--destination is provided with a path ending in a slash, the filename
## will be used, and the folder path will be used as a destination. If it does
## not end in a slash, then it will be used as the final name.
##
## positional arguments:
## filename Local file or directory to upload ("-" indicates stdin
## input); provide multiple times to upload multiple
## files or directories
##
## optional arguments:
## -h, --help show this help message and exit
## --brief Display a brief version of the return value; for most
## commands, prints a DNAnexus ID per line
## --verbose If available, displays extra verbose output
## --env-help Display help message for overriding environment
## variables
## --path [PATH], --destination [PATH]
## DNAnexus path to upload file(s) to (default uses
## current project and folder if not provided)
## -r, --recursive Upload directories recursively
## --wait Wait until the file has finished closing
## --no-progress Do not show a progress bar
## --buffer-size WRITE_BUFFER_SIZE
## Set the write buffer size (in bytes)
## --singlethread Enable singlethreaded uploading
##
## metadata arguments:
## --visibility {hidden,visible}
## Whether the object is hidden or not
## --property KEY=VALUE Key-value pair to add as a property; repeat as
## necessary, e.g. "--property key1=val1 --property
## key2=val2"
## --type TYPE Type of the data object; repeat as necessary, e.g. "--
## type type1 --type type2"
## --tag TAG Tag of the data object; repeat as necessary, e.g. "--
## tag tag1 --tag tag2"
## --details DETAILS JSON to store as details
## -p, --parents Create any parent folders necessary
For a full list of available dx commands:
## dx all: All commands
##
## Commands:
##
## add Add one or more items to a list
## add developers Add developers for an app
## add member Grant a user membership to an org
## add stage Add a stage to a workflow
## add users Add authorized users for an app
## add_types Add types to a data object
## api Call an API method
## build Upload and build a new applet/app, or a workflow
## build_asset Build an asset bundle
## cat Print file(s) to stdout
## cd Change the current working directory
## clearenv Clears all environment variables set by dx
## close Close data object(s)
## cp Copy objects and/or folders between different projects
## describe Describe a remote object
## download Download file(s)
## env Print all environment variables in use
## exit Exit out of the interactive shell
## find Search functionality over various DNAnexus entities
## find analyses List analyses in the current project
## find apps List available apps
## find data List data objects in the current project
## find executions List executions (jobs and analyses) in the current project
## find globalworkflowsList available global workflows
## find jobs List jobs in the current project
## find org List entities within a specific org. "dx find org
## members" lists members in the
## specified org "dx find org
## projects" lists projects billed to the
## specified org "dx find org
## apps" lists apps billed to the
## specified org Please execute "dx find
## org -h" for more information.
## find org apps List apps billed to the specified org
## find org members List members in the specified org
## find org projects List projects billed to the specified org
## find orgs List orgs
## find projects List projects
## generate_batch_inputsGenerate a batch plan (one or more TSV files) for batch
## execution
## get Download records, apps, applets, workflows, and files
## get_details Get details of a data object
## head Print part of a file
## help Display help messages and dx commands by category
## install Install an app
## invite Invite another user to a project or make it public
## list Print the members of a list
## list database List entities associated with a specific database. For
## example, "dx list database
## files" lists database files associated
## with a specific database.
## Please execute "dx list database -h"
## for more information.
## list database filesList files associated with a specific database
## list developers List developers for an app
## list stages List the stages in a workflow
## list users List authorized users for an app
## login Log in (interactively or with an existing API token)
## logout Log out and remove credentials
## ls List folders and/or objects in a folder
## make_download_url Create a file download link for sharing
## mkdir Create a new folder
## mv Move or rename objects and/or folders inside a project
## new Create a new project or data object
## new org Create new org
## new project Create a new project
## new record Create a new record
## new user Create a new user account
## new workflow Create a new workflow
## publish Publish an app or a global workflow
## pwd Print current working directory
## remove Remove one or more items to a list
## remove developers Remove developers for an app
## remove member Revoke the org membership of a user
## remove stage Remove a stage from a workflow
## remove users Remove authorized users for an app
## remove_types Remove types from a data object
## rename Rename a project or data object
## rm Remove data objects and folders
## rmdir Remove a folder
## rmproject Delete a project
## run Run an applet, app, or workflow
## select List and select a project to switch to
## set_details Set details on a data object
## set_properties Set properties of a project, data object, or execution
## set_visibility Set visibility on a data object
## setenv Sets environment variables for the session
## ssh Connect to a running job via SSH
## ssh_config Configure SSH keys for your DNAnexus account
## tag Tag a project, data object, or execution
## terminate Terminate jobs or analyses
## tree List folders and objects in a tree
## uninstall Uninstall an app
## uninvite Revoke others' permissions on a project you administer
## unset_properties Unset properties of a project, data object, or execution
## untag Untag a project, data object, or execution
## update Update certain types of metadata
## update member Update the membership of a user in an org
## update org Update information about an org
## update project Updates a specified project with the specified options
## update stage Update the metadata for a stage in a workflow
## update workflow Update the metadata for a workflow
## upgrade Upgrade dx-toolkit (the DNAnexus SDK and this program)
## upload Upload file(s) or directory
## wait Wait for data object(s) to close or job(s) to finish
## watch Watch logs of a job and its subjobs
## whoami Print the username of the current user