npx skills add https://github.com/geekjourneyx/jina-cli --skill jina-cli用于读取网页内容并执行 AI 驱动的网络搜索的 CLI 工具。
安装 :
curl -fsSL https://raw.githubusercontent.com/geekjourneyx/jina-cli/main/scripts/install.sh | bash
基本用法 :
# 读取一个 URL
jina read --url "https://example.com"
# 搜索网络
jina search --query "golang latest news"
| 命令 | 用途 |
|---|---|
read | 从 URL 提取内容并转换为适合 LLM 的格式 |
search | 使用 AI 驱动的结果处理进行网络搜索 |
config |
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
| 管理设置(设置/获取/列表/路径) |
从任意 URL 提取内容:
# 基本读取
jina read --url "https://example.com"
# 读取并生成图片描述
jina read -u "https://x.com/user/status/123" --with-alt
# 从文件批量处理
jina read --file urls.txt
# 以 Markdown 格式输出
jina read -u "https://example.com" --output markdown
# 保存到文件
jina read -u "https://example.com" --output-file result.md
API 可以通过 --format 参数返回不同格式的内容:
markdown - 默认,适合 LLM 的 Markdown 格式html - 原始 HTMLtext - 纯文本screenshot - 截图的 URL# 绕过缓存
jina read -u "https://example.com" --no-cache
# 使用代理
jina read -u "https://example.com" --proxy "http://proxy.com:8080"
# CSS 选择器提取
jina read -u "https://example.com" --target-selector "article.main"
# 等待元素加载
jina read -u "https://example.com" --wait-for-selector "#content"
# 转发 Cookie
jina read -u "https://example.com" --cookie "session=abc123"
# 针对使用哈希路由的单页应用使用 POST 方法
jina read -u "https://example.com/#/route" --post
搜索网络,并自动获取顶部结果的内容:
# 基本搜索
jina search --query "golang latest news"
# 限制到特定网站
jina search -q "AI developments" --site techcrunch.com --site theverge.com
# 限制结果数量
jina search -q "climate change" --limit 10
# 输出格式
jina search -q "news" --output markdown
使用多个 --site 标志将搜索限制在特定域名:
jina search -q "startup funding" --site techcrunch.com --site theverge.com --site wired.com
配置文件:~/.jina-reader/config.yaml
优先级:命令行参数 > 环境变量 > 配置文件 > 默认值
环境变量:
JINA_API_BASE_URL - 读取 API 的 URL(默认:https://r.jina.ai/)JINA_SEARCH_API_URL - 搜索 API 的 URL(默认:https://s.jina.ai/)JINA_TIMEOUT - 请求超时时间(秒)(默认:30)JINA_WITH_GENERATED_ALT - 启用图片描述生成(默认:false)JINA_OUTPUT_FORMAT - 输出格式:json/markdown(默认:json)JINA_PROXY_URL - 代理服务器 URL配置命令:
# 设置配置
jina config set timeout 60
jina config set with-generated-alt true
# 查看配置
jina config list
jina config get timeout
jina config path
JSON 格式(默认,机器可读):
{
"success": true,
"data": {
"url": "https://example.com",
"content": "# Extracted Content\n\n...",
"title": "Page Title"
}
}
Markdown 格式(人类可读):
jina read -u "https://example.com" --output markdown
# X(Twitter)帖子
jina read -u "https://x.com/elonmusk/status/123456" --with-alt
# --with-alt 标志为嵌入的图片启用 VLM 图片描述生成
# 标准文章
jina read -u "https://blog.example.com/article"
# 使用特定格式
jina read -u "https://example.com" --format text --output markdown
# 1. 搜索主题
jina search -q "quantum computing 2025" --limit 10
# 2. 读取特定结果
jina read --file search_results.txt
创建一个文件,每行一个 URL:
cat > urls.txt << EOF
https://example.com/page1
https://example.com/page2
https://x.com/user/status/123
EOF
jina read --file urls.txt --output markdown
cli/
├── main.go # 根命令
├── read.go # read 命令
├── search.go # search 命令
├── config.go # config 命令
└── pkg/
├── api/client.go # Jina API HTTP 客户端
├── config/ # 配置文件管理
└── output/ # JSON/Markdown 格式化器
key=value 格式存储(无 YAML 库依赖)有关 API 详情:请参阅 cli/pkg/api/client.go
每周安装数
128
代码仓库
GitHub 星标数
272
首次出现
2026 年 2 月 28 日
安全审计
安装于
gemini-cli123
codex123
amp123
cline123
kimi-cli123
cursor123
CLI tool for reading web content and performing AI-powered web searches.
Install :
curl -fsSL https://raw.githubusercontent.com/geekjourneyx/jina-cli/main/scripts/install.sh | bash
Basic usage :
# Read a URL
jina read --url "https://example.com"
# Search the web
jina search --query "golang latest news"
| Command | Purpose |
|---|---|
read | Extract and convert content from URLs to LLM-friendly format |
search | Search the web with AI-powered result processing |
config | Manage settings (set/get/list/path) |
Extract content from any URL:
# Basic read
jina read --url "https://example.com"
# Read with image captioning
jina read -u "https://x.com/user/status/123" --with-alt
# Batch process from file
jina read --file urls.txt
# Output as Markdown
jina read -u "https://example.com" --output markdown
# Save to file
jina read -u "https://example.com" --output-file result.md
The API can return content in different formats via --format:
markdown - Default, LLM-friendly Markdownhtml - Raw HTMLtext - Plain textscreenshot - URL to a screenshot# Bypass cache
jina read -u "https://example.com" --no-cache
# Use proxy
jina read -u "https://example.com" --proxy "http://proxy.com:8080"
# CSS selector extraction
jina read -u "https://example.com" --target-selector "article.main"
# Wait for element to load
jina read -u "https://example.com" --wait-for-selector "#content"
# Forward cookies
jina read -u "https://example.com" --cookie "session=abc123"
# POST method for SPA with hash routing
jina read -u "https://example.com/#/route" --post
Search the web with automatic content fetching from top results:
# Basic search
jina search --query "golang latest news"
# Restrict to specific sites
jina search -q "AI developments" --site techcrunch.com --site theverge.com
# Limit results
jina search -q "climate change" --limit 10
# Output format
jina search -q "news" --output markdown
Use multiple --site flags to restrict search to specific domains:
jina search -q "startup funding" --site techcrunch.com --site theverge.com --site wired.com
Config file: ~/.jina-reader/config.yaml
Priority : Command args > Environment vars > Config file > Defaults
Environment variables :
JINA_API_BASE_URL - Read API URL (default: https://r.jina.ai/)JINA_SEARCH_API_URL - Search API URL (default: https://s.jina.ai/)JINA_TIMEOUT - Request timeout in seconds (default: 30)JINA_WITH_GENERATED_ALT - Enable image captioning (default: false)JINA_OUTPUT_FORMAT - Output format: json/markdown (default: json)Config commands :
# Set configuration
jina config set timeout 60
jina config set with-generated-alt true
# View configuration
jina config list
jina config get timeout
jina config path
JSON format (default, machine-readable):
{
"success": true,
"data": {
"url": "https://example.com",
"content": "# Extracted Content\n\n...",
"title": "Page Title"
}
}
Markdown format (human-readable):
jina read -u "https://example.com" --output markdown
# X (Twitter) posts
jina read -u "https://x.com/elonmusk/status/123456" --with-alt
# The --with-alt flag enables VLM image captioning for embedded images
# Standard article
jina read -u "https://blog.example.com/article"
# With specific format
jina read -u "https://example.com" --format text --output markdown
# 1. Search for topic
jina search -q "quantum computing 2025" --limit 10
# 2. Read specific results
jina read --file search_results.txt
Create a file with one URL per line:
cat > urls.txt << EOF
https://example.com/page1
https://example.com/page2
https://x.com/user/status/123
EOF
jina read --file urls.txt --output markdown
cli/
├── main.go # Root command
├── read.go # read command
├── search.go # search command
├── config.go # config command
└── pkg/
├── api/client.go # Jina API HTTP client
├── config/ # Config file management
└── output/ # JSON/Markdown formatter
key=value format (no YAML library dependency)For API details: See cli/pkg/api/client.go
Weekly Installs
128
Repository
GitHub Stars
272
First Seen
Feb 28, 2026
Security Audits
Gen Agent Trust HubFailSocketPassSnykFail
Installed on
gemini-cli123
codex123
amp123
cline123
kimi-cli123
cursor123
AI Elements:基于shadcn/ui的AI原生应用组件库,快速构建对话界面
67,500 周安装
JINA_PROXY_URL - Proxy server URL