Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,7 @@ firecrawl developer "axum middleware ordering"
| Option | Description |
| --------------------- | ----------------------------------------- |
| `--limit <n>` | Number of results (default: 20, max: 100) |
| `--skills-only` | Search only agent-skill files |
| `-o, --output <path>` | Save to file |
| `--json` | Output as compact JSON |
| `--pretty` | Pretty print JSON output |
Expand Down
1 change: 1 addition & 0 deletions src/__tests__/cli-argv.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ describe('CLI argv parsing', () => {
expect(result.status).toBe(0);
expect(result.stdout).toContain('Usage: firecrawl developer');
expect(result.stdout).toContain('--limit');
expect(result.stdout).toContain('--skills-only');
expect(result.stderr).not.toContain('unknown command');
});

Expand Down
13 changes: 13 additions & 0 deletions src/__tests__/commands/developer.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,19 @@ describe('handleDeveloperSearchCommand', () => {
);
});

it('passes skills=only when skillsOnly is set', async () => {
mockHttpGet.mockResolvedValue(mockDeveloperResponse([sampleResult]));

await handleDeveloperSearchCommand({
query: 'tokio spawn_blocking',
skillsOnly: true,
});

expect(mockHttpGet).toHaveBeenCalledWith(
'/v2/developer/search?query=tokio+spawn_blocking&skills=only&integration=cli'
);
});

it('passes k when a limit is provided', async () => {
mockHttpGet.mockResolvedValue(mockDeveloperResponse([sampleResult]));

Expand Down
1 change: 1 addition & 0 deletions src/commands/developer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ export async function handleDeveloperSearchCommand(
const params = new URLSearchParams();
params.append('query', options.query);
if (options.k != null) params.append('k', String(options.k));
if (options.skillsOnly) params.append('skills', 'only');
const data = await getDeveloper<{ results?: DeveloperItem[] }>(
`${BASE}?${params.toString()}`,
options
Expand Down
2 changes: 2 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1063,6 +1063,7 @@ function createDeveloperCommand(): Command {
parseInt
)
.addOption(new Option('--k <number>').argParser(parseInt).hideHelp())
.option('--skills-only', 'Search only agent-skill files', false)
.option(
'-k, --api-key <key>',
'Firecrawl API key (overrides global --api-key)'
Expand All @@ -1083,6 +1084,7 @@ Examples:
await handleDeveloperSearchCommand({
query,
k: researchLimit(options),
skillsOnly: options.skillsOnly,
apiKey: options.apiKey,
apiUrl: options.apiUrl,
output: options.output,
Expand Down
1 change: 1 addition & 0 deletions src/types/developer.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
export interface DeveloperSearchOptions {
query: string;
k?: number;
skillsOnly?: boolean;
apiKey?: string;
apiUrl?: string;
output?: string;
Expand Down
Loading