CLI to get the latest and freshest documentation from any website in Markdown format
Project description
fresh
A CLI tool to fetch the latest documentation from any website in Markdown format.
Requirements
- Python 3.12+
- uv (recommended) or pip
Installation
# Using uv (recommended)
uv sync
# Or using pip
pip install -e .
Usage
# Show help
fresh --help
# List all documentation pages on a website
fresh list https://docs.python.org/3/
# Fetch a documentation page and convert to Markdown
fresh get https://docs.python.org/3/tutorial/
# Search for content across documentation pages
fresh search "virtual environment" https://docs.python.org/3/
# Manage aliases for quick access
fresh alias add python https://docs.python.org/3/
fresh alias list
fresh alias search python
# Download entire documentation for offline use
fresh sync https://docs.python.org/3/
# Check for updates
fresh update --check
# Show enhanced documentation for a command
fresh doc get
fresh doc list
Commands
fresh list
List all documentation pages available on a website.
fresh list <URL> [OPTIONS]
Options:
-v, --verbose- Use rich output format-p, --pattern TEXT- Filter paths matching pattern-d, --depth INTEGER- Maximum crawl depth (default: 3)--max-pages INTEGER- Maximum number of pages to discover (default: 100)--sort TEXT- Sort results by name or path-f, --format TEXT- Output format: json, yaml, xml-c, --count- Show only total count
fresh get
Fetch a documentation page and convert it to Markdown.
fresh get <URL> [OPTIONS]
Options:
-v, --verbose- Use verbose output-t, --timeout INTEGER- Request timeout in seconds (default: 30)--header TEXT- Custom HTTP header--no-follow- Do not follow redirects--skip-scripts- Exclude JavaScript from output--no-cache- Bypass cache-o, --output TEXT- Write output to file-r, --retry INTEGER- Number of retry attempts (default: 3)--dry-run- Show what would be fetched without downloading
fresh search
Search for content across documentation pages.
fresh search <QUERY> <URL> [OPTIONS]
fresh websearch
Search the general web for any topic. Results can be fetched with fresh get <URL>.
# Basic search (uses DuckDuckGo HTML, free)
fresh websearch "python async tutorial"
# With specific number of results
fresh websearch "react hooks" --count 5
# Table output for human-readable display
fresh websearch "rust ownership" --table
# Verbose mode shows fallback messages
fresh websearch "python" --verbose
Options:
-n, --count INTEGER- Maximum number of results (default: 10)-e, --engine TEXT- Search engine: auto, ddg, brave (default: auto)-j, --json- Output as JSON (default)-t, --table- Output as table-v, --verbose- Show verbose output
Note: Brave Search API can be used by setting the BRAVE_API_KEY environment variable. DuckDuckGo is used by default (free, no API key required).
fresh alias
Manage library aliases for quick access.
# Add an alias
fresh alias add <name> <url>
# List all aliases
fresh alias list
# Remove an alias
fresh alias remove <name>
# Search aliases
fresh alias search <query>
fresh sync
Download entire documentation for offline use.
fresh sync <URL> [OPTIONS]
Options:
-o, --output-dir PATH- Target directory for synced docs-v, --verbose- Use verbose output--max-pages INTEGER- Maximum number of pages to sync (default: 100)-d, --depth INTEGER- Maximum crawl depth (default: 3)-f, --force- Force re-sync (delete existing files first)-p, --pattern TEXT- Filter paths matching pattern
fresh update
Check for and install updates to fresh.
fresh update [OPTIONS]
Options:
--check- Only check for updates without installing-y, --yes- Automatically confirm updates
fresh doc
Show enhanced documentation for fresh commands.
fresh doc [COMMAND]
fresh history
View and manage search history.
# View recent search history
fresh history
# Show history statistics
fresh history stats
# Clear all history
fresh history clear
# Clear history for a specific URL
fresh history clear --url https://example.com
# Clear history older than 30 days
fresh history clear --older-than-days 30
# Export history to JSON
fresh history export history.json
# Import history from JSON
fresh history import history.json
fresh guide
Manage personal guides and documentation.
# Create a new guide
fresh guide create my-guide --content "Guide content here" --title "My Guide"
# List all guides
fresh guide list
# Show a specific guide
fresh guide show my-guide
# Delete a guide
fresh guide delete my-guide
# Search across guides
fresh guide search "keyword"
Configuration
Fresh stores its configuration in the following locations:
- Aliases:
~/.fresh/aliases.json - Cache:
~/.fresh/cache/ - Sync data:
~/.fresh/docs/ - History:
~/.fresh/history.db
Development
# Install dev dependencies
uv sync --extra dev
# Run linter
ruff check .
# Run type checker
mypy src/
# Run tests
pytest
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fresh_docs-2.7.2.tar.gz.
File metadata
- Download URL: fresh_docs-2.7.2.tar.gz
- Upload date:
- Size: 159.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b4eeb17842440d8709f073451d1dfc04d7bc9506601d6d93d17cb8bd4adba552
|
|
| MD5 |
86436a2b6e64d0587dbc8730c61dcdf8
|
|
| BLAKE2b-256 |
ec7ce5f549a5fe82de5f9535a3d3527c410d4e6b34d8a0a3e3e5a117e5169b3f
|
File details
Details for the file fresh_docs-2.7.2-py3-none-any.whl.
File metadata
- Download URL: fresh_docs-2.7.2-py3-none-any.whl
- Upload date:
- Size: 74.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c398f34eaeab598643dbadb324e7cd61e9ad6101c23634a84f6f89512bb19a14
|
|
| MD5 |
7cc8730f5ac8a4ced0d03f61ce686d85
|
|
| BLAKE2b-256 |
44358bcd787b99dc1ca80a6bce3dddf96c8b80615a18a1d69057f3bee6a6f5fb
|