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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ firecrawl developer "axum middleware ordering"

| Option | Description |
| --------------------- | ----------------------------------------- |
| `--limit <n>` | Number of results (default: 20, max: 100) |
| `--limit <n>` | Number of results (default: 10, max: 100) |
| `--skills-only` | Search only agent-skill files |
| `-o, --output <path>` | Save to file |
| `--json` | Output as compact JSON |
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "firecrawl-cli",
"version": "1.19.28",
"version": "1.19.29",
"description": "Command-line interface for Firecrawl. Scrape, crawl, and extract data from any website directly from your terminal.",
"main": "dist/index.js",
"bin": {
Expand Down
10 changes: 5 additions & 5 deletions src/__tests__/commands/developer.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ describe('handleDeveloperSearchCommand', () => {
let mockHttpGet: ReturnType<typeof vi.fn>;

// Wrap a payload in the axios envelope returned by `client.http.get`.
// Mirrors the `/v2/developer/search` response shape:
// Mirrors the `/v2/search/developer` response shape:
// { success, results: [{ id, type, url, title, passages: [{ text }] }] }
const mockDeveloperResponse = (results: any[]) => ({
data: { success: true, results },
Expand Down Expand Up @@ -56,14 +56,14 @@ describe('handleDeveloperSearchCommand', () => {
});

describe('API call generation', () => {
it('calls /v2/developer/search with the query and integration tag', async () => {
it('calls /v2/search/developer with the query and integration tag', async () => {
mockHttpGet.mockResolvedValue(mockDeveloperResponse([sampleResult]));

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

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

Expand All @@ -76,7 +76,7 @@ describe('handleDeveloperSearchCommand', () => {
});

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

Expand All @@ -89,7 +89,7 @@ describe('handleDeveloperSearchCommand', () => {
});

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

Expand Down
4 changes: 3 additions & 1 deletion src/commands/developer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ import { getClient, isKeylessMode, keylessGet } from '../utils/client';
import { writeOutput } from '../utils/output';
import type { DeveloperItem, DeveloperSearchOptions } from '../types/developer';

const BASE = '/v2/developer/search';
// The other mount, /v2/developer/search, rejects keyless callers and may be
// withdrawn.
const BASE = '/v2/search/developer';
const MAX_PASSAGE_CHARS = 1200;

async function getDeveloper<T>(
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1059,7 +1059,7 @@ function createDeveloperCommand(): Command {
.argument('<query>', 'Natural-language developer question or search phrase')
.option(
'--limit <number>',
'Number of results to return (default: 20, max: 100)',
'Number of results to return (default: 10, max: 100)',
parseInt
)
.addOption(new Option('--k <number>').argParser(parseInt).hideHelp())
Expand Down
Loading