Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

search

Search packages in package registries.

Usage

foton search [OPTIONS] <QUERY>...

Arguments

<QUERY>

Search query terms.

All specified query terms must match within the same package metadata field.

Options

--registry <REGISTRY_ID>

Package registry IDs to search.

Use a comma-separated list such as --registry local,foton.

--limit <LIMIT>

Maximum number of matching packages to show.

  • Default: 10

--pre-release

Allow matching pre-release versions when searching packages in registries.

Without this option, versions with a suffix such as 1.2.3-rc-1 are ignored.

Global options

--exit-on-lock

Exit immediately if the package database is locked by another operation.

--no-confirm

Skip interactive confirmation prompts.

--warnings-as-errors

Treat warnings as errors, causing the command to fail if any warning is emitted.

Examples

foton search <query>
foton search --limit 20 <query>
foton search --registry <registry-id-1>,<registry-id-2> <query>

Output

Each result shows the package name with version and the package registry ID in brackets. If the package has a description, it is printed on the next line.

Example:

example-font@1.2.3 [example]
  Example font family for UI and coding

Notes

  • By default, search does not include pre-release versions. Use --pre-release if you want pre-release versions to be included.
  • Search matches package names and descriptions only.