Skip to content

Chengings/defuddle-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Defuddle CLI

A command‑line tool that extracts the main content from web pages using Defuddle.

Installation

Local development (Bun)

bun install
bun run build
bun link

Running the commands above will:

  1. Install the project’s dependencies.
  2. Build the TypeScript source.
  3. Link the package globally, making the defuddle-cli command available in the shell.

Stand‑alone binary (Just)

If you use just, you can build and install a native binary with a single command:

just install

This does the following:

  1. Runs bun run build-exe to create the native defuddle-cli binary.
  2. Copies the binary to /usr/local/bin/defuddle-cli and sets the appropriate executable permissions.

Note: The just install target requires sudo privileges because it writes to /usr/local/bin.

Usage

defuddle-cli [options] <url>

When you are still working from the source tree (i.e., before linking), invoke the script with Bun:

bun defuddle-cli.ts [options] <url>

Options

Flag Alias Description
-h --help Show the help message and exit.
--html Output the extracted content as HTML (default is Markdown).
-d --debug Enable debug mode (extra logging).
-q --quiet Quiet mode – suppress error messages.
-o --output FILE Write the result to FILE instead of stdout.

Examples

Extract the main content as Markdown (default):

defuddle-cli https://example.com

Extract the content as HTML:

defuddle-cli --html https://example.com

Suppress error output and save the result to a file:

defuddle-cli -q -o content.md https://example.com

Run the script directly with Bun (useful while developing):

bun defuddle-cli.ts https://example.com

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published