camoufox-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.
@@ -0,0 +1,20 @@
1
+ {
2
+ "permissions": {
3
+ "allow": [
4
+ "Bash(rustc:*)",
5
+ "Bash(source:*)",
6
+ "Bash($BIN:*)",
7
+ "Bash(python3:*)",
8
+ "Bash(pip3 show:*)",
9
+ "Bash(cargo build:*)",
10
+ "Bash(pip3 list:*)",
11
+ "Bash(uv pip:*)",
12
+ "Bash(PYTHONPATH=/Users/benn/Documents/w/camoufox-cli/src /Users/benn/.local/pipx/venvs/camoufox/bin/python3:*)",
13
+ "Bash(/Users/benn/.local/pipx/venvs/camoufox/bin/python3:*)"
14
+ ]
15
+ },
16
+ "enableAllProjectMcpServers": true,
17
+ "enabledMcpjsonServers": [
18
+ "shadcn"
19
+ ]
20
+ }
@@ -0,0 +1,25 @@
1
+ # Python
2
+ __pycache__/
3
+ *.pyc
4
+ *.pyo
5
+ *.egg-info/
6
+ dist/
7
+ build/
8
+ .venv/
9
+ .mypy_cache/
10
+
11
+ # Node
12
+ node_modules/
13
+
14
+ # IDE
15
+ .idea/
16
+ .vscode/
17
+ *.swp
18
+ *.swo
19
+
20
+ # OS
21
+ .DS_Store
22
+
23
+ # Runtime
24
+ *.sock
25
+ *.pid
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Bin Huang
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,158 @@
1
+ Metadata-Version: 2.4
2
+ Name: camoufox-cli
3
+ Version: 0.1.0
4
+ Summary: Anti-detect browser CLI for AI agents, powered by Camoufox
5
+ Project-URL: Homepage, https://github.com/Bin-Huang/camoufox-cli
6
+ Project-URL: Repository, https://github.com/Bin-Huang/camoufox-cli
7
+ Project-URL: Issues, https://github.com/Bin-Huang/camoufox-cli/issues
8
+ Author: Bin Huang
9
+ License-Expression: MIT
10
+ License-File: LICENSE
11
+ Keywords: ai-agent,anti-detect,automation,browser,camoufox,headless
12
+ Classifier: Development Status :: 3 - Alpha
13
+ Classifier: Environment :: Console
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: Topic :: Internet :: WWW/HTTP :: Browsers
16
+ Classifier: Topic :: Software Development :: Testing
17
+ Requires-Python: >=3.10
18
+ Requires-Dist: camoufox[geoip]
19
+ Requires-Dist: playwright
20
+ Description-Content-Type: text/markdown
21
+
22
+ # camoufox-cli
23
+
24
+ Anti-detect browser CLI for AI agents, powered by [Camoufox](https://github.com/daijro/camoufox).
25
+
26
+ Camoufox has C++-level fingerprint spoofing (`navigator.webdriver=false`, randomized canvas/WebGL/audio, real plugins) but only exposes a Python API. This CLI wraps it into a simple command interface optimized for AI agent tool calls — snapshot the accessibility tree, interact by ref, repeat.
27
+
28
+ ## Install
29
+
30
+ ```bash
31
+ pipx install camoufox-cli
32
+ ```
33
+
34
+ Or with pip:
35
+
36
+ ```bash
37
+ pip install camoufox-cli
38
+ ```
39
+
40
+ ## Quick Start
41
+
42
+ ```bash
43
+ camoufox-cli open https://example.com # Launch browser & navigate
44
+ camoufox-cli snapshot -i # Interactive elements only
45
+ # - link "More information..." [ref=e1]
46
+ camoufox-cli click @e1 # Click by ref
47
+ camoufox-cli close # Done
48
+ ```
49
+
50
+ ## Commands
51
+
52
+ ### Navigation
53
+
54
+ ```bash
55
+ camoufox-cli open <url> # Navigate to URL (starts daemon if needed)
56
+ camoufox-cli back # Go back
57
+ camoufox-cli forward # Go forward
58
+ camoufox-cli reload # Reload page
59
+ camoufox-cli url # Print current URL
60
+ camoufox-cli title # Print page title
61
+ camoufox-cli close # Close browser and stop daemon
62
+ ```
63
+
64
+ ### Snapshot
65
+
66
+ ```bash
67
+ camoufox-cli snapshot # Full accessibility tree
68
+ camoufox-cli snapshot -i # Interactive elements only
69
+ camoufox-cli snapshot -s "css-selector" # Scoped to CSS selector
70
+ ```
71
+
72
+ Output format:
73
+
74
+ ```
75
+ - heading "Example Domain" [level=1] [ref=e1]
76
+ - paragraph [ref=e2]
77
+ - link "More information..." [ref=e3]
78
+ ```
79
+
80
+ ### Interaction
81
+
82
+ ```bash
83
+ camoufox-cli click @e1 # Click element
84
+ camoufox-cli fill @e3 "search query" # Clear + type into input
85
+ camoufox-cli type @e3 "append text" # Type without clearing
86
+ camoufox-cli select @e5 "option text" # Select dropdown option
87
+ camoufox-cli check @e6 # Toggle checkbox
88
+ camoufox-cli hover @e2 # Hover over element
89
+ camoufox-cli press Enter # Press keyboard key
90
+ camoufox-cli press "Control+a" # Key combination
91
+ ```
92
+
93
+ ### Data Extraction
94
+
95
+ ```bash
96
+ camoufox-cli text @e1 # Get text content of element
97
+ camoufox-cli text body # Get all page text
98
+ camoufox-cli eval "document.title" # Execute JavaScript
99
+ camoufox-cli screenshot # Screenshot (base64 to stdout)
100
+ camoufox-cli screenshot page.png # Screenshot to file
101
+ camoufox-cli screenshot --full page.png # Full page screenshot
102
+ ```
103
+
104
+ ### Scroll & Wait
105
+
106
+ ```bash
107
+ camoufox-cli scroll down # Scroll down 500px
108
+ camoufox-cli scroll up 1000 # Scroll up 1000px
109
+ camoufox-cli wait 2000 # Wait milliseconds
110
+ camoufox-cli wait @e1 # Wait for element to appear
111
+ camoufox-cli wait --url "*/dashboard" # Wait for URL pattern
112
+ ```
113
+
114
+ ### Tabs
115
+
116
+ ```bash
117
+ camoufox-cli tabs # List open tabs
118
+ camoufox-cli switch 2 # Switch to tab by index
119
+ camoufox-cli close-tab # Close current tab
120
+ ```
121
+
122
+ ### Sessions
123
+
124
+ ```bash
125
+ camoufox-cli sessions # List active sessions
126
+ camoufox-cli --session work open <url> # Use named session
127
+ camoufox-cli close --all # Close all sessions
128
+ ```
129
+
130
+ ### Cookies
131
+
132
+ ```bash
133
+ camoufox-cli cookies # Dump cookies as JSON
134
+ camoufox-cli cookies import file.json # Import cookies
135
+ camoufox-cli cookies export file.json # Export cookies
136
+ ```
137
+
138
+ ## Flags
139
+
140
+ ```
141
+ --session <name> Named session (default: "default")
142
+ --headed Show browser window (default: headless)
143
+ --timeout <seconds> Daemon idle timeout (default: 1800)
144
+ --json Output as JSON
145
+ --persistent <path> Use persistent browser profile directory
146
+ ```
147
+
148
+ ## Architecture
149
+
150
+ ```
151
+ CLI (camoufox-cli) ──Unix socket──▶ Daemon (Python) ──Playwright──▶ Camoufox (Firefox)
152
+ ```
153
+
154
+ The CLI sends JSON commands to a long-running daemon process via Unix socket. The daemon manages the Camoufox browser instance and maintains the ref registry between commands. The daemon auto-starts on the first command and auto-stops after 30 minutes of inactivity.
155
+
156
+ ## License
157
+
158
+ MIT
@@ -0,0 +1,137 @@
1
+ # camoufox-cli
2
+
3
+ Anti-detect browser CLI for AI agents, powered by [Camoufox](https://github.com/daijro/camoufox).
4
+
5
+ Camoufox has C++-level fingerprint spoofing (`navigator.webdriver=false`, randomized canvas/WebGL/audio, real plugins) but only exposes a Python API. This CLI wraps it into a simple command interface optimized for AI agent tool calls — snapshot the accessibility tree, interact by ref, repeat.
6
+
7
+ ## Install
8
+
9
+ ```bash
10
+ pipx install camoufox-cli
11
+ ```
12
+
13
+ Or with pip:
14
+
15
+ ```bash
16
+ pip install camoufox-cli
17
+ ```
18
+
19
+ ## Quick Start
20
+
21
+ ```bash
22
+ camoufox-cli open https://example.com # Launch browser & navigate
23
+ camoufox-cli snapshot -i # Interactive elements only
24
+ # - link "More information..." [ref=e1]
25
+ camoufox-cli click @e1 # Click by ref
26
+ camoufox-cli close # Done
27
+ ```
28
+
29
+ ## Commands
30
+
31
+ ### Navigation
32
+
33
+ ```bash
34
+ camoufox-cli open <url> # Navigate to URL (starts daemon if needed)
35
+ camoufox-cli back # Go back
36
+ camoufox-cli forward # Go forward
37
+ camoufox-cli reload # Reload page
38
+ camoufox-cli url # Print current URL
39
+ camoufox-cli title # Print page title
40
+ camoufox-cli close # Close browser and stop daemon
41
+ ```
42
+
43
+ ### Snapshot
44
+
45
+ ```bash
46
+ camoufox-cli snapshot # Full accessibility tree
47
+ camoufox-cli snapshot -i # Interactive elements only
48
+ camoufox-cli snapshot -s "css-selector" # Scoped to CSS selector
49
+ ```
50
+
51
+ Output format:
52
+
53
+ ```
54
+ - heading "Example Domain" [level=1] [ref=e1]
55
+ - paragraph [ref=e2]
56
+ - link "More information..." [ref=e3]
57
+ ```
58
+
59
+ ### Interaction
60
+
61
+ ```bash
62
+ camoufox-cli click @e1 # Click element
63
+ camoufox-cli fill @e3 "search query" # Clear + type into input
64
+ camoufox-cli type @e3 "append text" # Type without clearing
65
+ camoufox-cli select @e5 "option text" # Select dropdown option
66
+ camoufox-cli check @e6 # Toggle checkbox
67
+ camoufox-cli hover @e2 # Hover over element
68
+ camoufox-cli press Enter # Press keyboard key
69
+ camoufox-cli press "Control+a" # Key combination
70
+ ```
71
+
72
+ ### Data Extraction
73
+
74
+ ```bash
75
+ camoufox-cli text @e1 # Get text content of element
76
+ camoufox-cli text body # Get all page text
77
+ camoufox-cli eval "document.title" # Execute JavaScript
78
+ camoufox-cli screenshot # Screenshot (base64 to stdout)
79
+ camoufox-cli screenshot page.png # Screenshot to file
80
+ camoufox-cli screenshot --full page.png # Full page screenshot
81
+ ```
82
+
83
+ ### Scroll & Wait
84
+
85
+ ```bash
86
+ camoufox-cli scroll down # Scroll down 500px
87
+ camoufox-cli scroll up 1000 # Scroll up 1000px
88
+ camoufox-cli wait 2000 # Wait milliseconds
89
+ camoufox-cli wait @e1 # Wait for element to appear
90
+ camoufox-cli wait --url "*/dashboard" # Wait for URL pattern
91
+ ```
92
+
93
+ ### Tabs
94
+
95
+ ```bash
96
+ camoufox-cli tabs # List open tabs
97
+ camoufox-cli switch 2 # Switch to tab by index
98
+ camoufox-cli close-tab # Close current tab
99
+ ```
100
+
101
+ ### Sessions
102
+
103
+ ```bash
104
+ camoufox-cli sessions # List active sessions
105
+ camoufox-cli --session work open <url> # Use named session
106
+ camoufox-cli close --all # Close all sessions
107
+ ```
108
+
109
+ ### Cookies
110
+
111
+ ```bash
112
+ camoufox-cli cookies # Dump cookies as JSON
113
+ camoufox-cli cookies import file.json # Import cookies
114
+ camoufox-cli cookies export file.json # Export cookies
115
+ ```
116
+
117
+ ## Flags
118
+
119
+ ```
120
+ --session <name> Named session (default: "default")
121
+ --headed Show browser window (default: headless)
122
+ --timeout <seconds> Daemon idle timeout (default: 1800)
123
+ --json Output as JSON
124
+ --persistent <path> Use persistent browser profile directory
125
+ ```
126
+
127
+ ## Architecture
128
+
129
+ ```
130
+ CLI (camoufox-cli) ──Unix socket──▶ Daemon (Python) ──Playwright──▶ Camoufox (Firefox)
131
+ ```
132
+
133
+ The CLI sends JSON commands to a long-running daemon process via Unix socket. The daemon manages the Camoufox browser instance and maintains the ref registry between commands. The daemon auto-starts on the first command and auto-stops after 30 minutes of inactivity.
134
+
135
+ ## License
136
+
137
+ MIT