You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The *network* of dat v14 will not be compatible with earlier versions of dat. The .dat metadata file will still work, but older clients should upgrade to v14.
It will have big improvements:
* Better connectivity: A better DHT and holepunching. The networking stack has been entirely rewritten. See https://github.com/hyperswarm/hyperswarm
* Deprecating the `dat share` command. Now, `dat share` and `dat sync` do the same thing, so you no longer have to remember if your directory has a dat in it already.
Co-authored-by: Joe Hand <[email protected]>
Co-authored-by: VirtualWolf <[email protected]>
Co-authored-by: John <[email protected]>
Co-authored-by: Adam Gashlin <[email protected]>
Co-authored-by: Bohyun Jung <[email protected]>
Copy file name to clipboardExpand all lines: README.md
+25-70Lines changed: 25 additions & 70 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -105,33 +105,35 @@ A dat is some files from your computer and a `.dat` folder. Each dat has a uniqu
105
105
106
106
### Sharing Data
107
107
108
-
You can start sharing your files with a single command. Unlike `git`, you do not have to initialize a repository first, `dat share` will do that for you:
108
+
You can start sharing your files with a single command. Unlike `git`, you do not have to initialize a repository first, `dat share`or simply `dat`will do that for you:
109
109
110
110
```
111
-
dat share <dir>
111
+
dat <dir>
112
112
```
113
113
114
-
Use `dat share` to create a dat and sync your files from your computer to other users. Dat scans your files inside `<dir>`, creating metadata in `<dir>/.dat`. Dat stores the public link, version history, and file information inside the dat folder.
114
+
Use `dat` to create a dat and sync your files from your computer to other users. Dat scans your files inside `<dir>`, creating metadata in `<dir>/.dat`. Dat stores the public link, version history, and file information inside the dat folder.
115
115
116
+
`dat sync` and `dat share` are aliases for the same command.
116
117
![share-gif]
117
118
118
119
### Downloading Data
119
120
120
121
```
121
-
dat clone dat://<link> <download-dir>
122
+
dat dat://<link> <download-dir>
122
123
```
123
124
124
-
Use `dat clone` to download files from a remote computer sharing files with Dat. This will download the files from `dat://<link>` to your `<download-dir>`. The download exits after it completes but you can continue to update the files later after the clone is done. Use `dat pull` to update new files or `dat sync` to live sync changes.
125
+
Use `dat` to download files from a remote computer sharing files with Dat. This will download the files from `dat://<link>` to your `<download-dir>`. The download exits after it completes but you can continue to update the files later after the clone is done. Use `dat pull` to update new files or `dat sync` to live sync changes.
126
+
127
+
`dat clone` is an alias for the same command.
125
128
126
129
![clone-gif]
127
130
128
-
Try out `dat clone` with the link above to read more about the protocol!
129
131
130
-
### Other Cool Commands
132
+
### Misc Commands
131
133
132
134
A few other highlights. Run `dat help` to see the full usage guide.
133
135
134
-
*`dat create` - Create an empty dat and `dat.json` file.
136
+
*`dat create`or `dat init`- Create an empty dat and `dat.json` file.
135
137
*`dat doctor` - Dat network doctor! The doctor tries to connect to a public peer. The doctor also creates a key to test direct connections.
136
138
*`dat log ~/data/dat-folder/` or `dat log dat://<key>` - view the history and metadata information for a dat.
137
139
@@ -173,18 +175,16 @@ First, you can create a new dat inside that folder. Using the `dat create` comma
173
175
❯ dat create
174
176
Welcome to dat program!
175
177
You can turn any folder on your computer into a Dat.
176
-
A Dat is a folder with some magic.
178
+
A dat is a folder with some magic.
177
179
```
178
180
179
181
This will create a new (empty) dat. Dat will print a link, share this link to give others access to view your files.
180
182
181
-
Once we have our dat, run `dat share` to scan your files and sync them to the network. Share the link with your friend to instantly start downloading files.
182
-
183
-
You can also try viewing your files online. Go to [datbase.org](https://datbase.org) and enter your link to preview on the top left. *(Some users, including me when writing this, may have trouble connecting to datbase.org initially. Don't be alarmed! It is something we are working on. Thanks.)*
183
+
Once we have our dat, run `dat <dir>` to scan your files and sync them to the network. Share the link with your friend to instantly start downloading files.
184
184
185
185
#### Bonus HTTP Demo
186
186
187
-
Dat makes it really easy to share live files on a HTTP server. This is a cool demo because we can also see how version history works! Serve dat files on HTTP with the `--http` option. For example, `dat sync --http`, serves your files to a HTTP website with live reloading and version history! This even works for dats you're downloading (add the `--sparse` option to only download files you select via HTTP). The default HTTP port is 8080.
187
+
Dat makes it really easy to share live files on a HTTP server. This is a cool demo because we can also see how version history works! Serve dat files on HTTP with the `--http` option. For example, `dat --http`, serves your files to a HTTP website with live reloading and version history! This even works for dats you're downloading (add the `--sparse` option to only download files you select via HTTP). The default HTTP port is 8080.
188
188
189
189
*Hint: Use `localhost:8080/?version=10` to view a specific version.*
190
190
@@ -223,7 +223,7 @@ dat create -y
223
223
The quickest way to get started sharing files is to `share`:
Sync will import new or updated files since you last ran `create` or `sync`.
245
-
Sync watches files for changes and imports updated files.
241
+
Start sharing your dat archive over the network. It will import new or updated files since you last ran `create` or `sync`. Dat watches files for changes and imports updated files.
246
242
247
243
* Use `--no-import` to not import any new or updated files.
248
244
* Use `--no-watch` to not watch directory for changes. `--import` must be true for `--watch` to work.
249
245
250
246
#### Ignoring Files
251
247
252
-
By default, Dat will ignore any files in a `.datignore` file, similar to git. Each file should be separated by a newline. Dat also ignores all hidden folders and files.
253
-
254
-
Dat uses [dat-ignore] to decide if a file should be ignored. Supports pattern wildcards (`/*.png`) and directory-wildcards (`/**/cache`).
248
+
By default, Dat will ignore any files in a `.datignore` file, similar to git. Each file should be separated by a newline. Dat also ignores all hidden folders and files. Supports pattern wildcards (`/*.png`) and directory-wildcards (`/**/cache`).
255
249
256
250
#### Selecting Files
257
251
@@ -260,22 +254,23 @@ By default, Dat will download all files. If you want to only download a subset,
260
254
261
255
### Downloading
262
256
263
-
Start downloading by running the `clone` command. This creates a folder, downloads the content and metadata, and a `.dat` folder inside. Once you started the download, you can resume using `clone` or the other download commands.
257
+
Start downloading by running the `clone` command. This creates a folder, downloads the content and metadata, and a `.dat` folder inside. Once you started the download, you can resume at any time.
264
258
265
259
```
266
-
dat clone <link> [<dir>] [--temp]
260
+
dat <link> [<dir>] [--temp]
267
261
```
268
262
269
263
Clone a remote dat archive to a local folder.
270
264
This will create a folder with the key name if no folder is specified.
271
265
266
+
272
267
#### Downloading via `dat.json` key
273
268
274
269
You can use a `dat.json` file to clone also. This is useful when combining Dat and git, for example. To clone a dat you can specify the path to a folder containing a `dat.json`:
This will download the dat specified in the `dat.json` file.
@@ -288,60 +283,20 @@ Once a dat is clone, you can run either `dat pull` or `dat sync` in the folder t
288
283
dat pull [<dir>]
289
284
```
290
285
291
-
Update a cloned dat archive with the latest files and exit.
292
-
293
-
```
294
-
dat sync [<dir>]
295
-
```
296
-
297
286
Download latest files and keep connection open to continue updating as remote source is updated.
298
287
299
288
### Shortcut commands
300
289
301
290
*`dat <link> <dir>` will run `dat clone` for new dats or resume the existing dat in `<dir>`
302
291
*`dat <dir>` is the same as running `dat sync <dir>`
303
292
304
-
### Dat Registry and Authentication
305
-
306
-
As part of our [Knight Foundation grant], we are building a registry for dat archives.
307
-
We will be running a dat registry at datbase.org, but anyone will be able to create their own.
308
-
Once registered, you will be able to publish dat archives from our registry.
309
-
Anyone can clone archives published to a registry without registration:
310
-
311
-
```
312
-
dat clone datbase.org/jhand/cli-demo
313
-
```
314
-
315
-
#### Auth (experimental)
316
-
317
-
You can also use the `dat` command line to register and publish to dat registries. Dat plans to support any registry. Currently, `datbase.org` is the only one available and the default.
318
-
319
-
To register and login you can use the following commands:
320
-
321
-
```
322
-
dat register [<registry>]
323
-
dat login
324
-
dat whoami
325
-
```
326
-
327
-
Once you are logged in to a registry, you can publish a dat archive:
328
-
329
-
```
330
-
cd my-data
331
-
dat create
332
-
dat publish --name my-dataset
333
-
```
334
-
335
-
All registry requests take the `<registry>` option if you'd like to publish to a different registry than datbase.org.
336
-
You can deploy your own compatible [registry server] if you'd rather use your own service.
337
-
338
293
### Key Management & Moving dats
339
294
340
295
`dat keys` provides a few commands to help you move or backup your dats.
341
296
342
297
Writing to a dat requires the secret key, stored in the `~/.dat` folder. You can export and import these keys between dats. First, clone your dat to the new location:
343
298
344
-
* (original) `dat share`
299
+
* (original) `dat share`
345
300
* (duplicate) `dat clone <link>`
346
301
347
302
Then transfer the secret key:
@@ -366,7 +321,7 @@ Check your Dat version:
366
321
dat -v
367
322
```
368
323
369
-
You should see the Dat semantic version printed, e.g. `13.1.2`.
324
+
You should see the Dat semantic version printed, e.g. `14.0.0`.
370
325
371
326
### Installation Issues
372
327
@@ -396,7 +351,7 @@ If you are having trouble with a specific command, run with the debug environmen
0 commit comments