master
text 113 lines 1.64 KB
Raw
1 # 0.1 - Quick Start
2
3 This is a set of short examples with minimal explanation. It is meant as
4 a "quick start".
5
6
7 Add a file to ipfs:
8
9 echo "hello world" >hello
10 ipfs add hello
11
12
13 View it:
14
15 ipfs cat <the-hash-you-got-here>
16
17
18 Try a directory:
19
20 mkdir foo
21 mkdir foo/bar
22 echo "baz" > foo/baz
23 echo "baz" > foo/bar/baz
24 ipfs add -r foo
25
26
27 View things:
28
29 ipfs ls <the-hash-here>
30 ipfs ls <the-hash-here>/bar
31 ipfs cat <the-hash-here>/baz
32 ipfs cat <the-hash-here>/bar/baz
33 ipfs cat <the-hash-here>/bar
34 ipfs ls <the-hash-here>/baz
35
36
37 References:
38
39 ipfs refs <the-hash-here>
40 ipfs refs -r <the-hash-here>
41 ipfs refs --help
42
43
44 Get:
45
46 ipfs get <the-hash-here> -o foo2
47 diff foo foo2
48
49
50 Objects:
51
52 ipfs object get <the-hash-here>
53 ipfs object get <the-hash-here>/foo2
54 ipfs object --help
55
56
57 Pin + GC:
58
59 ipfs pin add <the-hash-here>
60 ipfs repo gc
61 ipfs ls <the-hash-here>
62 ipfs pin rm <the-hash-here>
63 ipfs repo gc
64
65
66 Daemon:
67
68 ipfs daemon (in another terminal)
69 ipfs id
70
71
72 Network:
73
74 (must be online)
75 ipfs swarm peers
76 ipfs id
77 ipfs cat <hash-of-remote-object>
78
79
80 Mount:
81
82 (warning: fuse is finicky!)
83 ipfs mount
84 cd /ipfs/<the-hash-here>
85 ls
86
87
88 Tool:
89
90 ipfs version
91 ipfs update
92 ipfs commands
93 ipfs config --help
94 open http://localhost:5001/webui
95
96
97 Browse:
98
99 WebUI:
100
101 http://localhost:5001/webui
102
103 video:
104
105 http://localhost:8080/ipfs/QmVc6zuAneKJzicnJpfrqCH9gSy6bz54JhcypfJYhGUFQu/play#/ipfs/QmTKZgRNwDNZwHtJSjCp6r5FYefzpULfy37JvMt9DwvXse
106
107 images:
108
109 http://localhost:8080/ipfs/QmZpc3HvfjEXvLWGQPWbHk3AjD5j8NEN4gmFN8Jmrd5g83/cs
110
111 markdown renderer app:
112
113 http://localhost:8080/ipfs/QmX7M9CiYXjVeFnkfVGf3y5ixTZ2ACeSGyL1vBJY1HvQPp/mdown