Debian Codegraph @

docs/guides/main.rst

raw
1 Getting Started
2 ===============
3
4 Welcome to beets_! This guide will help get started with improving and
5 organizing your music collection.
6
7 .. _beets: https://beets.io/
8
9 Quick Installation
10 ------------------
11
12 Beets is distributed via PyPI_ and can be installed by most users with a single
13 command:
14
15 .. include:: installation.rst
16 :start-after: <!-- start-quick-install -->
17 :end-before: <!-- end-quick-install -->
18
19 .. admonition:: Need more information?
20
21 Having trouble with the commands above? Looking for information how to
22 install plugins and keep Beets updated? See the :doc:`complete installation
23 guide </guides/installation>` for:
24
25 - Managing plugins with uv tool
26 - OS-specific installation notes
27 - Package manager options
28
29 .. _pypi: https://pypi.org/project/beets/
30
31 Basic Configuration
32 -------------------
33
34 Before using beets, you'll need a configuration file. This YAML file tells beets
35 where to store your music and how to organize it.
36
37 While beets is highly configurable, you only need a few basic settings to get
38 started.
39
40 1. **Open the config file:**
41 .. code-block:: console
42
43 beet config -e
44
45 This creates the file (if needed) and opens it in your default editor.
46 You can also find its location with ``beet config -p``.
47 2. **Add required settings:**
48 In the config file, set the ``directory`` option to the path where you
49 want beets to store your music files. Set the ``library`` option to the
50 path where you want beets to store its database file.
51
52 .. code-block:: yaml
53
54 directory: ~/music
55 library: ~/data/musiclibrary.db
56 3. **Choose your import style** (pick one):
57 Beets offers flexible import strategies to match your workflow. Choose
58 one of the following approaches and put one of the following in your
59 config file:
60
61 .. tab-set::
62
63 .. tab-item:: Copy Files (Default)
64
65 This is the default configuration and assumes you want to start a new organized music folder (inside ``directory`` above). During import we will *copy* cleaned-up music into that empty folder.
66
67 .. code-block:: yaml
68
69 import:
70 copy: yes # Copy files to new location
71
72
73 .. tab-item:: Move Files
74
75 Start with a new empty directory, but *move* new music in instead of copying it (saving disk space).
76
77 .. code-block:: yaml
78
79 import:
80 move: yes # Move files to new location
81
82 .. tab-item:: Use Existing Structure
83
84 Keep your current directory structure; importing should never move or copy files but instead just correct the tags on music. Make sure to point ``directory`` at the place where your music is currently stored.
85
86 .. code-block:: yaml
87
88 import:
89 copy: no # Use files in place
90
91 .. tab-item:: Read-Only Mode
92
93 Keep everything exactly as-is; only track metadata in database. (Corrected tags will still be stored in beets' database, and you can use them to do renaming or tag changes later.)
94
95 .. code-block:: yaml
96
97 import:
98 copy: no # Use files in place
99 write: no # Don't modify tags
100 4. **Add customization via plugins (optional):**
101 Beets comes with many plugins that extend its functionality. You can
102 enable plugins by adding a ``plugins`` section to your config file.
103
104 We recommend adding at least one :ref:`Autotagger Plugin
105 <autotagger_extensions>` to help with fetching metadata during import.
106 For getting started, :doc:`MusicBrainz </plugins/musicbrainz>` is a good
107 choice.
108
109 .. code-block:: yaml
110
111 plugins:
112 - musicbrainz # Example plugin for fetching metadata
113 - ... other plugins you want ...
114
115 You can find a list of available plugins in the :doc:`plugins index
116 </plugins/index>`.
117
118 .. _yaml: https://yaml.org/
119
120 To validate that you've set up your configuration and it is valid YAML, you can
121 type ``beet version`` to see a list of enabled plugins or ``beet config`` to get
122 a complete listing of your current configuration.
123
124 .. dropdown:: Minimal configuration
125
126 Here's a sample configuration file that includes the settings mentioned above:
127
128 .. code-block:: yaml
129
130 directory: ~/music
131 library: ~/data/musiclibrary.db
132
133 import:
134 move: yes # Move files to new location
135 # copy: no # Use files in place
136 # write: no # Don't modify tags
137
138 plugins:
139 - musicbrainz # Example plugin for fetching metadata
140 # - ... other plugins you want ...
141
142 You can copy and paste this into your config file and modify it as needed.
143
144 .. admonition:: Ready for more?
145
146 For a complete reference of all configuration options, see the
147 :doc:`configuration reference </reference/config>`.
148
149 Importing Your Music
150 --------------------
151
152 Now you're ready to import your music into beets!
153
154 .. important::
155
156 Importing can modify and move your music files. **Make sure you have a
157 recent backup** before proceeding.
158
159 Choose Your Import Method
160 ~~~~~~~~~~~~~~~~~~~~~~~~~
161
162 There are two good ways to bring your *existing* library into beets database.
163
164 .. tab-set::
165
166 .. tab-item:: Autotag (Recommended)
167
168 This method uses beets' autotagger to find canonical metadata for every album you import. It may take a while, especially for large libraries, and it's an interactive process. But it ensures all your songs' tags are exactly right from the get-go.
169
170 .. code-block:: console
171
172 beet import /a/chunk/of/my/library
173
174 .. warning::
175
176 The point about speed bears repeating: using the autotagger on a large library can take a
177 very long time, and it's an interactive process. So set aside a good chunk of
178 time if you're going to go that route.
179
180 We also recommend importing smaller batches of music at a time (e.g., a few albums) to make the process more manageable. For more on the interactive tagging
181 process, see :doc:`tagger`.
182
183
184 .. tab-item:: Quick Import
185
186 This method quickly brings all your files with all their current metadata into beets' database without any changes. It's really fast, but it doesn't clean up or correct any tags.
187
188 To use this method, run:
189
190 .. code-block:: console
191
192 beet import --noautotag /my/huge/mp3/library
193
194 The ``--noautotag`` / ``-A`` flag skips autotagging and uses your files' current metadata.
195
196 .. admonition:: More Import Options
197
198 The ``beet import`` command has many options to customize its behavior. For
199 a full list, type ``beet help import`` or see the :ref:`import command
200 reference <import-cmd>`.
201
202 Adding More Music Later
203 ~~~~~~~~~~~~~~~~~~~~~~~
204
205 When you acquire new music, use the same ``beet import`` command to add it to
206 your library:
207
208 .. code-block:: console
209
210 beet import ~/new_totally_not_ripped_album
211
212 This will apply the same autotagging process to your new additions. For
213 alternative import behaviors, consult the options mentioned above.
214
215 Seeing Your Music
216 -----------------
217
218 Once you've imported music into beets, you'll want to explore and query your
219 library. Beets provides several commands for searching, browsing, and getting
220 statistics about your collection.
221
222 Basic Searching
223 ~~~~~~~~~~~~~~~
224
225 The ``beet list`` command (shortened to ``beet ls``) lets you search your music
226 library using :doc:`query string </reference/query>` similar to web searches:
227
228 .. code-block:: console
229
230 $ beet ls the magnetic fields
231 The Magnetic Fields - Distortion - Three-Way
232 The Magnetic Fields - Dist
233 The Magnetic Fields - Distortion - Old Fools
234
235 .. code-block:: console
236
237 $ beet ls hissing gronlandic
238 of Montreal - Hissing Fauna, Are You the Destroyer? - Gronlandic Edit
239
240 .. code-block:: console
241
242 $ beet ls bird
243 The Knife - The Knife - Bird
244 The Mae Shi - Terrorbird - Revelation Six
245
246 By default, search terms match against :ref:`common attributes <keywordquery>`
247 of songs, and multiple terms are combined with AND logic (a track must match
248 *all* criteria).
249
250 Searching Specific Fields
251 ~~~~~~~~~~~~~~~~~~~~~~~~~
252
253 To narrow a search term to a particular metadata field, prefix the term with the
254 field name followed by a colon. For example, ``album:bird`` searches for "bird"
255 only in the "album" field of your songs. For more details, see
256 :doc:`/reference/query/`.
257
258 .. code-block:: console
259
260 $ beet ls album:bird
261 The Mae Shi - Terrorbird - Revelation Six
262
263 This searches only the ``album`` field for the term ``bird``.
264
265 Searching for Albums
266 ~~~~~~~~~~~~~~~~~~~~
267
268 The ``beet list`` command also has an ``-a`` option, which searches for albums
269 instead of songs:
270
271 .. code-block:: console
272
273 $ beet ls -a forever
274 Bon Iver - For Emma, Forever Ago
275 Freezepop - Freezepop Forever
276
277 Custom Output Formatting
278 ~~~~~~~~~~~~~~~~~~~~~~~~
279
280 There's also an ``-f`` option (for *format*) that lets you specify what gets
281 displayed in the results of a search:
282
283 .. code-block:: console
284
285 $ beet ls -a forever -f "[$format] $album ($year) - $artist - $title"
286 [MP3] For Emma, Forever Ago (2009) - Bon Iver - Flume
287 [AAC] Freezepop Forever (2011) - Freezepop - Harebrained Scheme
288
289 In the format string, field references like ``$format``, ``$year``, ``$album``,
290 etc., are replaced with data from each result.
291
292 .. dropdown:: Available fields for formatting
293
294 To see all available fields you can use in custom formats, run:
295
296 .. code-block:: console
297
298 beet fields
299
300 This will display a comprehensive list of metadata fields available for your music.
301
302 Library Statistics
303 ~~~~~~~~~~~~~~~~~~
304
305 Beets can also show you statistics about your music collection:
306
307 .. code-block:: console
308
309 $ beet stats
310 Tracks: 13019
311 Total time: 4.9 weeks
312 Total size: 71.1 GB
313 Artists: 548
314 Albums: 1094
315
316 .. admonition:: Ready for more advanced queries?
317
318 The ``beet list`` command has many additional options for sorting, limiting
319 results, and more complex queries. For a complete reference, run:
320
321 .. code-block:: console
322
323 beet help list
324
325 Or see the :ref:`list command reference <list-cmd>`.
326
327 Keep Playing
328 ------------
329
330 Congratulations! You've now mastered the basics of beets. But this is only the
331 beginning, beets has many more powerful features to explore.
332
333 Continue Your Learning Journey
334 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
335
336 *I was there to push people beyond what's expected of them.*
337
338 .. grid:: 2
339 :gutter: 3
340
341 .. grid-item-card:: :octicon:`zap` Advanced Techniques
342 :link: advanced
343 :link-type: doc
344
345 Explore sophisticated beets workflows including:
346
347 - Advanced tagging strategies
348 - Complex import scenarios
349 - Custom metadata management
350 - Workflow automation
351
352 .. grid-item-card:: :octicon:`terminal` Command Reference
353 :link: /reference/cli
354 :link-type: doc
355
356 Comprehensive guide to all beets commands:
357
358 - Complete command syntax
359 - All available options
360 - Usage examples
361 - **Important operations like deleting music**
362
363 .. grid-item-card:: :octicon:`plug` Plugin Ecosystem
364 :link: /plugins/index
365 :link-type: doc
366
367 Discover beets' true power through plugins:
368
369 - Metadata fetching from multiple sources
370 - Audio analysis and processing
371 - Streaming service integration
372 - Custom export formats
373
374 .. grid-item-card:: :octicon:`question` Illustrated Walkthrough
375 :link: https://beets.io/blog/walkthrough.html
376 :link-type: url
377
378 Visual, step-by-step guide covering:
379
380 - Real-world import examples
381 - Screenshots of interactive tagging
382 - Common workflow patterns
383 - Troubleshooting tips
384
385 .. admonition:: Need Help?
386
387 Remember you can always use ``beet help`` to see all available commands, or
388 ``beet help [command]`` for detailed help on specific commands.
389
390 Join the Community
391 ~~~~~~~~~~~~~~~~~~
392
393 We'd love to hear about your experience with beets!
394
395 .. grid:: 2
396 :gutter: 2
397
398 .. grid-item-card:: :octicon:`comment-discussion` Discussion Board
399 :link: https://github.com/beetbox/beets/discussions
400 :link-type: url
401
402 - Ask questions
403 - Share tips and tricks
404 - Discuss feature ideas
405 - Get help from other users
406
407 .. grid-item-card:: :octicon:`git-pull-request` Developer Resources
408 :link: /dev/index
409 :link-type: doc
410
411 - Contribute code
412 - Report issues
413 - Review pull requests
414 - Join development discussions
415
416 .. admonition:: Found a Bug?
417
418 If you encounter any issues, please report them on our `GitHub Issues page
419 <https://github.com/beetbox/beets/issues>`_.