CLI Documentation¶
dagshub¶
dagshub [OPTIONS] COMMAND [ARGS]...
Options
- --host <host>¶
Hostname of DagsHub instance. Can also be set by ‘DAGSHUB_CLIENT_HOST’ environment variable
- -q, --quiet¶
Suppress print output
download¶
Download REMOTE_PATH from REPO to LOCAL_PATH
REMOTE_PATH can be either directory or a file
If LOCAL_PATH is left blank, downloads to the current directory
- Example:
dagshub download nirbarazida/CheXNet data_labeling/data ./data
dagshub download [OPTIONS] REPO REMOTE_PATH [LOCAL_PATH]
Options
- -b, --branch <branch>¶
Branch or revision to download from. If left unspecified, use the default branch.
- --keep-prefix¶
Whether to keep the path of the folder in the download path or not.
Example: Given remote_path “src/data” and file “test/file.txt”
if True: will download to “<local_path>/src/data/test/file.txt”
if False: will download to “<local_path>/test/file.txt”
- --not-recursive¶
Don’t download nested folders
- --redownload¶
Redownload files, even if they already exist locally
- --download-storages¶
[Valid only when remote_path is ‘/’] Download integrated storage buckets as well as the repo content
- -v, --verbose¶
Verbosity level
- -q, --quiet¶
Suppress print output
- --host <host>¶
DagsHub instance to which you want to login
- --bucket¶
- Download the file(s) from the repo’s DagsHub Storage bucket.Makes it so remote path is relative to the root of the storage bucketLearn more about the repo bucket here: https://dagshub.com/docs/feature_guide/dagshub_storage/
Arguments
- REPO¶
Required argument
- REMOTE_PATH¶
Required argument
- LOCAL_PATH¶
Optional argument
login¶
Initiate an Oauth authentication process. This process will generate and cache a short-lived token in your local machine, to allow you to perform actions that require authentication. After running dagshub login you can use data streaming and upload files without providing authentication info.
dagshub login [OPTIONS]
Options
- --token <token>¶
Login using a specified token
- --host <host>¶
DagsHub instance to which you want to login
- -q, --quiet¶
Suppress print output
repo¶
Operations on repo: currently only ‘create’
dagshub repo [OPTIONS] COMMAND [ARGS]...
create¶
create a repo and optionally:
upload files to ‘data’ from a URL dir using -u flag. .zip and .tar files are extracted,
other formats copied as is.
clone the repo locally using –clone flag
example 1: dagshub repo create mytutorial -u “http://example.com/data.csv” –clone
- example 2: dagshub –host “https://www.dagshub.com”
repo create mytutorial2 -u “http://0.0.0.0:8080/index.html” –clone –verbose
dagshub repo create [OPTIONS] REPO_NAME
Options
- -u, --upload-data <upload_data>¶
Upload data from specified url to new repository
- -c, --clone¶
Clone repository locally
- -v, --verbose¶
Verbosity level
- -q, --quiet¶
Suppress print output
Arguments
- REPO_NAME¶
Required argument
setup¶
Initialize additional functionality in the current repository
dagshub setup [OPTIONS] COMMAND [ARGS]...
dvc¶
Initialize dvc
dagshub setup dvc [OPTIONS]
Options
- --repo_name <repo_name>¶
The repository name to set up
- --repo_owner <repo_owner>¶
Owner of the repository in use (user or organization)
- --url <url>¶
DagsHub remote url; either provide –url or repo_name and repo_owner
- --host <host>¶
DagsHub instance to which you want to login
- -q, --quiet¶
Suppress print output
upload¶
Upload FILENAME to REPO at location TARGET.
FILENAME can be a directory.
REPO should be of the form <owner>/<repo-name>, e.g: nirbarazida/yolov6.
TARGET should include the full path inside the repo, including the filename itself. If TARGET is omitted, it defaults to using the relative path to FILENAME from current working directory, or the filename itself if it’s not relative to the current working directory.
dagshub upload [OPTIONS] REPO FILENAME [TARGET]
Options
- -m, --message <message>¶
Commit message for the upload
- -b, --branch <branch>¶
Branch to upload the file to
- --update¶
Force update existing files/directories
- -v, --verbose¶
Verbosity level
- -q, --quiet¶
Suppress print output
- --host <host>¶
DagsHub instance to which you want to login
- --versioning <versioning>¶
Versioning system to be used to upload the file(s)
- Options:
git | dvc | auto
- --bucket¶
- Upload the file(s) to the repo’s DagsHub Storage bucket (s3-compatible)Learn more about the repo bucket here: https://dagshub.com/docs/feature_guide/dagshub_storage/
Arguments
- REPO¶
Required argument
- FILENAME¶
Required argument
- TARGET¶
Optional argument
version¶
Prints the current installed version of the DagsHub client
dagshub version [OPTIONS]