ドキュメント

cockpit project

cockpit projectの構文、オプション、結果、制約をcockpit CLIの正本から自動生成したリファレンスです。

対象
CLI
WindowsmacOSLinux

最終検証 2026-08-27 · v4.61.0

Markdown

最新バージョンでは、画面や操作が一部異なる場合があります。

このReference本文は、アプリが配布するcockpit CLIヘルプと同じ英語の正本から自動生成されています。日本語の概念説明と安全な使い方はcockpit CLIを参照してください。

Read and change the icon shown next to a project in the sidebar, in the overview board, and in the PWA task list. Every command returns JSON, acts on one project directory at a time, and is local-only.

cockpit project icon get [--directory <path>]
cockpit project icon set <image-path> [--directory <path>]
cockpit project icon reset [--directory <path>]

--directory defaults to the current working directory and is resolved to an absolute path. The project is identified by that directory, the same key the sidebar uses, so a worktree and its main checkout are separate projects.

get returns the icon that is actually rendered for the project. source is user when someone chose the icon, detected when Cockpit found it inside the project (public/favicon.svg, a web manifest icons entry, apple-touch-icon.png, favicon.ico, and the other fixed candidates), and none when the project falls back to the default folder treatment. dataUrl is the encoded image and bytes its length.

cockpit project icon get --directory /Users/me/repos/app
{"ok":true,"data":{"directory":"/Users/me/repos/app","directoryKey":"/Users/me/repos/app","source":"detected","dataUrl":"data:image/svg+xml;base64,...","bytes":246}}

set takes a path to a local image file. Nothing is ever fetched over the network. The file must exist, carry one of svg, png, webp, jpg, jpeg, gif, avif, ico, and its contents must match that extension — a renamed text file is rejected with unsupported_image. Files above 16 MB are rejected with file_too_large, and a missing path with file_not_found. A raster image is decoded and normalized to a 32 px square before it is stored, so a large PNG or JPEG is fine. An SVG is stored as-is and is never resized, so it must stay under the 64 KB encoded ceiling — roughly a 47 KB source file. A valid image that does not fit once encoded is rejected with image_too_large_encoded, which is a different code from unsupported_image so it is distinguishable from a file that is not an image at all. The chosen icon is persisted per project, survives a restart, and is pushed to open windows and connected PWA clients immediately.

reset removes the chosen icon and returns the project to the automatically detected icon, or to the default folder treatment when the project has none. It re-runs detection, so it is also the way to pick up an icon that was added to the project after Cockpit first looked.

cockpit project icon set ./public/favicon.svg --directory /Users/me/repos/app
cockpit project icon reset --directory /Users/me/repos/app