Kitsune

Use Kitsune in TypeScript

Use Kitsune when your application needs to read a crawl result or drive the browser directly. Complete the CLI setup first.

Run a crawl from code

Save this as crawl.ts at the repository root. Bun resolves kitsune from the installed workspace.

import { Kitsune } from 'kitsune'

const kit = await Kitsune.launch()

try {
  const record = await kit.crawl('https://example.com')
  console.log(record.verdict, record.data)
} finally {
  await kit.close()
}
bun run crawl.ts

Expect ok and an object with the title Example Domain. The library returns the record to your script. Use Store if you want to persist those records as JSONL.

Import from another Bun project

Register the local package from the Kitsune checkout:

cd packages/kitsune
bun link

Then run bun link kitsune in your other project and use the same import.

Next steps