blob: 3999d4b0ff0dddf5261a6e4f9d489b12871a4a13 [file] [log] [blame]
Jeff Vander Stoep956d1432020-09-18 13:46:24 +02001'\" t
2.\" Title: cargo-search
3.\" Author: [see the "AUTHOR(S)" section]
4.\" Generator: Asciidoctor 2.0.10
5.\" Date: 2019-09-05
6.\" Manual: \ \&
7.\" Source: \ \&
8.\" Language: English
9.\"
10.TH "CARGO\-SEARCH" "1" "2019-09-05" "\ \&" "\ \&"
11.ie \n(.g .ds Aq \(aq
12.el .ds Aq '
13.ss \n[.ss] 0
14.nh
15.ad l
16.de URL
17\fI\\$2\fP <\\$1>\\$3
18..
19.als MTO URL
20.if \n[.g] \{\
21. mso www.tmac
22. am URL
23. ad l
24. .
25. am MTO
26. ad l
27. .
28. LINKSTYLE blue R < >
29.\}
30.SH "NAME"
31cargo\-search \- Search packages in crates.io
32.SH "SYNOPSIS"
33.sp
34\fBcargo search [\fIOPTIONS\fP] [\fIQUERY\fP...]\fP
35.SH "DESCRIPTION"
36.sp
37This performs a textual search for crates on \c
38.URL "https://crates.io" "" "."
39The matching
40crates will be displayed along with their description in TOML format suitable
41for copying into a \fBCargo.toml\fP manifest.
42.SH "OPTIONS"
43.SS "Search Options"
44.sp
45\fB\-\-limit\fP \fILIMIT\fP
46.RS 4
47Limit the number of results (default: 10, max: 100).
48.RE
49.sp
50\fB\-\-index\fP \fIINDEX\fP
51.RS 4
52The URL of the registry index to use.
53.RE
54.sp
55\fB\-\-registry\fP \fIREGISTRY\fP
56.RS 4
57Name of the registry to use. Registry names are defined in \c
58.URL "https://doc.rust\-lang.org/cargo/reference/config.html" "Cargo config files" "."
59If not specified, the default registry is used, which is defined by the
60\fBregistry.default\fP config key which defaults to \fBcrates\-io\fP.
61.RE
62.SS "Display Options"
63.sp
64\fB\-v\fP, \fB\-\-verbose\fP
65.RS 4
66Use verbose output. May be specified twice for "very verbose" output which
67includes extra output such as dependency warnings and build script output.
68May also be specified with the \fBterm.verbose\fP
69.URL "https://doc.rust\-lang.org/cargo/reference/config.html" "config value" "."
70.RE
71.sp
72\fB\-q\fP, \fB\-\-quiet\fP
73.RS 4
74No output printed to stdout.
75.RE
76.sp
77\fB\-\-color\fP \fIWHEN\fP
78.RS 4
79Control when colored output is used. Valid values:
80.sp
81.RS 4
82.ie n \{\
83\h'-04'\(bu\h'+03'\c
84.\}
85.el \{\
86. sp -1
87. IP \(bu 2.3
88.\}
89\fBauto\fP (default): Automatically detect if color support is available on the
90terminal.
91.RE
92.sp
93.RS 4
94.ie n \{\
95\h'-04'\(bu\h'+03'\c
96.\}
97.el \{\
98. sp -1
99. IP \(bu 2.3
100.\}
101\fBalways\fP: Always display colors.
102.RE
103.sp
104.RS 4
105.ie n \{\
106\h'-04'\(bu\h'+03'\c
107.\}
108.el \{\
109. sp -1
110. IP \(bu 2.3
111.\}
112\fBnever\fP: Never display colors.
113.RE
114.sp
115May also be specified with the \fBterm.color\fP
116.URL "https://doc.rust\-lang.org/cargo/reference/config.html" "config value" "."
117.RE
118.SS "Common Options"
119.sp
120\fB+TOOLCHAIN\fP
121.RS 4
122If Cargo has been installed with rustup, and the first argument to \fBcargo\fP
123begins with \fB+\fP, it will be interpreted as a rustup toolchain name (such
124as \fB+stable\fP or \fB+nightly\fP).
125See the \c
126.URL "https://github.com/rust\-lang/rustup/" "rustup documentation"
127for more information about how toolchain overrides work.
128.RE
129.sp
130\fB\-h\fP, \fB\-\-help\fP
131.RS 4
132Prints help information.
133.RE
134.sp
135\fB\-Z\fP \fIFLAG\fP...
136.RS 4
137Unstable (nightly\-only) flags to Cargo. Run \fBcargo \-Z help\fP for
138details.
139.RE
140.SH "ENVIRONMENT"
141.sp
142See \c
143.URL "https://doc.rust\-lang.org/cargo/reference/environment\-variables.html" "the reference" " "
144for
145details on environment variables that Cargo reads.
146.SH "EXIT STATUS"
147.sp
1480
149.RS 4
150Cargo succeeded.
151.RE
152.sp
153101
154.RS 4
155Cargo failed to complete.
156.RE
157.SH "EXAMPLES"
158.sp
159.RS 4
160.ie n \{\
161\h'-04' 1.\h'+01'\c
162.\}
163.el \{\
164. sp -1
165. IP " 1." 4.2
166.\}
167Search for a package from crates.io:
168.sp
169.if n .RS 4
170.nf
171cargo search serde
172.fi
173.if n .RE
174.RE
175.SH "SEE ALSO"
176.sp
177\fBcargo\fP(1), \fBcargo\-install\fP(1), \fBcargo\-publish\fP(1)