Skip to content
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ See [`hackernews/top.yaml`](src/clis/hackernews/top.yaml) for a real example.
Create a file like `src/clis/<site>/<command>.ts`:

```typescript
import { cli, Strategy } from '../../registry.js';
import { cli, Strategy } from '../../src/registry.js';

cli({
site: 'mysite',
Expand Down
8 changes: 4 additions & 4 deletions clis/1688/item.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { CommandExecutionError } from '../../errors.js';
import { cli, Strategy } from '../../registry.js';
import type { IPage } from '../../types.js';
import { isRecord } from '../../utils.js';
import { CommandExecutionError } from '../../src/errors.js';
import { cli, Strategy } from '../../src/registry.js';
import type { IPage } from '../../src/types.js';
import { isRecord } from '../../src/utils.js';
import {
assertAuthenticatedState,
buildDetailUrl,
Expand Down
6 changes: 3 additions & 3 deletions clis/1688/search.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { CommandExecutionError, EmptyResultError } from '../../errors.js';
import { cli, Strategy } from '../../registry.js';
import type { IPage } from '../../types.js';
import { CommandExecutionError, EmptyResultError } from '../../src/errors.js';
import { cli, Strategy } from '../../src/registry.js';
import type { IPage } from '../../src/types.js';
import {
FACTORY_BADGE_PATTERNS,
SERVICE_BADGE_PATTERNS,
Expand Down
4 changes: 2 additions & 2 deletions clis/1688/shared.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ArgumentError, AuthRequiredError, CommandExecutionError } from '../../errors.js';
import type { IPage } from '../../types.js';
import { ArgumentError, AuthRequiredError, CommandExecutionError } from '../../src/errors.js';
import type { IPage } from '../../src/types.js';

export const SITE = '1688';
export const HOME_URL = 'https://www.1688.com/';
Expand Down
6 changes: 3 additions & 3 deletions clis/1688/store.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { CommandExecutionError, EmptyResultError } from '../../errors.js';
import { cli, Strategy } from '../../registry.js';
import type { IPage } from '../../types.js';
import { CommandExecutionError, EmptyResultError } from '../../src/errors.js';
import { cli, Strategy } from '../../src/registry.js';
import type { IPage } from '../../src/types.js';
import {
FACTORY_BADGE_PATTERNS,
SERVICE_BADGE_PATTERNS,
Expand Down
6 changes: 3 additions & 3 deletions clis/36kr/article.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
*
* Fetches the full content of a 36kr article given its ID or URL.
*/
import { cli, Strategy } from '../../registry.js';
import { CliError } from '../../errors.js';
import type { IPage } from '../../types.js';
import { cli, Strategy } from '../../src/registry.js';
import { CliError } from '../../src/errors.js';
import type { IPage } from '../../src/types.js';

/** Extract article ID from a full URL or a bare numeric ID string */
function parseArticleId(input: string): string {
Expand Down
6 changes: 3 additions & 3 deletions clis/36kr/hot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
* Navigates to the 36kr hot-list page and scrapes rendered article links.
* Supports category types: renqi (人气), zonghe (综合), shoucang (收藏), catalog (综合热门).
*/
import { cli, Strategy } from '../../registry.js';
import { CliError } from '../../errors.js';
import type { IPage } from '../../types.js';
import { cli, Strategy } from '../../src/registry.js';
import { CliError } from '../../src/errors.js';
import type { IPage } from '../../src/types.js';

const TYPE_MAP: Record<string, string> = {
renqi: '人气榜',
Expand Down
2 changes: 1 addition & 1 deletion clis/36kr/news.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* 36kr latest news — public RSS feed, no browser needed.
*/
import { cli, Strategy } from '../../registry.js';
import { cli, Strategy } from '../../src/registry.js';

cli({
site: '36kr',
Expand Down
6 changes: 3 additions & 3 deletions clis/36kr/search.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
*
* Navigates to the 36kr search results page and scrapes rendered articles.
*/
import { cli, Strategy } from '../../registry.js';
import { CliError } from '../../errors.js';
import type { IPage } from '../../types.js';
import { cli, Strategy } from '../../src/registry.js';
import { CliError } from '../../src/errors.js';
import type { IPage } from '../../src/types.js';

cli({
site: '36kr',
Expand Down
6 changes: 3 additions & 3 deletions clis/_shared/desktop-commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
*/

import * as fs from 'node:fs';
import { cli, Strategy } from '../../registry.js';
import type { IPage } from '../../types.js';
import type { CliOptions } from '../../registry.js';
import { cli, Strategy } from '../../src/registry.js';
import type { IPage } from '../../src/types.js';
import type { CliOptions } from '../../src/registry.js';

/**
* Factory: capture DOM HTML + accessibility snapshot.
Expand Down
2 changes: 1 addition & 1 deletion clis/amazon/bestsellers.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { cli } from '../../registry.js';
import { cli } from '../../src/registry.js';
import { createRankingCliOptions } from './rankings.js';

cli(createRankingCliOptions({
Expand Down
6 changes: 3 additions & 3 deletions clis/amazon/discussion.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { CommandExecutionError } from '../../errors.js';
import { cli, Strategy } from '../../registry.js';
import type { IPage } from '../../types.js';
import { CommandExecutionError } from '../../src/errors.js';
import { cli, Strategy } from '../../src/registry.js';
import type { IPage } from '../../src/types.js';
import {
buildDiscussionUrl,
buildProvenance,
Expand Down
2 changes: 1 addition & 1 deletion clis/amazon/movers-shakers.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { cli } from '../../registry.js';
import { cli } from '../../src/registry.js';
import { createRankingCliOptions } from './rankings.js';

cli(createRankingCliOptions({
Expand Down
2 changes: 1 addition & 1 deletion clis/amazon/new-releases.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { cli } from '../../registry.js';
import { cli } from '../../src/registry.js';
import { createRankingCliOptions } from './rankings.js';

cli(createRankingCliOptions({
Expand Down
6 changes: 3 additions & 3 deletions clis/amazon/offer.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { CommandExecutionError } from '../../errors.js';
import { cli, Strategy } from '../../registry.js';
import type { IPage } from '../../types.js';
import { CommandExecutionError } from '../../src/errors.js';
import { cli, Strategy } from '../../src/registry.js';
import type { IPage } from '../../src/types.js';
import {
buildProductUrl,
buildProvenance,
Expand Down
6 changes: 3 additions & 3 deletions clis/amazon/product.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { CommandExecutionError } from '../../errors.js';
import { cli, Strategy } from '../../registry.js';
import type { IPage } from '../../types.js';
import { CommandExecutionError } from '../../src/errors.js';
import { cli, Strategy } from '../../src/registry.js';
import type { IPage } from '../../src/types.js';
import {
buildProductUrl,
buildProvenance,
Expand Down
6 changes: 3 additions & 3 deletions clis/amazon/rankings.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { CommandExecutionError } from '../../errors.js';
import { Strategy, type CliOptions } from '../../registry.js';
import type { IPage } from '../../types.js';
import { CommandExecutionError } from '../../src/errors.js';
import { Strategy, type CliOptions } from '../../src/registry.js';
import type { IPage } from '../../src/types.js';
import {
assertUsableState,
buildProvenance,
Expand Down
6 changes: 3 additions & 3 deletions clis/amazon/search.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { CommandExecutionError } from '../../errors.js';
import { cli, Strategy } from '../../registry.js';
import type { IPage } from '../../types.js';
import { CommandExecutionError } from '../../src/errors.js';
import { cli, Strategy } from '../../src/registry.js';
import type { IPage } from '../../src/types.js';
import {
buildProvenance,
buildSearchUrl,
Expand Down
4 changes: 2 additions & 2 deletions clis/amazon/shared.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ArgumentError, CommandExecutionError } from '../../errors.js';
import type { IPage } from '../../types.js';
import { ArgumentError, CommandExecutionError } from '../../src/errors.js';
import type { IPage } from '../../src/types.js';

export const SITE = 'amazon';
export const DOMAIN = 'amazon.com';
Expand Down
2 changes: 1 addition & 1 deletion clis/antigravity/dump.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { cli, Strategy } from '../../registry.js';
import { cli, Strategy } from '../../src/registry.js';
import * as fs from 'node:fs';

export const dumpCommand = cli({
Expand Down
2 changes: 1 addition & 1 deletion clis/antigravity/extract-code.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { cli, Strategy } from '../../registry.js';
import { cli, Strategy } from '../../src/registry.js';

export const extractCodeCommand = cli({
site: 'antigravity',
Expand Down
2 changes: 1 addition & 1 deletion clis/antigravity/model.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { cli, Strategy } from '../../registry.js';
import { cli, Strategy } from '../../src/registry.js';

export const modelCommand = cli({
site: 'antigravity',
Expand Down
2 changes: 1 addition & 1 deletion clis/antigravity/new.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { cli, Strategy } from '../../registry.js';
import { cli, Strategy } from '../../src/registry.js';

export const newCommand = cli({
site: 'antigravity',
Expand Down
2 changes: 1 addition & 1 deletion clis/antigravity/read.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { cli, Strategy } from '../../registry.js';
import { cli, Strategy } from '../../src/registry.js';

export const readCommand = cli({
site: 'antigravity',
Expand Down
2 changes: 1 addition & 1 deletion clis/antigravity/send.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { cli, Strategy } from '../../registry.js';
import { cli, Strategy } from '../../src/registry.js';

export const sendCommand = cli({
site: 'antigravity',
Expand Down
6 changes: 3 additions & 3 deletions clis/antigravity/serve.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@

import { createServer, type IncomingMessage, type ServerResponse } from 'node:http';
import { CDPBridge } from '../../browser/cdp.js';
import type { IPage } from '../../types.js';
import { resolveElectronEndpoint } from '../../launcher.js';
import { EXIT_CODES, getErrorMessage } from '../../errors.js';
import type { IPage } from '../../src/types.js';
import { resolveElectronEndpoint } from '../../src/launcher.js';
import { EXIT_CODES, getErrorMessage } from '../../src/errors.js';

// ─── Types ───────────────────────────────────────────────────────────

Expand Down
2 changes: 1 addition & 1 deletion clis/antigravity/status.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { cli, Strategy } from '../../registry.js';
import { cli, Strategy } from '../../src/registry.js';

export const statusCommand = cli({
site: 'antigravity',
Expand Down
2 changes: 1 addition & 1 deletion clis/antigravity/watch.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { cli, Strategy } from '../../registry.js';
import { cli, Strategy } from '../../src/registry.js';

export const watchCommand = cli({
site: 'antigravity',
Expand Down
2 changes: 1 addition & 1 deletion clis/apple-podcasts/commands.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { beforeEach, describe, expect, it, vi } from 'vitest';
import { getRegistry } from '../../registry.js';
import { getRegistry } from '../../src/registry.js';
import './search.js';
import './top.js';

Expand Down
4 changes: 2 additions & 2 deletions clis/apple-podcasts/episodes.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { cli, Strategy } from '../../registry.js';
import { CliError } from '../../errors.js';
import { cli, Strategy } from '../../src/registry.js';
import { CliError } from '../../src/errors.js';
import { itunesFetch, formatDuration, formatDate } from './utils.js';

cli({
Expand Down
4 changes: 2 additions & 2 deletions clis/apple-podcasts/search.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { cli, Strategy } from '../../registry.js';
import { CliError } from '../../errors.js';
import { cli, Strategy } from '../../src/registry.js';
import { CliError } from '../../src/errors.js';
import { itunesFetch } from './utils.js';

cli({
Expand Down
4 changes: 2 additions & 2 deletions clis/apple-podcasts/top.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { cli, Strategy } from '../../registry.js';
import { CliError } from '../../errors.js';
import { cli, Strategy } from '../../src/registry.js';
import { CliError } from '../../src/errors.js';

// Apple Marketing Tools RSS API — public, no key required
const CHARTS_URL = 'https://rss.marketingtools.apple.com/api/v2';
Expand Down
2 changes: 1 addition & 1 deletion clis/apple-podcasts/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* https://developer.apple.com/library/archive/documentation/AudioVideo/Conceptual/iTuneSearchAPI/
*/

import { CliError } from '../../errors.js';
import { CliError } from '../../src/errors.js';

const BASE = 'https://itunes.apple.com';

Expand Down
4 changes: 2 additions & 2 deletions clis/arxiv/paper.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { cli, Strategy } from '../../registry.js';
import { CliError } from '../../errors.js';
import { cli, Strategy } from '../../src/registry.js';
import { CliError } from '../../src/errors.js';
import { arxivFetch, parseEntries } from './utils.js';

cli({
Expand Down
4 changes: 2 additions & 2 deletions clis/arxiv/search.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { cli, Strategy } from '../../registry.js';
import { CliError } from '../../errors.js';
import { cli, Strategy } from '../../src/registry.js';
import { CliError } from '../../src/errors.js';
import { arxivFetch, parseEntries } from './utils.js';

cli({
Expand Down
2 changes: 1 addition & 1 deletion clis/arxiv/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* https://info.arxiv.org/help/api/index.html
*/

import { CliError } from '../../errors.js';
import { CliError } from '../../src/errors.js';

export const ARXIV_BASE = 'https://export.arxiv.org/api/query';

Expand Down
4 changes: 2 additions & 2 deletions clis/band/bands.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { AuthRequiredError, EmptyResultError } from '../../errors.js';
import { cli, Strategy } from '../../registry.js';
import { AuthRequiredError, EmptyResultError } from '../../src/errors.js';
import { cli, Strategy } from '../../src/registry.js';

/**
* band bands — List all Bands you belong to.
Expand Down
4 changes: 2 additions & 2 deletions clis/band/mentions.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { AuthRequiredError, EmptyResultError, SelectorError } from '../../errors.js';
import { cli, Strategy } from '../../registry.js';
import { AuthRequiredError, EmptyResultError, SelectorError } from '../../src/errors.js';
import { cli, Strategy } from '../../src/registry.js';

/**
* band mentions — Show Band notifications where you were @mentioned.
Expand Down
4 changes: 2 additions & 2 deletions clis/band/post.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { AuthRequiredError, EmptyResultError } from '../../errors.js';
import { AuthRequiredError, EmptyResultError } from '../../src/errors.js';
import { formatCookieHeader } from '../../download/index.js';
import { downloadMedia } from '../../download/media-download.js';
import { cli, Strategy } from '../../registry.js';
import { cli, Strategy } from '../../src/registry.js';

/**
* band post — Export full content of a Band post: body, comments, and optional photo download.
Expand Down
4 changes: 2 additions & 2 deletions clis/band/posts.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { AuthRequiredError, EmptyResultError } from '../../errors.js';
import { cli, Strategy } from '../../registry.js';
import { AuthRequiredError, EmptyResultError } from '../../src/errors.js';
import { cli, Strategy } from '../../src/registry.js';

/**
* band posts — List posts from a specific Band.
Expand Down
2 changes: 1 addition & 1 deletion clis/barchart/flow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Shows high volume/OI ratio trades that may indicate institutional activity.
* Auth: CSRF token from <meta name="csrf-token"> + session cookies.
*/
import { cli, Strategy } from '../../registry.js';
import { cli, Strategy } from '../../src/registry.js';

cli({
site: 'barchart',
Expand Down
2 changes: 1 addition & 1 deletion clis/barchart/greeks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* for near-the-money options on a given symbol.
* Auth: CSRF token from <meta name="csrf-token"> + session cookies.
*/
import { cli, Strategy } from '../../registry.js';
import { cli, Strategy } from '../../src/registry.js';

cli({
site: 'barchart',
Expand Down
2 changes: 1 addition & 1 deletion clis/barchart/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Barchart options chain — strike, bid/ask, volume, OI, greeks, IV.
* Auth: CSRF token from <meta name="csrf-token"> + session cookies.
*/
import { cli, Strategy } from '../../registry.js';
import { cli, Strategy } from '../../src/registry.js';

cli({
site: 'barchart',
Expand Down
2 changes: 1 addition & 1 deletion clis/barchart/quote.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Barchart stock quote — price, volume, market cap, P/E, EPS, and key metrics.
* Auth: CSRF token from <meta name="csrf-token"> + session cookies.
*/
import { cli, Strategy } from '../../registry.js';
import { cli, Strategy } from '../../src/registry.js';

cli({
site: 'barchart',
Expand Down
2 changes: 1 addition & 1 deletion clis/bbc/news.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* BBC News headlines — public RSS feed, no browser needed.
*/
import { cli, Strategy } from '../../registry.js';
import { cli, Strategy } from '../../src/registry.js';

cli({
site: 'bbc',
Expand Down
2 changes: 1 addition & 1 deletion clis/bilibili/comments.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ vi.mock('./utils.js', async (importOriginal) => ({
apiGet: mockApiGet,
}));

import { getRegistry } from '../../registry.js';
import { getRegistry } from '../../src/registry.js';
import './comments.js';

describe('bilibili comments', () => {
Expand Down
Loading