@@ -8,7 +8,7 @@ import { execSync } from 'child_process';
88import { isAuthenticated , browserLogin , interactiveLogin } from '../utils/auth' ;
99import { saveCredentials } from '../utils/credentials' ;
1010import { updateConfig , getApiKey } from '../utils/config' ;
11- import { buildSkillsInstallArgs } from './skills-install' ;
11+ import { buildSkillsInstallArgs , SKILL_REPOS } from './skills-install' ;
1212import { hasNpx , installSkillsNative } from './skills-native' ;
1313
1414export interface InitOptions {
@@ -216,28 +216,31 @@ async function stepIntegrations(options: InitOptions): Promise<void> {
216216 switch ( integration ) {
217217 case 'skills' : {
218218 console . log ( `\n Setting up skills...` ) ;
219- if ( hasNpx ( ) ) {
220- const args = buildSkillsInstallArgs ( {
221- agent : options . agent ,
222- yes : options . yes || options . all ,
223- global : true ,
224- includeNpxYes : true ,
225- } ) ;
226- try {
227- execSync ( args . join ( ' ' ) , { stdio : 'inherit' } ) ;
228- console . log ( ` ${ green } ✓${ reset } Skills installed` ) ;
229- } catch {
230- console . error (
231- ' Failed to install skills. Run "firecrawl setup skills" later.'
232- ) ;
233- }
234- } else {
235- try {
236- await installSkillsNative ( ) ;
237- } catch {
238- console . error (
239- ' Failed to install skills. Run "firecrawl setup skills" later.'
240- ) ;
219+ for ( const repo of SKILL_REPOS ) {
220+ if ( hasNpx ( ) ) {
221+ const args = buildSkillsInstallArgs ( {
222+ repo,
223+ agent : options . agent ,
224+ yes : options . yes || options . all ,
225+ global : true ,
226+ includeNpxYes : true ,
227+ } ) ;
228+ try {
229+ execSync ( args . join ( ' ' ) , { stdio : 'inherit' } ) ;
230+ console . log ( ` ${ green } ✓${ reset } Skills installed from ${ repo } ` ) ;
231+ } catch {
232+ console . error (
233+ ` Failed to install skills from ${ repo } . Run "firecrawl setup skills" later.`
234+ ) ;
235+ }
236+ } else {
237+ try {
238+ await installSkillsNative ( repo ) ;
239+ } catch {
240+ console . error (
241+ ` Failed to install skills from ${ repo } . Run "firecrawl setup skills" later.`
242+ ) ;
243+ }
241244 }
242245 }
243246 break ;
@@ -625,35 +628,38 @@ async function runNonInteractive(options: InitOptions): Promise<void> {
625628
626629 if ( ! options . skipSkills ) {
627630 console . log (
628- `${ stepLabel ( ) } Installing firecrawl skill for AI coding agents...`
631+ `${ stepLabel ( ) } Installing firecrawl skills for AI coding agents...`
629632 ) ;
630- if ( hasNpx ( ) ) {
631- const args = buildSkillsInstallArgs ( {
632- agent : options . agent ,
633- yes : true ,
634- global : true ,
635- includeNpxYes : true ,
636- } ) ;
637- try {
638- execSync ( args . join ( ' ' ) , { stdio : 'inherit' } ) ;
639- console . log ( `${ green } ✓${ reset } Skills installed\n` ) ;
640- } catch {
641- console . error (
642- '\nFailed to install skills. You can retry with: firecrawl setup skills'
643- ) ;
644- process . exit ( 1 ) ;
645- }
646- } else {
647- try {
648- await installSkillsNative ( ) ;
649- console . log ( '' ) ;
650- } catch {
651- console . error (
652- '\nFailed to install skills. You can retry with: firecrawl setup skills'
653- ) ;
654- process . exit ( 1 ) ;
633+ for ( const repo of SKILL_REPOS ) {
634+ if ( hasNpx ( ) ) {
635+ const args = buildSkillsInstallArgs ( {
636+ repo,
637+ agent : options . agent ,
638+ yes : true ,
639+ global : true ,
640+ includeNpxYes : true ,
641+ } ) ;
642+ try {
643+ execSync ( args . join ( ' ' ) , { stdio : 'inherit' } ) ;
644+ console . log ( `${ green } ✓${ reset } Skills installed from ${ repo } ` ) ;
645+ } catch {
646+ console . error (
647+ `\nFailed to install skills from ${ repo } . You can retry with: firecrawl setup skills`
648+ ) ;
649+ process . exit ( 1 ) ;
650+ }
651+ } else {
652+ try {
653+ await installSkillsNative ( repo ) ;
654+ } catch {
655+ console . error (
656+ `\nFailed to install skills from ${ repo } . You can retry with: firecrawl setup skills`
657+ ) ;
658+ process . exit ( 1 ) ;
659+ }
655660 }
656661 }
662+ console . log ( '' ) ;
657663 }
658664
659665 console . log (
0 commit comments