agent-data-cli 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- agent_data_cli-0.1.0/LICENSE +21 -0
- agent_data_cli-0.1.0/MANIFEST.in +7 -0
- agent_data_cli-0.1.0/PKG-INFO +104 -0
- agent_data_cli-0.1.0/README.md +368 -0
- agent_data_cli-0.1.0/pyproject.toml +55 -0
- agent_data_cli-0.1.0/setup.cfg +4 -0
- agent_data_cli-0.1.0/src/agent_data_cli/PYPI_README.md +72 -0
- agent_data_cli-0.1.0/src/agent_data_cli/__init__.py +2 -0
- agent_data_cli-0.1.0/src/agent_data_cli/__main__.py +7 -0
- agent_data_cli-0.1.0/src/agent_data_cli/cli/__init__.py +2 -0
- agent_data_cli-0.1.0/src/agent_data_cli/cli/__main__.py +7 -0
- agent_data_cli-0.1.0/src/agent_data_cli/cli/commands/__init__.py +85 -0
- agent_data_cli-0.1.0/src/agent_data_cli/cli/commands/channel.py +78 -0
- agent_data_cli-0.1.0/src/agent_data_cli/cli/commands/common.py +97 -0
- agent_data_cli-0.1.0/src/agent_data_cli/cli/commands/config.py +270 -0
- agent_data_cli-0.1.0/src/agent_data_cli/cli/commands/content/__init__.py +29 -0
- agent_data_cli-0.1.0/src/agent_data_cli/cli/commands/content/common.py +172 -0
- agent_data_cli-0.1.0/src/agent_data_cli/cli/commands/content/interact.py +74 -0
- agent_data_cli-0.1.0/src/agent_data_cli/cli/commands/content/query.py +111 -0
- agent_data_cli-0.1.0/src/agent_data_cli/cli/commands/content/search.py +75 -0
- agent_data_cli-0.1.0/src/agent_data_cli/cli/commands/content/update.py +198 -0
- agent_data_cli-0.1.0/src/agent_data_cli/cli/commands/dashboard.py +87 -0
- agent_data_cli-0.1.0/src/agent_data_cli/cli/commands/group.py +128 -0
- agent_data_cli-0.1.0/src/agent_data_cli/cli/commands/help.py +44 -0
- agent_data_cli-0.1.0/src/agent_data_cli/cli/commands/hub.py +107 -0
- agent_data_cli-0.1.0/src/agent_data_cli/cli/commands/init.py +29 -0
- agent_data_cli-0.1.0/src/agent_data_cli/cli/commands/source.py +41 -0
- agent_data_cli-0.1.0/src/agent_data_cli/cli/commands/specs.py +241 -0
- agent_data_cli-0.1.0/src/agent_data_cli/cli/commands/sub.py +60 -0
- agent_data_cli-0.1.0/src/agent_data_cli/cli/formatters.py +537 -0
- agent_data_cli-0.1.0/src/agent_data_cli/cli/help.py +149 -0
- agent_data_cli-0.1.0/src/agent_data_cli/cli/main.py +46 -0
- agent_data_cli-0.1.0/src/agent_data_cli/core/__init__.py +2 -0
- agent_data_cli-0.1.0/src/agent_data_cli/core/base.py +222 -0
- agent_data_cli-0.1.0/src/agent_data_cli/core/capabilities.py +105 -0
- agent_data_cli-0.1.0/src/agent_data_cli/core/config.py +236 -0
- agent_data_cli-0.1.0/src/agent_data_cli/core/discovery.py +158 -0
- agent_data_cli-0.1.0/src/agent_data_cli/core/help.py +16 -0
- agent_data_cli-0.1.0/src/agent_data_cli/core/manifest.py +329 -0
- agent_data_cli-0.1.0/src/agent_data_cli/core/models.py +296 -0
- agent_data_cli-0.1.0/src/agent_data_cli/core/protocol.py +135 -0
- agent_data_cli-0.1.0/src/agent_data_cli/core/registry.py +353 -0
- agent_data_cli-0.1.0/src/agent_data_cli/core/source_defaults.py +24 -0
- agent_data_cli-0.1.0/src/agent_data_cli/dashboard/__init__.py +2 -0
- agent_data_cli-0.1.0/src/agent_data_cli/dashboard/adapters/__init__.py +2 -0
- agent_data_cli-0.1.0/src/agent_data_cli/dashboard/adapters/channel.py +73 -0
- agent_data_cli-0.1.0/src/agent_data_cli/dashboard/adapters/config.py +153 -0
- agent_data_cli-0.1.0/src/agent_data_cli/dashboard/adapters/content.py +350 -0
- agent_data_cli-0.1.0/src/agent_data_cli/dashboard/adapters/group.py +47 -0
- agent_data_cli-0.1.0/src/agent_data_cli/dashboard/adapters/help.py +32 -0
- agent_data_cli-0.1.0/src/agent_data_cli/dashboard/adapters/source.py +61 -0
- agent_data_cli-0.1.0/src/agent_data_cli/dashboard/adapters/sub.py +28 -0
- agent_data_cli-0.1.0/src/agent_data_cli/dashboard/context.py +29 -0
- agent_data_cli-0.1.0/src/agent_data_cli/dashboard/index.py +30 -0
- agent_data_cli-0.1.0/src/agent_data_cli/dashboard/pages/01_Source.py +57 -0
- agent_data_cli-0.1.0/src/agent_data_cli/dashboard/pages/02_Channel.py +99 -0
- agent_data_cli-0.1.0/src/agent_data_cli/dashboard/pages/03_Content_Search.py +64 -0
- agent_data_cli-0.1.0/src/agent_data_cli/dashboard/pages/04_Content_Query.py +79 -0
- agent_data_cli-0.1.0/src/agent_data_cli/dashboard/pages/05_Content_Update.py +103 -0
- agent_data_cli-0.1.0/src/agent_data_cli/dashboard/pages/06_Sub.py +51 -0
- agent_data_cli-0.1.0/src/agent_data_cli/dashboard/pages/07_Group.py +116 -0
- agent_data_cli-0.1.0/src/agent_data_cli/dashboard/pages/08_Config.py +114 -0
- agent_data_cli-0.1.0/src/agent_data_cli/dashboard/pages/09_Help.py +48 -0
- agent_data_cli-0.1.0/src/agent_data_cli/dashboard/pages/__init__.py +2 -0
- agent_data_cli-0.1.0/src/agent_data_cli/dashboard/runtime.py +208 -0
- agent_data_cli-0.1.0/src/agent_data_cli/dashboard/state.py +60 -0
- agent_data_cli-0.1.0/src/agent_data_cli/dashboard/widgets/__init__.py +2 -0
- agent_data_cli-0.1.0/src/agent_data_cli/dashboard/widgets/common.py +90 -0
- agent_data_cli-0.1.0/src/agent_data_cli/dashboard/widgets/forms.py +29 -0
- agent_data_cli-0.1.0/src/agent_data_cli/dashboard/widgets/tables.py +10 -0
- agent_data_cli-0.1.0/src/agent_data_cli/fetchers/__init__.py +2 -0
- agent_data_cli-0.1.0/src/agent_data_cli/fetchers/base.py +61 -0
- agent_data_cli-0.1.0/src/agent_data_cli/fetchers/browser.py +44 -0
- agent_data_cli-0.1.0/src/agent_data_cli/fetchers/http.py +313 -0
- agent_data_cli-0.1.0/src/agent_data_cli/fetchers/jina.py +44 -0
- agent_data_cli-0.1.0/src/agent_data_cli/hub/__init__.py +6 -0
- agent_data_cli-0.1.0/src/agent_data_cli/hub/models.py +20 -0
- agent_data_cli-0.1.0/src/agent_data_cli/hub/service.py +210 -0
- agent_data_cli-0.1.0/src/agent_data_cli/init_service.py +29 -0
- agent_data_cli-0.1.0/src/agent_data_cli/main.py +72 -0
- agent_data_cli-0.1.0/src/agent_data_cli/migration.py +53 -0
- agent_data_cli-0.1.0/src/agent_data_cli/runtime_paths.py +90 -0
- agent_data_cli-0.1.0/src/agent_data_cli/store/__init__.py +2 -0
- agent_data_cli-0.1.0/src/agent_data_cli/store/audit.py +42 -0
- agent_data_cli-0.1.0/src/agent_data_cli/store/channels.py +80 -0
- agent_data_cli-0.1.0/src/agent_data_cli/store/configs.py +134 -0
- agent_data_cli-0.1.0/src/agent_data_cli/store/content.py +770 -0
- agent_data_cli-0.1.0/src/agent_data_cli/store/db.py +298 -0
- agent_data_cli-0.1.0/src/agent_data_cli/store/groups.py +120 -0
- agent_data_cli-0.1.0/src/agent_data_cli/store/health.py +53 -0
- agent_data_cli-0.1.0/src/agent_data_cli/store/migrations.py +176 -0
- agent_data_cli-0.1.0/src/agent_data_cli/store/repositories.py +136 -0
- agent_data_cli-0.1.0/src/agent_data_cli/store/subscriptions.py +119 -0
- agent_data_cli-0.1.0/src/agent_data_cli/utils/__init__.py +2 -0
- agent_data_cli-0.1.0/src/agent_data_cli/utils/text.py +21 -0
- agent_data_cli-0.1.0/src/agent_data_cli/utils/time.py +63 -0
- agent_data_cli-0.1.0/src/agent_data_cli/utils/urls.py +8 -0
- agent_data_cli-0.1.0/src/agent_data_cli.egg-info/PKG-INFO +104 -0
- agent_data_cli-0.1.0/src/agent_data_cli.egg-info/SOURCES.txt +101 -0
- agent_data_cli-0.1.0/src/agent_data_cli.egg-info/dependency_links.txt +1 -0
- agent_data_cli-0.1.0/src/agent_data_cli.egg-info/entry_points.txt +2 -0
- agent_data_cli-0.1.0/src/agent_data_cli.egg-info/requires.txt +5 -0
- agent_data_cli-0.1.0/src/agent_data_cli.egg-info/top_level.txt +1 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Severin Zhong
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: agent-data-cli
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Unified multi-source content CLI for discovery, sync, local query, and explicit interaction.
|
|
5
|
+
Author: Severin Zhong
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/severinzhong/agent-data-cli
|
|
8
|
+
Project-URL: Documentation, https://github.com/severinzhong/agent-data-cli
|
|
9
|
+
Project-URL: Source, https://github.com/severinzhong/agent-data-cli
|
|
10
|
+
Project-URL: Repository, https://github.com/severinzhong/agent-data-cli
|
|
11
|
+
Project-URL: Changelog, https://github.com/severinzhong/agent-data-cli/releases
|
|
12
|
+
Project-URL: Issues, https://github.com/severinzhong/agent-data-cli/issues
|
|
13
|
+
Keywords: cli,agents,rss,news,data,automation
|
|
14
|
+
Classifier: Development Status :: 3 - Alpha
|
|
15
|
+
Classifier: Environment :: Console
|
|
16
|
+
Classifier: Intended Audience :: Developers
|
|
17
|
+
Classifier: Programming Language :: Python :: 3
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
21
|
+
Classifier: Topic :: Internet
|
|
22
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
23
|
+
Classifier: Topic :: Utilities
|
|
24
|
+
Requires-Python: >=3.12
|
|
25
|
+
Description-Content-Type: text/markdown
|
|
26
|
+
License-File: LICENSE
|
|
27
|
+
Requires-Dist: httpx[socks]>=0.28.1
|
|
28
|
+
Requires-Dist: rich>=14.3.3
|
|
29
|
+
Provides-Extra: dashboard
|
|
30
|
+
Requires-Dist: streamlit>=1.50.0; extra == "dashboard"
|
|
31
|
+
Dynamic: license-file
|
|
32
|
+
|
|
33
|
+
# agent-data-cli
|
|
34
|
+
|
|
35
|
+
`agent-data-cli` is a unified multi-source content CLI for discovery, sync, local query, and explicit interaction.
|
|
36
|
+
|
|
37
|
+
It is designed for agent workflows and human operators who want one stable command surface across news, RSS, social media, market data, and other content sources that fit the `source/channel/content` model.
|
|
38
|
+
|
|
39
|
+
## Install
|
|
40
|
+
|
|
41
|
+
Recommended:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
uv tool install agent-data-cli
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
PyPA-standard CLI install:
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
pipx install agent-data-cli
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
If you also want the dashboard:
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
uv tool install "agent-data-cli[dashboard]"
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
or:
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
pipx install "agent-data-cli[dashboard]"
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## Quick Start
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
adc init --defaults
|
|
69
|
+
adc help
|
|
70
|
+
adc source list
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
`adc init` creates the local runtime home at `~/.adc`, initializes the database, and prepares the default `source_workspace`.
|
|
74
|
+
|
|
75
|
+
## Typical Flow
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
adc hub search --query xiaohongshu
|
|
79
|
+
adc hub install xiaohongshu
|
|
80
|
+
adc source list
|
|
81
|
+
adc channel search --source xiaohongshu --query 咖啡
|
|
82
|
+
adc sub add --source xiaohongshu --channel <channel>
|
|
83
|
+
adc content update --source xiaohongshu
|
|
84
|
+
adc content query --source xiaohongshu --limit 20
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
## Dashboard
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
adc dashboard
|
|
91
|
+
adc dashboard start --daemon
|
|
92
|
+
adc dashboard status
|
|
93
|
+
adc dashboard stop
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
## Python Version
|
|
97
|
+
|
|
98
|
+
- Python `3.12+`
|
|
99
|
+
|
|
100
|
+
## Links
|
|
101
|
+
|
|
102
|
+
- Source: <https://github.com/severinzhong/agent-data-cli>
|
|
103
|
+
- Issues: <https://github.com/severinzhong/agent-data-cli/issues>
|
|
104
|
+
- Companion source workspace: <https://github.com/severinzhong/agent-data-hub>
|
|
@@ -0,0 +1,368 @@
|
|
|
1
|
+
# agent-data-cli
|
|
2
|
+
|
|
3
|
+
[English](./README.md) | [中文](./README_zh.md)
|
|
4
|
+
|
|
5
|
+
> Making All Data AI-Native.
|
|
6
|
+
> Turn Any Data Source into a CLI.
|
|
7
|
+
> Let agents operate it and aggregate the data for you.
|
|
8
|
+
> This project defines a protocol so data sources can talk to agents through a stable, uniform `command language`.
|
|
9
|
+
|
|
10
|
+
`agent-data-cli` is a local information center for the agent era.
|
|
11
|
+
|
|
12
|
+
Most existing data interfaces were designed for humans. You click through websites, feeds, admin panels, and scattered APIs to find and piece things together. `agent-data-cli` reorganizes that into one explicit, scriptable, locally queryable `cli` interface so agents can operate data reliably.
|
|
13
|
+
|
|
14
|
+
It gives agents and humans one unified entrypoint for:
|
|
15
|
+
|
|
16
|
+
- news
|
|
17
|
+
- social media content
|
|
18
|
+
- financial data
|
|
19
|
+
- RSS feeds
|
|
20
|
+
- other content sources that can be mapped into the `source/channel/content` model
|
|
21
|
+
|
|
22
|
+
This repository is also a pack of loadable skills for:
|
|
23
|
+
|
|
24
|
+
- Codex
|
|
25
|
+
- Claude Code
|
|
26
|
+
- OpenClaw
|
|
27
|
+
|
|
28
|
+
Once those built-in skills are loaded, an agent can follow the same command surface to discover sources, sync updates, and read results step by step through one command at a time.
|
|
29
|
+
|
|
30
|
+
## Dashboard
|
|
31
|
+
|
|
32
|
+
In addition to the CLI, this repository now ships with a lightweight dashboard for humans.
|
|
33
|
+
|
|
34
|
+
- Base CLI install: `uv tool install agent-data-cli`
|
|
35
|
+
- Install with dashboard: `uv tool install "agent-data-cli[dashboard]"`
|
|
36
|
+
|
|
37
|
+
- `adc dashboard`: start the dashboard in the foreground
|
|
38
|
+
- `adc dashboard start --daemon`: start it in the background
|
|
39
|
+
- `adc dashboard status`: show runtime status
|
|
40
|
+
- `adc dashboard stop`: stop the background service
|
|
41
|
+
|
|
42
|
+
The dashboard source lives in repository-local `src/agent_data_cli/dashboard/`. Its goal is to turn the existing `source/channel/content/sub/group/config/help` command semantics into a visual control surface, not to introduce a second core logic stack.
|
|
43
|
+
|
|
44
|
+
## Why agent-data-cli?
|
|
45
|
+
|
|
46
|
+
- AI-native tools need a stable command surface, not a pile of temporary webpage paths and site scripts.
|
|
47
|
+
- Multi-source data should behave like one system, not a collection of unrelated site adapters.
|
|
48
|
+
- Discovery, sync, local query, and remote side effects need clear boundaries.
|
|
49
|
+
- Agents need an information center they can inspect, update, query, and extend, not a toolbox built from implicit behavior.
|
|
50
|
+
|
|
51
|
+
In one line: `agent-data-cli` is about making all data AI-native and turning any data source into a CLI.
|
|
52
|
+
|
|
53
|
+
## Install The CLI
|
|
54
|
+
|
|
55
|
+
The recommended install path is as a command-line tool:
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
uv tool install agent-data-cli
|
|
59
|
+
adc init --defaults
|
|
60
|
+
adc source list
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
If you also want the dashboard:
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
uv tool install "agent-data-cli[dashboard]"
|
|
67
|
+
adc init --defaults
|
|
68
|
+
adc dashboard
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Local runtime data goes to:
|
|
72
|
+
|
|
73
|
+
```text
|
|
74
|
+
~/.adc
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## Install with an Agent
|
|
78
|
+
|
|
79
|
+
Give your agent the repository URL directly. You can say things like:
|
|
80
|
+
|
|
81
|
+
- "Install `agent-data-cli` from `https://github.com/severinzhong/agent-data-cli`, load the built-in skills, and use it directly for me."
|
|
82
|
+
- "Use `agent-data-cli` to help me find a source, subscribe to channels, sync updates, and then read the local results."
|
|
83
|
+
- "Use the source authoring skill in `agent-data-cli` to add a new source for me."
|
|
84
|
+
|
|
85
|
+
## Install These Two skills Separately from skills.sh
|
|
86
|
+
|
|
87
|
+
If you only want these two built-in skills, run:
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
npx skills add https://github.com/severinzhong/agent-data-cli --skill using-data-cli
|
|
91
|
+
npx skills add https://github.com/severinzhong/agent-data-cli --skill authoring-data-cli-source
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
## Semantic Alignment
|
|
95
|
+
|
|
96
|
+
`agent-data-cli` keeps only two core resource levels: `source` and `channel`.
|
|
97
|
+
|
|
98
|
+
- `source`: a concrete data source implementation and a capability boundary, such as a news site, a market data provider, or a social media platform.
|
|
99
|
+
- `channel`: a trackable target inside a source. A channel can be a feed, a stock symbol, or an RSSHub route. You can discover channels, subscribe or unsubscribe them, add them to groups, and run `content update` on subscribed channels. Examples include BBC's `world`, A-share symbol `sh600001`, and RSSHub route `/youtube/channel/<id>`.
|
|
100
|
+
- `content`: a remote search result or a local content node written after sync. Posts, comments, and nested replies all normalize into `content nodes`; `channel` remains a subscription and sync boundary, not a third resource level. You use `content search` for remote discovery, `content query` for local reads, and `content update` to sync remote content from subscribed channels into the local store. If a source later declares interaction verbs, you can also use `content interact` to run explicit remote actions on individual content items.
|
|
101
|
+
|
|
102
|
+
## Source Workspace
|
|
103
|
+
|
|
104
|
+
`agent-data-cli` is intended to work with the companion repository [`agent-data-hub`](https://github.com/severinzhong/agent-data-hub).
|
|
105
|
+
|
|
106
|
+
After installation, start with:
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
adc init --defaults
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
`adc init` creates `~/.adc`, initializes the database and runtime directories, and sets the default `source_workspace`.
|
|
113
|
+
|
|
114
|
+
`agent-data-hub` contains the curated source implementations, and `agent-data-cli` discovers them through `source_workspace`:
|
|
115
|
+
|
|
116
|
+
- CLI config key: `source_workspace`
|
|
117
|
+
- default path: `~/.adc/sources`
|
|
118
|
+
- layout: one source package per direct child directory
|
|
119
|
+
|
|
120
|
+
Examples:
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
adc config cli explain source_workspace
|
|
124
|
+
adc config cli set source_workspace /abs/path/to/agent-data-hub
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
`source list` only shows sources that exist in the current workspace.
|
|
128
|
+
|
|
129
|
+
## `hub` And `agent-data-hub`
|
|
130
|
+
|
|
131
|
+
The simplest mental model is:
|
|
132
|
+
|
|
133
|
+
- `agent-data-hub` is the source repository and provides `sources.json`
|
|
134
|
+
- `hub` is the core command family that reads that index and handles source discovery, install, update, and uninstall
|
|
135
|
+
- `hub` is not part of the source protocol surface, so it does not appear in `source list`
|
|
136
|
+
- `hub uninstall` removes the source directory from the workspace and clears that source's local configs, subscriptions, sync state, and content data
|
|
137
|
+
|
|
138
|
+
Typical flow:
|
|
139
|
+
|
|
140
|
+
```bash
|
|
141
|
+
adc hub search --query xiaohongshu
|
|
142
|
+
adc hub install xiaohongshu
|
|
143
|
+
adc hub update xiaohongshu
|
|
144
|
+
adc hub uninstall xiaohongshu
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
## Curated Sources
|
|
148
|
+
|
|
149
|
+
These sources are currently provided through [`agent-data-hub`](https://github.com/severinzhong/agent-data-hub):
|
|
150
|
+
|
|
151
|
+
| Source | Channel Search | Content Search | Update | Query | Interact |
|
|
152
|
+
| --- | --- | --- | --- | --- | --- |
|
|
153
|
+
| `ashare` | ✅ | ❌ | ✅ | ✅ | ❌ |
|
|
154
|
+
| `ap` | ❌ | ✅ | ✅ | ✅ | ❌ |
|
|
155
|
+
| `avwiki` | ❌ | ✅ | ❌ | ❌ | ❌ |
|
|
156
|
+
| `bbc` | ❌ | ✅ | ✅ | ✅ | ❌ |
|
|
157
|
+
| `cryptocompare` | ✅ | ❌ | ✅ | ✅ | ❌ |
|
|
158
|
+
| `hackernews` | ❌ | ✅ | ✅ | ✅ | ❌ |
|
|
159
|
+
| `rsshub` | ✅ | ❌ | ✅ | ✅ | ❌ |
|
|
160
|
+
| `sina_finance_724` | ❌ | ❌ | ✅ | ✅ | ❌ |
|
|
161
|
+
| `usstock` | ✅ | ❌ | ✅ | ✅ | ❌ |
|
|
162
|
+
| `wechatarticle` | ❌ | ✅ | ❌ | ❌ | ❌ |
|
|
163
|
+
| `xiaohongshu` | ✅ | ✅ | ✅ | ✅ | ✅ |
|
|
164
|
+
| `yahoojp_news` | ✅ | ❌ | ✅ | ✅ | ❌ |
|
|
165
|
+
|
|
166
|
+
## Thanks
|
|
167
|
+
|
|
168
|
+
to [jackwener/xiaohongshu-cli](https://github.com/jackwener/xiaohongshu-cli).
|
|
169
|
+
|
|
170
|
+
After equipping the `authoring-data-cli-source` skill, tell your agent to turn `https://github.com/jackwener/xiaohongshu-cli` into a source, then follow the agent's guidance step by step. From development through testing, the whole process took about 3-4 hours. enjoy~💗
|
|
171
|
+
|
|
172
|
+
---
|
|
173
|
+
|
|
174
|
+
# The Rest Below Is for Agents, Not Humans
|
|
175
|
+
|
|
176
|
+
## Requirements
|
|
177
|
+
|
|
178
|
+
- Python `3.12+`
|
|
179
|
+
- `uv`
|
|
180
|
+
|
|
181
|
+
Install core dependencies:
|
|
182
|
+
|
|
183
|
+
```bash
|
|
184
|
+
uv sync
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
Install the published CLI:
|
|
188
|
+
|
|
189
|
+
```bash
|
|
190
|
+
uv tool install agent-data-cli
|
|
191
|
+
adc init --defaults
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
Install with dashboard support:
|
|
195
|
+
|
|
196
|
+
```bash
|
|
197
|
+
uv tool install "agent-data-cli[dashboard]"
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
Source-specific dependencies belong to the source workspace, not to the core project manifest.
|
|
201
|
+
|
|
202
|
+
## Proxy Configuration
|
|
203
|
+
|
|
204
|
+
`proxy_url` keeps a single field with three meanings:
|
|
205
|
+
|
|
206
|
+
- unset: use the user's current network environment
|
|
207
|
+
- `http://127.0.0.1:7890`: force that proxy
|
|
208
|
+
- `direct`: force direct connection and do not inherit the CLI-level proxy
|
|
209
|
+
|
|
210
|
+
Examples:
|
|
211
|
+
|
|
212
|
+
```bash
|
|
213
|
+
adc config cli set proxy_url http://127.0.0.1:7890
|
|
214
|
+
adc config source set bbc proxy_url direct
|
|
215
|
+
adc config cli unset proxy_url
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
## How It Works
|
|
219
|
+
|
|
220
|
+
For an agent, the shortest path is:
|
|
221
|
+
|
|
222
|
+
1. Discover a source or channel.
|
|
223
|
+
2. Subscribe first if you want to track it continuously.
|
|
224
|
+
3. Sync remote data into the local store.
|
|
225
|
+
4. Read from the local database.
|
|
226
|
+
5. Run explicit remote interactions only when needed.
|
|
227
|
+
|
|
228
|
+
Unified entrypoint:
|
|
229
|
+
|
|
230
|
+
```bash
|
|
231
|
+
adc ...
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
## Command Model
|
|
235
|
+
|
|
236
|
+
The stable command families are:
|
|
237
|
+
|
|
238
|
+
```text
|
|
239
|
+
init
|
|
240
|
+
hub
|
|
241
|
+
source
|
|
242
|
+
channel
|
|
243
|
+
content
|
|
244
|
+
sub
|
|
245
|
+
group
|
|
246
|
+
config
|
|
247
|
+
help
|
|
248
|
+
dashboard
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
Semantic boundaries:
|
|
252
|
+
|
|
253
|
+
- `channel search`: remote channel discovery only
|
|
254
|
+
- `content search`: remote content discovery only, no persistence
|
|
255
|
+
- `content update`: sync subscribed targets and write them locally
|
|
256
|
+
- `content query`: local-only query, with optional `--parent` / `--children` traversal over local content relations
|
|
257
|
+
- `content interact`: explicit remote side effects only
|
|
258
|
+
- `hub`: source catalog and source lifecycle only
|
|
259
|
+
|
|
260
|
+
## Minimal CLI Surface
|
|
261
|
+
|
|
262
|
+
Keeping a few common examples is enough:
|
|
263
|
+
|
|
264
|
+
```bash
|
|
265
|
+
adc init --defaults
|
|
266
|
+
adc help
|
|
267
|
+
adc hub search --query rss
|
|
268
|
+
adc hub install xiaohongshu
|
|
269
|
+
adc source list
|
|
270
|
+
adc content update --group stocks --dry-run
|
|
271
|
+
adc content query --source <source> --children <content_ref> --depth -1
|
|
272
|
+
adc dashboard --daemon
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
Interact command shape:
|
|
276
|
+
|
|
277
|
+
```bash
|
|
278
|
+
adc content interact --source <source> --verb <verb> --ref <content_ref> [--ref <content_ref> ...] [verb options...]
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
## Local Data
|
|
282
|
+
|
|
283
|
+
Default database file:
|
|
284
|
+
|
|
285
|
+
```text
|
|
286
|
+
~/.adc/agent-data-cli.db
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
The shared store layer persists:
|
|
290
|
+
|
|
291
|
+
- channels
|
|
292
|
+
- subscriptions
|
|
293
|
+
- groups
|
|
294
|
+
- group members
|
|
295
|
+
- sync state
|
|
296
|
+
- health checks
|
|
297
|
+
- source configs
|
|
298
|
+
- cli configs
|
|
299
|
+
- action audits
|
|
300
|
+
- `content_nodes`
|
|
301
|
+
- `content_channel_links`
|
|
302
|
+
- `content_relations`
|
|
303
|
+
|
|
304
|
+
Where:
|
|
305
|
+
|
|
306
|
+
- `content_nodes` stores the content node itself
|
|
307
|
+
- `content_channel_links` stores which channels brought each node into the local store
|
|
308
|
+
- `content_relations` stores structural relationships between content nodes; the current built-in abstract relation type in core is `parent`
|
|
309
|
+
|
|
310
|
+
## Project Layout
|
|
311
|
+
|
|
312
|
+
```text
|
|
313
|
+
src/agent_data_cli/ runtime code; includes cli/core/store/fetchers/dashboard/utils
|
|
314
|
+
skills/ agent skills shipped with the repository
|
|
315
|
+
tests/ unit tests and simulated CLI tests
|
|
316
|
+
sources/ development-time local source workspace, usually backed by agent-data-hub
|
|
317
|
+
```
|
|
318
|
+
|
|
319
|
+
## Source Installation Boundary
|
|
320
|
+
|
|
321
|
+
Do not install source runtime dependencies into the core project manifest.
|
|
322
|
+
|
|
323
|
+
Forbidden:
|
|
324
|
+
|
|
325
|
+
```bash
|
|
326
|
+
uv add playwright
|
|
327
|
+
uv add xhshow
|
|
328
|
+
```
|
|
329
|
+
|
|
330
|
+
Allowed source-local installation patterns:
|
|
331
|
+
|
|
332
|
+
```bash
|
|
333
|
+
uv pip install -p .venv/bin/python -r /abs/path/to/source/requirements.txt
|
|
334
|
+
uv pip install -p .venv/bin/python -e /abs/path/to/source
|
|
335
|
+
bash /abs/path/to/source/init.sh
|
|
336
|
+
```
|
|
337
|
+
|
|
338
|
+
Current built-in skills:
|
|
339
|
+
|
|
340
|
+
- [`using-data-cli`](./skills/using-data-cli/SKILL.md)
|
|
341
|
+
- [`authoring-data-cli-source`](./skills/authoring-data-cli-source/SKILL.md)
|
|
342
|
+
|
|
343
|
+
## Testing
|
|
344
|
+
|
|
345
|
+
Run the full test suite:
|
|
346
|
+
|
|
347
|
+
```bash
|
|
348
|
+
env -u http_proxy -u https_proxy -u all_proxy -u HTTP_PROXY -u HTTPS_PROXY -u ALL_PROXY -u no_proxy -u NO_PROXY .venv/bin/python -m unittest discover -s tests -p 'test_*.py' -v
|
|
349
|
+
```
|
|
350
|
+
|
|
351
|
+
`tests/test_browser_fetcher.py` is a real integration test and requires a local Chrome instance with CDP enabled at:
|
|
352
|
+
|
|
353
|
+
```text
|
|
354
|
+
http://127.0.0.1:9222
|
|
355
|
+
```
|
|
356
|
+
|
|
357
|
+
## Developing a New Source
|
|
358
|
+
|
|
359
|
+
Develop new sources in the source workspace repo, typically `agent-data-hub`, not in the tracked core repository.
|
|
360
|
+
|
|
361
|
+
The normal path is still:
|
|
362
|
+
|
|
363
|
+
1. Create `<source_workspace>/<name>/source.py`.
|
|
364
|
+
2. Inherit `BaseSource`.
|
|
365
|
+
3. Declare `MANIFEST` and `SOURCE_CLASS`.
|
|
366
|
+
4. Keep site-specific logic inside `<source_workspace>/<name>/`.
|
|
367
|
+
|
|
368
|
+
If the source has extra runtime dependencies, keep them in that source package and install them with `uv pip install` or `init.sh`, never with `uv add` in the core repo.
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=77", "wheel"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "agent-data-cli"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
description = "Unified multi-source content CLI for discovery, sync, local query, and explicit interaction."
|
|
9
|
+
readme = {file = "src/agent_data_cli/PYPI_README.md", content-type = "text/markdown"}
|
|
10
|
+
license = "MIT"
|
|
11
|
+
license-files = ["LICENSE"]
|
|
12
|
+
requires-python = ">=3.12"
|
|
13
|
+
authors = [
|
|
14
|
+
{name = "Severin Zhong"},
|
|
15
|
+
]
|
|
16
|
+
keywords = ["cli", "agents", "rss", "news", "data", "automation"]
|
|
17
|
+
classifiers = [
|
|
18
|
+
"Development Status :: 3 - Alpha",
|
|
19
|
+
"Environment :: Console",
|
|
20
|
+
"Intended Audience :: Developers",
|
|
21
|
+
"Programming Language :: Python :: 3",
|
|
22
|
+
"Programming Language :: Python :: 3.12",
|
|
23
|
+
"Programming Language :: Python :: 3.13",
|
|
24
|
+
"Programming Language :: Python :: 3.14",
|
|
25
|
+
"Topic :: Internet",
|
|
26
|
+
"Topic :: Software Development :: Libraries :: Python Modules",
|
|
27
|
+
"Topic :: Utilities",
|
|
28
|
+
]
|
|
29
|
+
dependencies = [
|
|
30
|
+
"httpx[socks]>=0.28.1",
|
|
31
|
+
"rich>=14.3.3",
|
|
32
|
+
]
|
|
33
|
+
|
|
34
|
+
[project.urls]
|
|
35
|
+
Homepage = "https://github.com/severinzhong/agent-data-cli"
|
|
36
|
+
Documentation = "https://github.com/severinzhong/agent-data-cli"
|
|
37
|
+
Source = "https://github.com/severinzhong/agent-data-cli"
|
|
38
|
+
Repository = "https://github.com/severinzhong/agent-data-cli"
|
|
39
|
+
Changelog = "https://github.com/severinzhong/agent-data-cli/releases"
|
|
40
|
+
Issues = "https://github.com/severinzhong/agent-data-cli/issues"
|
|
41
|
+
|
|
42
|
+
[project.scripts]
|
|
43
|
+
adc = "agent_data_cli.main:console_main"
|
|
44
|
+
|
|
45
|
+
[project.optional-dependencies]
|
|
46
|
+
dashboard = [
|
|
47
|
+
"streamlit>=1.50.0",
|
|
48
|
+
]
|
|
49
|
+
|
|
50
|
+
[tool.setuptools]
|
|
51
|
+
package-dir = {"" = "src"}
|
|
52
|
+
|
|
53
|
+
[tool.setuptools.packages.find]
|
|
54
|
+
where = ["src"]
|
|
55
|
+
include = ["agent_data_cli*"]
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# agent-data-cli
|
|
2
|
+
|
|
3
|
+
`agent-data-cli` is a unified multi-source content CLI for discovery, sync, local query, and explicit interaction.
|
|
4
|
+
|
|
5
|
+
It is designed for agent workflows and human operators who want one stable command surface across news, RSS, social media, market data, and other content sources that fit the `source/channel/content` model.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
Recommended:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
uv tool install agent-data-cli
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
PyPA-standard CLI install:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
pipx install agent-data-cli
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
If you also want the dashboard:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
uv tool install "agent-data-cli[dashboard]"
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
or:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
pipx install "agent-data-cli[dashboard]"
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Quick Start
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
adc init --defaults
|
|
37
|
+
adc help
|
|
38
|
+
adc source list
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
`adc init` creates the local runtime home at `~/.adc`, initializes the database, and prepares the default `source_workspace`.
|
|
42
|
+
|
|
43
|
+
## Typical Flow
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
adc hub search --query xiaohongshu
|
|
47
|
+
adc hub install xiaohongshu
|
|
48
|
+
adc source list
|
|
49
|
+
adc channel search --source xiaohongshu --query 咖啡
|
|
50
|
+
adc sub add --source xiaohongshu --channel <channel>
|
|
51
|
+
adc content update --source xiaohongshu
|
|
52
|
+
adc content query --source xiaohongshu --limit 20
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Dashboard
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
adc dashboard
|
|
59
|
+
adc dashboard start --daemon
|
|
60
|
+
adc dashboard status
|
|
61
|
+
adc dashboard stop
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Python Version
|
|
65
|
+
|
|
66
|
+
- Python `3.12+`
|
|
67
|
+
|
|
68
|
+
## Links
|
|
69
|
+
|
|
70
|
+
- Source: <https://github.com/severinzhong/agent-data-cli>
|
|
71
|
+
- Issues: <https://github.com/severinzhong/agent-data-cli/issues>
|
|
72
|
+
- Companion source workspace: <https://github.com/severinzhong/agent-data-hub>
|