This downloads a Kit's assets directly into the project — useful for self-hosting or desktop use.
- Ask the user for their Kit code.
- Verify the user is authenticated for Kit download. Run
fa whoamito check login status.- If logged in → proceed.
- If not logged in, check if
FA_API_TOKENis set → if yes, proceed. - If neither, tell the user:
You need to be logged in to the Font Awesome CLI to download your Kit. Run
fa loginin a separate terminal, then come back here and try again. Alternatively, set theFA_API_TOKENenvironment variable with your API token from https://fontawesome.com/account/general.
- Determine the download type:
- Web project:
fa kit download --kit-token <code> --unzip --output <dir> web - Desktop project:
fa kit download --kit-token <code> --unzip --output <dir> desktopChoose the output directory based on the project structure — e.g.,vendor/fontawesome,public/fontawesome,assets/fontawesome, or ask the user.
- Web project:
- Run the download command and verify the files were extracted.
- For web projects, add the appropriate
<link>or<script>tag pointing to the local files (follow the self-hosting docs fetched earlier).