Declarative data automation. Extract with intent.
Ferret is an open-source, declarative-first, expression-oriented language with an embeddable runtime for querying and transforming structured data—whether it lives in your application, on the web, behind an API, in a database, or in a file.
let users = query "users" in db
return for user in users {
filter user.active
return {
name: user.name,
email: user.email
}
}
Ferret started as a language for web scraping and browser automation. It has since grown into a general-purpose data automation language built around the same idea: describe the data you want and let the runtime handle how to get it.
Use Ferret from the command line, embed it into a Go or JavaScript application, extend it with modules, or run it as part of a larger service.
Ferret is more than the language repository. The project includes the runtime, developer tools, modules, services, and infrastructure around it.
Ferret
The language, compiler, VM, standard library, and embeddable Go runtime.
@montferret/ferret
Ferret for JavaScript and TypeScript, powered by WebAssembly.
CLI
Run, format, inspect, and work with Ferret programs from the command line.
Lab
A test runner for Ferret programs and automation scenarios.
Daemon
A long-running Ferret service providing workspaces, language intelligence, execution sessions, and the foundation for IDE and remote tooling.
VS Code
Ferret language support for Visual Studio Code.
Contrib
Official Ferret modules and integrations for databases, documents, APIs, browser automation, and other external systems.
Barn
The source registry behind the Ferret module ecosystem.
Registry
Discover modules and integrations for Ferret.
Worker
Run Ferret programs remotely over HTTP.
Chromium
A containerized Chromium environment for Ferret browser automation.
Specs
Shared schemas, specifications, and validation rules used across the Ferret ecosystem.
Ferret sits somewhere between a query language, an automation language, and an embeddable data runtime.
It keeps data operations declarative:
return for user in users {
filter user.age >= 18
sort user.name
return user
}
while still providing the language features needed when automation gets more involved:
func classify(response) {
return match response.status {
200 => "ok"
404 => "missing"
_ => "error"
}
}
The runtime can also work with capabilities supplied by its host, allowing Ferret programs to query databases, APIs, documents, browsers, application objects, and other systems without baking all of those integrations into the language itself.
That makes the same language useful for small scripts, application embedding, testing, data extraction, and larger automation systems.
Ferret v2 is currently under active development.
v2 expands Ferret beyond its AQL-inspired roots with a more complete language, a redesigned runtime and embedding model, modules and registry infrastructure, improved developer tooling, and support for additional host environments.
Follow the Ferret repository and ferretlang.org for releases and project updates.
Ferret is open source and contributions are welcome across the language, runtime, tooling, modules, documentation, and ecosystem projects.
Start with the repository that interests you, or explore the documentation to get familiar with the project.
Thanks to everyone who has helped build Ferret.
If Ferret is useful to you and you'd like to support its development, you can sponsor the project through Open Collective.