navcli 0.2.0__tar.gz → 0.2.1__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.
Files changed (45) hide show
  1. {navcli-0.2.0 → navcli-0.2.1}/PKG-INFO +3 -1
  2. navcli-0.2.1/README.md +180 -0
  3. {navcli-0.2.0 → navcli-0.2.1}/docs/README.md +2 -0
  4. {navcli-0.2.0 → navcli-0.2.1}/navcli.egg-info/PKG-INFO +3 -1
  5. {navcli-0.2.0 → navcli-0.2.1}/navcli.egg-info/SOURCES.txt +1 -0
  6. {navcli-0.2.0 → navcli-0.2.1}/pyproject.toml +1 -1
  7. {navcli-0.2.0 → navcli-0.2.1}/navcli/cli/__init__.py +0 -0
  8. {navcli-0.2.0 → navcli-0.2.1}/navcli/cli/app.py +0 -0
  9. {navcli-0.2.0 → navcli-0.2.1}/navcli/cli/client.py +0 -0
  10. {navcli-0.2.0 → navcli-0.2.1}/navcli/cli/commands/__init__.py +0 -0
  11. {navcli-0.2.0 → navcli-0.2.1}/navcli/cli/commands/base.py +0 -0
  12. {navcli-0.2.0 → navcli-0.2.1}/navcli/cli/commands/control.py +0 -0
  13. {navcli-0.2.0 → navcli-0.2.1}/navcli/cli/commands/explore.py +0 -0
  14. {navcli-0.2.0 → navcli-0.2.1}/navcli/cli/commands/interaction.py +0 -0
  15. {navcli-0.2.0 → navcli-0.2.1}/navcli/cli/commands/navigation.py +0 -0
  16. {navcli-0.2.0 → navcli-0.2.1}/navcli/cli/commands/query.py +0 -0
  17. {navcli-0.2.0 → navcli-0.2.1}/navcli/core/__init__.py +0 -0
  18. {navcli-0.2.0 → navcli-0.2.1}/navcli/core/models/__init__.py +0 -0
  19. {navcli-0.2.0 → navcli-0.2.1}/navcli/core/models/dom.py +0 -0
  20. {navcli-0.2.0 → navcli-0.2.1}/navcli/core/models/element.py +0 -0
  21. {navcli-0.2.0 → navcli-0.2.1}/navcli/core/models/feedback.py +0 -0
  22. {navcli-0.2.0 → navcli-0.2.1}/navcli/core/models/state.py +0 -0
  23. {navcli-0.2.0 → navcli-0.2.1}/navcli/server/__init__.py +0 -0
  24. {navcli-0.2.0 → navcli-0.2.1}/navcli/server/app.py +0 -0
  25. {navcli-0.2.0 → navcli-0.2.1}/navcli/server/browser.py +0 -0
  26. {navcli-0.2.0 → navcli-0.2.1}/navcli/server/middleware/__init__.py +0 -0
  27. {navcli-0.2.0 → navcli-0.2.1}/navcli/server/routes/__init__.py +0 -0
  28. {navcli-0.2.0 → navcli-0.2.1}/navcli/server/routes/control.py +0 -0
  29. {navcli-0.2.0 → navcli-0.2.1}/navcli/server/routes/explore.py +0 -0
  30. {navcli-0.2.0 → navcli-0.2.1}/navcli/server/routes/interaction.py +0 -0
  31. {navcli-0.2.0 → navcli-0.2.1}/navcli/server/routes/navigation.py +0 -0
  32. {navcli-0.2.0 → navcli-0.2.1}/navcli/server/routes/query.py +0 -0
  33. {navcli-0.2.0 → navcli-0.2.1}/navcli/server/routes/session.py +0 -0
  34. {navcli-0.2.0 → navcli-0.2.1}/navcli/utils/__init__.py +0 -0
  35. {navcli-0.2.0 → navcli-0.2.1}/navcli/utils/image.py +0 -0
  36. {navcli-0.2.0 → navcli-0.2.1}/navcli/utils/js.py +0 -0
  37. {navcli-0.2.0 → navcli-0.2.1}/navcli/utils/selector.py +0 -0
  38. {navcli-0.2.0 → navcli-0.2.1}/navcli/utils/text.py +0 -0
  39. {navcli-0.2.0 → navcli-0.2.1}/navcli/utils/time.py +0 -0
  40. {navcli-0.2.0 → navcli-0.2.1}/navcli/utils/url.py +0 -0
  41. {navcli-0.2.0 → navcli-0.2.1}/navcli.egg-info/dependency_links.txt +0 -0
  42. {navcli-0.2.0 → navcli-0.2.1}/navcli.egg-info/entry_points.txt +0 -0
  43. {navcli-0.2.0 → navcli-0.2.1}/navcli.egg-info/requires.txt +0 -0
  44. {navcli-0.2.0 → navcli-0.2.1}/navcli.egg-info/top_level.txt +0 -0
  45. {navcli-0.2.0 → navcli-0.2.1}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: navcli
3
- Version: 0.2.0
3
+ Version: 0.2.1
4
4
  Summary: 可交互、可探索的浏览器命令行工具,专为 AI Agent 设计
5
5
  Author: NavCLI Team
6
6
  License: MIT
@@ -76,4 +76,6 @@ Become the **standard browser interaction layer** for AI Agents, enabling any Ag
76
76
 
77
77
  ## Related Documentation
78
78
 
79
+ - [Skill File Download](https://github.com/wumu2013/navcli/blob/main/docs/skill.md)
80
+ - [Project Homepage](https://make.datavoid.fun/navcli/)
79
81
  - [PRD Product Requirements](./NAVCLI_PRD.md)
navcli-0.2.1/README.md ADDED
@@ -0,0 +1,180 @@
1
+ # NavCLI - Browser Automation CLI for AI Agents
2
+
3
+ [![PyPI Version](https://img.shields.io/pypi/v/navcli)](https://pypi.org/project/navcli/)
4
+ [![GitHub](https://img.shields.io/badge/GitHub-wumu2013/navcli-blue)](https://github.com/wumu2013/navcli)
5
+
6
+ **Enable AI Agents to browse the web like humans.**
7
+
8
+ ## What is NavCLI?
9
+
10
+ NavCLI is an interactive, explorable browser CLI designed for AI Agents. Unlike HTTP APIs or headless browser scripts, NavCLI provides:
11
+
12
+ - **Full SPA Support** - JavaScript-rendered pages work seamlessly
13
+ - **Session Persistence** - Cookies and login sessions maintained across requests
14
+ - **Interactive CLI** - Agents can explore and interact dynamically
15
+ - **Token Optimization** - Lightweight element queries with on-demand content
16
+
17
+ ## Quick Start
18
+
19
+ ```bash
20
+ pip install navcli
21
+ ```
22
+
23
+ ### Start Server
24
+
25
+ ```bash
26
+ nav-server
27
+ ```
28
+
29
+ ### Use CLI
30
+
31
+ ```bash
32
+ nav
33
+ ```
34
+
35
+ Or run commands directly:
36
+
37
+ ```bash
38
+ nav g https://example.com
39
+ nav tables
40
+ nav paragraphs
41
+ ```
42
+
43
+ ## Data Extraction
44
+
45
+ > **IMPORTANT**: For data extraction, focus on `tables` and `paragraphs`.
46
+
47
+ | Command | Description |
48
+ |---------|-------------|
49
+ | `nav tables` | Extract all `<table>` elements with structured data |
50
+ | `nav paragraphs` | Extract large text paragraphs (200+ chars) |
51
+ | `nav g <url>` | Navigate + auto-fetch paragraphs on first call |
52
+
53
+ ## Core Commands
54
+
55
+ ### Navigation
56
+
57
+ ```bash
58
+ nav g <url> # Navigate to URL
59
+ nav b # Go back
60
+ nav f # Go forward
61
+ nav r # Reload
62
+ ```
63
+
64
+ ### Interaction
65
+
66
+ ```bash
67
+ nav c <sel> [--force] # Click element
68
+ nav t <sel> <txt> # Type text
69
+ nav clear <sel> # Clear input
70
+ nav upload <sel> <path> # Upload file
71
+ ```
72
+
73
+ ### Query
74
+
75
+ ```bash
76
+ nav elements # Interactive elements
77
+ nav text # Page text content
78
+ nav html # Page HTML
79
+ nav screenshot # Screenshot (base64)
80
+ nav state # Full page state
81
+ nav url # Current URL
82
+ nav title # Page title
83
+ nav tables # All tables with data
84
+ nav paragraphs [len] # Large text paragraphs
85
+ nav links # All hyperlinks
86
+ nav forms # All forms
87
+ ```
88
+
89
+ ### Explore
90
+
91
+ ```bash
92
+ nav find <text> # Find element by text
93
+ nav findall <text> # Find all elements by text
94
+ nav inspect <sel> # Inspect element details
95
+ nav wait_idle [sec] # Wait for network idle
96
+ nav scroll top|bottom|up|down # Scroll page
97
+ ```
98
+
99
+ ### Session
100
+
101
+ ```bash
102
+ nav cookies # Show cookies
103
+ nav save_session [name] # Save session
104
+ nav load_session [name] # Load session
105
+ ```
106
+
107
+ ### Control
108
+
109
+ ```bash
110
+ nav quit # Close browser
111
+ nav exit # Exit CLI
112
+ ```
113
+
114
+ ## Agent Workflow
115
+
116
+ ```
117
+ Navigate → Observe → Interact → Feedback → Continue
118
+ ```
119
+
120
+ ```bash
121
+ # 1 Navigate - Go to target page
122
+ nav g https://example.com/data-page
123
+
124
+ # 2 Observe - Check what data is available
125
+ nav tables # Extract tabular data
126
+ nav paragraphs # Extract text content
127
+
128
+ # 3 Interact - Navigate/paginate if needed
129
+ nav find "Next"
130
+ nav c a.next-page
131
+ nav wait_idle
132
+
133
+ # 4 Feedback - Verify data extraction
134
+ nav tables
135
+ nav paragraphs
136
+
137
+ # 5 Continue - Proceed to next data source
138
+ nav g https://example.com/page2
139
+ ```
140
+
141
+ ## API
142
+
143
+ NavCLI uses a client-server architecture with HTTP API:
144
+
145
+ | Method | Endpoint | Description |
146
+ |--------|----------|-------------|
147
+ | POST | `/cmd/goto?url=<url>` | Navigate to URL |
148
+ | POST | `/cmd/click?selector=<s>` | Click element |
149
+ | GET | `/query/tables` | Get all tables |
150
+ | GET | `/query/paragraphs` | Get large text paragraphs |
151
+ | GET | `/query/elements` | Get interactive elements |
152
+ | POST | `/cmd/session/save?name=<n>` | Save session |
153
+ | POST | `/cmd/session/load?name=<n>` | Load session |
154
+
155
+ See [docs/skill.md](docs/skill.md) for complete API reference.
156
+
157
+ ## Session Persistence
158
+
159
+ Save login sessions for authenticated access:
160
+
161
+ ```bash
162
+ # Save after login
163
+ nav save_session jisilu
164
+
165
+ # Load session for future headless access
166
+ nav load_session jisilu
167
+ ```
168
+
169
+ Sessions are stored in `~/.navcli/sessions/`.
170
+
171
+ ## Documentation
172
+
173
+ - [CLI & API Reference](docs/skill.md)
174
+ - [Skill File Download](https://github.com/wumu2013/navcli/blob/main/docs/skill.md)
175
+ - [Project Homepage](https://make.datavoid.fun/navcli/)
176
+ - [Product Requirements](docs/NAVCLI_PRD.md)
177
+
178
+ ## License
179
+
180
+ MIT
@@ -43,4 +43,6 @@ Become the **standard browser interaction layer** for AI Agents, enabling any Ag
43
43
 
44
44
  ## Related Documentation
45
45
 
46
+ - [Skill File Download](https://github.com/wumu2013/navcli/blob/main/docs/skill.md)
47
+ - [Project Homepage](https://make.datavoid.fun/navcli/)
46
48
  - [PRD Product Requirements](./NAVCLI_PRD.md)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: navcli
3
- Version: 0.2.0
3
+ Version: 0.2.1
4
4
  Summary: 可交互、可探索的浏览器命令行工具,专为 AI Agent 设计
5
5
  Author: NavCLI Team
6
6
  License: MIT
@@ -76,4 +76,6 @@ Become the **standard browser interaction layer** for AI Agents, enabling any Ag
76
76
 
77
77
  ## Related Documentation
78
78
 
79
+ - [Skill File Download](https://github.com/wumu2013/navcli/blob/main/docs/skill.md)
80
+ - [Project Homepage](https://make.datavoid.fun/navcli/)
79
81
  - [PRD Product Requirements](./NAVCLI_PRD.md)
@@ -1,3 +1,4 @@
1
+ README.md
1
2
  pyproject.toml
2
3
  docs/README.md
3
4
  navcli.egg-info/PKG-INFO
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "navcli"
7
- version = "0.2.0"
7
+ version = "0.2.1"
8
8
  description = "可交互、可探索的浏览器命令行工具,专为 AI Agent 设计"
9
9
  readme = "docs/README.md"
10
10
  requires-python = ">=3.9"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes