pip-boy 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.
Files changed (54) hide show
  1. pip_boy-0.1.0/LICENSE +21 -0
  2. pip_boy-0.1.0/PKG-INFO +185 -0
  3. pip_boy-0.1.0/README.md +165 -0
  4. pip_boy-0.1.0/pyproject.toml +35 -0
  5. pip_boy-0.1.0/setup.cfg +4 -0
  6. pip_boy-0.1.0/src/pip_agent/__init__.py +6 -0
  7. pip_boy-0.1.0/src/pip_agent/__main__.py +29 -0
  8. pip_boy-0.1.0/src/pip_agent/agent.py +925 -0
  9. pip_boy-0.1.0/src/pip_agent/background.py +122 -0
  10. pip_boy-0.1.0/src/pip_agent/channels.py +996 -0
  11. pip_boy-0.1.0/src/pip_agent/commands.py +481 -0
  12. pip_boy-0.1.0/src/pip_agent/compact.py +269 -0
  13. pip_boy-0.1.0/src/pip_agent/config.py +42 -0
  14. pip_boy-0.1.0/src/pip_agent/memory/__init__.py +387 -0
  15. pip_boy-0.1.0/src/pip_agent/memory/consolidate.py +174 -0
  16. pip_boy-0.1.0/src/pip_agent/memory/recall.py +119 -0
  17. pip_boy-0.1.0/src/pip_agent/memory/reflect.py +179 -0
  18. pip_boy-0.1.0/src/pip_agent/memory/scheduler.py +123 -0
  19. pip_boy-0.1.0/src/pip_agent/profiler.py +66 -0
  20. pip_boy-0.1.0/src/pip_agent/routing.py +372 -0
  21. pip_boy-0.1.0/src/pip_agent/scaffold/__init__.py +169 -0
  22. pip_boy-0.1.0/src/pip_agent/scaffold/env.example +19 -0
  23. pip_boy-0.1.0/src/pip_agent/scaffold/gitignore_entries.txt +4 -0
  24. pip_boy-0.1.0/src/pip_agent/scaffold/models.json +18 -0
  25. pip_boy-0.1.0/src/pip_agent/scaffold/pip-boy.md +23 -0
  26. pip_boy-0.1.0/src/pip_agent/scaffold/user.md +8 -0
  27. pip_boy-0.1.0/src/pip_agent/skills/__init__.py +121 -0
  28. pip_boy-0.1.0/src/pip_agent/skills/agent-team/SKILL.md +150 -0
  29. pip_boy-0.1.0/src/pip_agent/skills/code-review/SKILL.md +105 -0
  30. pip_boy-0.1.0/src/pip_agent/skills/create-skill/SKILL.md +104 -0
  31. pip_boy-0.1.0/src/pip_agent/skills/git/SKILL.md +36 -0
  32. pip_boy-0.1.0/src/pip_agent/skills/task-planning/SKILL.md +170 -0
  33. pip_boy-0.1.0/src/pip_agent/task_graph.py +876 -0
  34. pip_boy-0.1.0/src/pip_agent/team/__init__.py +927 -0
  35. pip_boy-0.1.0/src/pip_agent/tool_dispatch.py +479 -0
  36. pip_boy-0.1.0/src/pip_agent/tools.py +1074 -0
  37. pip_boy-0.1.0/src/pip_agent/worktree.py +194 -0
  38. pip_boy-0.1.0/src/pip_boy.egg-info/PKG-INFO +185 -0
  39. pip_boy-0.1.0/src/pip_boy.egg-info/SOURCES.txt +52 -0
  40. pip_boy-0.1.0/src/pip_boy.egg-info/dependency_links.txt +1 -0
  41. pip_boy-0.1.0/src/pip_boy.egg-info/entry_points.txt +2 -0
  42. pip_boy-0.1.0/src/pip_boy.egg-info/requires.txt +11 -0
  43. pip_boy-0.1.0/src/pip_boy.egg-info/top_level.txt +1 -0
  44. pip_boy-0.1.0/tests/test_background.py +151 -0
  45. pip_boy-0.1.0/tests/test_channels.py +271 -0
  46. pip_boy-0.1.0/tests/test_commands.py +395 -0
  47. pip_boy-0.1.0/tests/test_compact.py +292 -0
  48. pip_boy-0.1.0/tests/test_routing.py +336 -0
  49. pip_boy-0.1.0/tests/test_scaffold.py +145 -0
  50. pip_boy-0.1.0/tests/test_skills.py +331 -0
  51. pip_boy-0.1.0/tests/test_task_graph.py +844 -0
  52. pip_boy-0.1.0/tests/test_team.py +1422 -0
  53. pip_boy-0.1.0/tests/test_tool_dispatch.py +116 -0
  54. pip_boy-0.1.0/tests/test_worktree.py +193 -0
pip_boy-0.1.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Pip-Boy Contributors
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.
pip_boy-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,185 @@
1
+ Metadata-Version: 2.4
2
+ Name: pip-boy
3
+ Version: 0.1.0
4
+ Summary: Personal assistant agent with persistent memory and configurable persona
5
+ License-Expression: MIT
6
+ Project-URL: Repository, https://github.com/ByeDream/Pip-Boy
7
+ Requires-Python: >=3.11
8
+ Description-Content-Type: text/markdown
9
+ License-File: LICENSE
10
+ Requires-Dist: anthropic<1,>=0.49
11
+ Requires-Dist: pydantic-settings<3,>=2.8
12
+ Requires-Dist: pyreadline3<4,>=3.5; sys_platform == "win32"
13
+ Requires-Dist: tavily-python>=0.5
14
+ Requires-Dist: ddgs>=7
15
+ Requires-Dist: pyyaml<7,>=6
16
+ Requires-Dist: httpx>=0.27
17
+ Requires-Dist: wecom-aibot-python-sdk>=1.0
18
+ Requires-Dist: qrcode>=7
19
+ Dynamic: license-file
20
+
21
+ # Pip-Boy
22
+
23
+ <p align="center">
24
+ <img src="docs/Imgs/Pip-BoyAdArtPrint.jpg" width="480" alt="Pip-Boy 3000 Mark IV" />
25
+ </p>
26
+
27
+ A personal assistant agent with persistent memory and a configurable persona, providing a chat-based interface for workstation interaction. Built on Anthropic's Claude API, it supports multi-agent teamwork, task planning, git worktree isolation, and extensible skills.
28
+
29
+ ## Features
30
+
31
+ ### Core
32
+
33
+ - **Conversational REPL** — Interactive chat loop with readline history and UTF-8 support
34
+ - **Persona System** — Fixed lead persona ("Pip-Boy") with customizable teammate personas via Markdown files
35
+ - **Web Search** — Tavily integration with automatic DuckDuckGo fallback
36
+
37
+ ### Tools
38
+
39
+ - **Filesystem** — `read`, `write`, `edit`, `glob` (sandboxed to working directory)
40
+ - **Shell** — `bash` execution with optional **background mode** for long-running commands
41
+ - **Web** — `web_search` and `web_fetch` for real-time information retrieval
42
+ - **Skills** — `load_skill` dynamically loads built-in and user-defined skill guides (Markdown with YAML frontmatter)
43
+
44
+ ### Task Planning
45
+
46
+ - **Story / Task DAG** — Two-level planning: stories (epics) contain tasks with dependency tracking
47
+ - **Kanban Board** — `task_board_overview`, `task_board_detail` for status visualization
48
+ - **State Machine** — Tasks flow through `pending` → `in_progress` → `in_review` → `completed` / `failed`
49
+ - **Persistent Storage** — JSON files under `.pip/tasks/` survive across sessions
50
+
51
+ ### Multi-Agent Team
52
+
53
+ - **Teammate Spawning** — `team_spawn` creates daemon threads with per-session model and turn limits
54
+ - **Inbox Messaging** — JSONL-based message bus (`send`, `read_inbox`) between lead and teammates
55
+ - **Model Selection** — Per-project `.pip/models.json` defines available models for teammate assignment
56
+ - **Protocol Tracking** — Structured shutdown and plan approval flows
57
+ - **CLI Commands** — `/team` for roster status, `/inbox` to peek the lead inbox
58
+
59
+ ### Git Worktree Isolation
60
+
61
+ - **Isolated Branches** — Each subagent works in its own git worktree (`.pip/.worktrees/{name}/`, branch `wt/{name}`)
62
+ - **Sync / Integrate / Cleanup** — Worktree lifecycle management with merge conflict detection
63
+ - **Task Submission** — `task_submit` syncs work and transitions task status automatically
64
+
65
+ ### Context Management
66
+
67
+ - **Micro-Compaction** — Old tool results replaced with placeholders, keeping the last N rounds intact
68
+ - **Auto-Compaction** — When token count exceeds threshold, full transcript is saved and replaced with an LLM-generated summary
69
+ - **Transcript Persistence** — Timestamped JSON transcripts stored under `.pip/transcripts/`
70
+
71
+ ### Skills (Built-in)
72
+
73
+ | Skill | Purpose |
74
+ |-------|---------|
75
+ | `task-planning` | Structured planning with story/task breakdown |
76
+ | `agent-team` | Multi-agent coordination and delegation |
77
+ | `git` | Git operations and workflow guidance |
78
+ | `code-review` | Code review methodology |
79
+ | `create-skill` | Authoring new custom skills |
80
+
81
+ ### Workspace Scaffold
82
+
83
+ On first run in a new project, the agent automatically creates:
84
+ - `.pip/` directory structure (tasks, transcripts, team, skills)
85
+ - `.pip/models.json` with default model catalog
86
+ - `.pip/agents/pip-boy.md` default agent persona
87
+ - `.env` from template (if missing)
88
+ - `.gitignore` entries for `.pip/` and related paths
89
+ - `.pip/.scaffold_manifest.json` for tracking scaffold file versions
90
+
91
+ Scaffold files are version-tracked: unmodified files are auto-updated when a new version ships changes; locally modified files are left untouched with a warning.
92
+
93
+ ## Installation
94
+
95
+ **Prerequisites:** Python >= 3.11
96
+
97
+ ```bash
98
+ pip install pip-boy
99
+ ```
100
+
101
+ ### Development (from source)
102
+
103
+ ```bash
104
+ git clone https://github.com/ByeDream/Pip-Boy.git
105
+ cd Pip-Boy
106
+ pip install -e .
107
+ ```
108
+
109
+ ## Usage
110
+
111
+ ```bash
112
+ # Navigate to your target project and run
113
+ cd /path/to/your/project
114
+ pip-boy
115
+
116
+ # Or use python -m
117
+ python -m pip_agent
118
+
119
+ # CLI-only mode (no WeChat/WeCom channels)
120
+ pip-boy --cli
121
+
122
+ # Force WeChat QR login
123
+ pip-boy --scan
124
+
125
+ # Show version
126
+ pip-boy --version
127
+ ```
128
+
129
+ On first launch, the scaffold automatically creates `.pip/` directory structure, `.env` (from template), and `.gitignore` entries in the target project. Edit the generated `.env` to fill in your `ANTHROPIC_API_KEY`, then run again.
130
+
131
+ The agent uses `Path.cwd()` as its working directory — always run it from the project you want to interact with.
132
+
133
+ ### Updating
134
+
135
+ From within a running session:
136
+
137
+ ```
138
+ /update
139
+ ```
140
+
141
+ Or manually:
142
+
143
+ ```bash
144
+ pip install --upgrade pip-boy
145
+ ```
146
+
147
+ ## Configuration
148
+
149
+ All configuration is done via environment variables or `.env` file.
150
+
151
+ | Variable | Required | Default | Description |
152
+ |---|---|---|---|
153
+ | `ANTHROPIC_API_KEY` | **Yes** | — | Anthropic API key |
154
+ | `ANTHROPIC_BASE_URL` | No | *(api.anthropic.com)* | Custom API endpoint (proxy support) |
155
+ | `MODEL` | No | `claude-sonnet-4-6` | Default model for the lead agent |
156
+ | `MAX_TOKENS` | No | `8096` | Max response tokens |
157
+ | `SEARCH_API_KEY` | No | — | Tavily API key; falls back to DuckDuckGo |
158
+ | `COMPACT_THRESHOLD` | No | `50000` | Token estimate to trigger auto-compaction |
159
+ | `COMPACT_MICRO_AGE` | No | `3` | Micro-compaction: rounds of tool results to preserve |
160
+ | `VERBOSE` | No | `true` | Verbose output |
161
+ | `PROFILER_ENABLED` | No | `false` | Enable performance profiling |
162
+
163
+ ### Project-Level Files
164
+
165
+ | File | Location | Purpose |
166
+ |---|---|---|
167
+ | `models.json` | `.pip/` | Model catalog for teammate spawning |
168
+ | `*.md` | `.pip/team/` | Teammate persona definitions (YAML frontmatter + body) |
169
+ | `_meta.json` + `*.json` | `.pip/tasks/{story}/` | Task board state |
170
+ | `*.md` | `.pip/skills/` | User-defined skills |
171
+
172
+ ## Dependencies
173
+
174
+ - [`anthropic`](https://github.com/anthropics/anthropic-sdk-python) — Claude API client
175
+ - [`pydantic-settings`](https://github.com/pydantic/pydantic-settings) — Configuration management
176
+ - [`tavily-python`](https://github.com/tavily-ai/tavily-python) — Web search API
177
+ - [`ddgs`](https://github.com/deedy5/duckduckgo_search) — DuckDuckGo fallback search
178
+ - [`pyyaml`](https://github.com/yaml/pyyaml) — YAML parsing for skills and team files
179
+ - [`httpx`](https://github.com/encode/httpx) — HTTP client for channel communication
180
+ - [`qrcode`](https://github.com/lincolnloop/python-qrcode) — Terminal QR code rendering for WeChat login
181
+ - [`pyreadline3`](https://github.com/pyreadline3/pyreadline3) — Readline for Windows
182
+
183
+ ## License
184
+
185
+ This project is licensed under the MIT License. See [LICENSE](LICENSE) for details.
@@ -0,0 +1,165 @@
1
+ # Pip-Boy
2
+
3
+ <p align="center">
4
+ <img src="docs/Imgs/Pip-BoyAdArtPrint.jpg" width="480" alt="Pip-Boy 3000 Mark IV" />
5
+ </p>
6
+
7
+ A personal assistant agent with persistent memory and a configurable persona, providing a chat-based interface for workstation interaction. Built on Anthropic's Claude API, it supports multi-agent teamwork, task planning, git worktree isolation, and extensible skills.
8
+
9
+ ## Features
10
+
11
+ ### Core
12
+
13
+ - **Conversational REPL** — Interactive chat loop with readline history and UTF-8 support
14
+ - **Persona System** — Fixed lead persona ("Pip-Boy") with customizable teammate personas via Markdown files
15
+ - **Web Search** — Tavily integration with automatic DuckDuckGo fallback
16
+
17
+ ### Tools
18
+
19
+ - **Filesystem** — `read`, `write`, `edit`, `glob` (sandboxed to working directory)
20
+ - **Shell** — `bash` execution with optional **background mode** for long-running commands
21
+ - **Web** — `web_search` and `web_fetch` for real-time information retrieval
22
+ - **Skills** — `load_skill` dynamically loads built-in and user-defined skill guides (Markdown with YAML frontmatter)
23
+
24
+ ### Task Planning
25
+
26
+ - **Story / Task DAG** — Two-level planning: stories (epics) contain tasks with dependency tracking
27
+ - **Kanban Board** — `task_board_overview`, `task_board_detail` for status visualization
28
+ - **State Machine** — Tasks flow through `pending` → `in_progress` → `in_review` → `completed` / `failed`
29
+ - **Persistent Storage** — JSON files under `.pip/tasks/` survive across sessions
30
+
31
+ ### Multi-Agent Team
32
+
33
+ - **Teammate Spawning** — `team_spawn` creates daemon threads with per-session model and turn limits
34
+ - **Inbox Messaging** — JSONL-based message bus (`send`, `read_inbox`) between lead and teammates
35
+ - **Model Selection** — Per-project `.pip/models.json` defines available models for teammate assignment
36
+ - **Protocol Tracking** — Structured shutdown and plan approval flows
37
+ - **CLI Commands** — `/team` for roster status, `/inbox` to peek the lead inbox
38
+
39
+ ### Git Worktree Isolation
40
+
41
+ - **Isolated Branches** — Each subagent works in its own git worktree (`.pip/.worktrees/{name}/`, branch `wt/{name}`)
42
+ - **Sync / Integrate / Cleanup** — Worktree lifecycle management with merge conflict detection
43
+ - **Task Submission** — `task_submit` syncs work and transitions task status automatically
44
+
45
+ ### Context Management
46
+
47
+ - **Micro-Compaction** — Old tool results replaced with placeholders, keeping the last N rounds intact
48
+ - **Auto-Compaction** — When token count exceeds threshold, full transcript is saved and replaced with an LLM-generated summary
49
+ - **Transcript Persistence** — Timestamped JSON transcripts stored under `.pip/transcripts/`
50
+
51
+ ### Skills (Built-in)
52
+
53
+ | Skill | Purpose |
54
+ |-------|---------|
55
+ | `task-planning` | Structured planning with story/task breakdown |
56
+ | `agent-team` | Multi-agent coordination and delegation |
57
+ | `git` | Git operations and workflow guidance |
58
+ | `code-review` | Code review methodology |
59
+ | `create-skill` | Authoring new custom skills |
60
+
61
+ ### Workspace Scaffold
62
+
63
+ On first run in a new project, the agent automatically creates:
64
+ - `.pip/` directory structure (tasks, transcripts, team, skills)
65
+ - `.pip/models.json` with default model catalog
66
+ - `.pip/agents/pip-boy.md` default agent persona
67
+ - `.env` from template (if missing)
68
+ - `.gitignore` entries for `.pip/` and related paths
69
+ - `.pip/.scaffold_manifest.json` for tracking scaffold file versions
70
+
71
+ Scaffold files are version-tracked: unmodified files are auto-updated when a new version ships changes; locally modified files are left untouched with a warning.
72
+
73
+ ## Installation
74
+
75
+ **Prerequisites:** Python >= 3.11
76
+
77
+ ```bash
78
+ pip install pip-boy
79
+ ```
80
+
81
+ ### Development (from source)
82
+
83
+ ```bash
84
+ git clone https://github.com/ByeDream/Pip-Boy.git
85
+ cd Pip-Boy
86
+ pip install -e .
87
+ ```
88
+
89
+ ## Usage
90
+
91
+ ```bash
92
+ # Navigate to your target project and run
93
+ cd /path/to/your/project
94
+ pip-boy
95
+
96
+ # Or use python -m
97
+ python -m pip_agent
98
+
99
+ # CLI-only mode (no WeChat/WeCom channels)
100
+ pip-boy --cli
101
+
102
+ # Force WeChat QR login
103
+ pip-boy --scan
104
+
105
+ # Show version
106
+ pip-boy --version
107
+ ```
108
+
109
+ On first launch, the scaffold automatically creates `.pip/` directory structure, `.env` (from template), and `.gitignore` entries in the target project. Edit the generated `.env` to fill in your `ANTHROPIC_API_KEY`, then run again.
110
+
111
+ The agent uses `Path.cwd()` as its working directory — always run it from the project you want to interact with.
112
+
113
+ ### Updating
114
+
115
+ From within a running session:
116
+
117
+ ```
118
+ /update
119
+ ```
120
+
121
+ Or manually:
122
+
123
+ ```bash
124
+ pip install --upgrade pip-boy
125
+ ```
126
+
127
+ ## Configuration
128
+
129
+ All configuration is done via environment variables or `.env` file.
130
+
131
+ | Variable | Required | Default | Description |
132
+ |---|---|---|---|
133
+ | `ANTHROPIC_API_KEY` | **Yes** | — | Anthropic API key |
134
+ | `ANTHROPIC_BASE_URL` | No | *(api.anthropic.com)* | Custom API endpoint (proxy support) |
135
+ | `MODEL` | No | `claude-sonnet-4-6` | Default model for the lead agent |
136
+ | `MAX_TOKENS` | No | `8096` | Max response tokens |
137
+ | `SEARCH_API_KEY` | No | — | Tavily API key; falls back to DuckDuckGo |
138
+ | `COMPACT_THRESHOLD` | No | `50000` | Token estimate to trigger auto-compaction |
139
+ | `COMPACT_MICRO_AGE` | No | `3` | Micro-compaction: rounds of tool results to preserve |
140
+ | `VERBOSE` | No | `true` | Verbose output |
141
+ | `PROFILER_ENABLED` | No | `false` | Enable performance profiling |
142
+
143
+ ### Project-Level Files
144
+
145
+ | File | Location | Purpose |
146
+ |---|---|---|
147
+ | `models.json` | `.pip/` | Model catalog for teammate spawning |
148
+ | `*.md` | `.pip/team/` | Teammate persona definitions (YAML frontmatter + body) |
149
+ | `_meta.json` + `*.json` | `.pip/tasks/{story}/` | Task board state |
150
+ | `*.md` | `.pip/skills/` | User-defined skills |
151
+
152
+ ## Dependencies
153
+
154
+ - [`anthropic`](https://github.com/anthropics/anthropic-sdk-python) — Claude API client
155
+ - [`pydantic-settings`](https://github.com/pydantic/pydantic-settings) — Configuration management
156
+ - [`tavily-python`](https://github.com/tavily-ai/tavily-python) — Web search API
157
+ - [`ddgs`](https://github.com/deedy5/duckduckgo_search) — DuckDuckGo fallback search
158
+ - [`pyyaml`](https://github.com/yaml/pyyaml) — YAML parsing for skills and team files
159
+ - [`httpx`](https://github.com/encode/httpx) — HTTP client for channel communication
160
+ - [`qrcode`](https://github.com/lincolnloop/python-qrcode) — Terminal QR code rendering for WeChat login
161
+ - [`pyreadline3`](https://github.com/pyreadline3/pyreadline3) — Readline for Windows
162
+
163
+ ## License
164
+
165
+ This project is licensed under the MIT License. See [LICENSE](LICENSE) for details.
@@ -0,0 +1,35 @@
1
+ [build-system]
2
+ requires = ["setuptools>=68.0", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "pip-boy"
7
+ version = "0.1.0"
8
+ description = "Personal assistant agent with persistent memory and configurable persona"
9
+ readme = "README.md"
10
+ license = "MIT"
11
+ requires-python = ">=3.11"
12
+ dependencies = [
13
+ "anthropic>=0.49,<1",
14
+ "pydantic-settings>=2.8,<3",
15
+ "pyreadline3>=3.5,<4; sys_platform == 'win32'",
16
+ "tavily-python>=0.5",
17
+ "ddgs>=7",
18
+ "pyyaml>=6,<7",
19
+ "httpx>=0.27",
20
+ "wecom-aibot-python-sdk>=1.0",
21
+ "qrcode>=7",
22
+ ]
23
+
24
+ [project.scripts]
25
+ pip-boy = "pip_agent.__main__:main"
26
+
27
+ [project.urls]
28
+ Repository = "https://github.com/ByeDream/Pip-Boy"
29
+
30
+ [tool.setuptools.packages.find]
31
+ where = ["src"]
32
+
33
+ [tool.setuptools.package-data]
34
+ "pip_agent.skills" = ["**/*.md"]
35
+ "pip_agent.scaffold" = ["*.md", "*.json", "*.txt", "env.example"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,6 @@
1
+ from importlib.metadata import version, PackageNotFoundError
2
+
3
+ try:
4
+ __version__ = version("pip-boy")
5
+ except PackageNotFoundError:
6
+ __version__ = "0.0.0-dev"
@@ -0,0 +1,29 @@
1
+ import argparse
2
+ import sys
3
+
4
+ from pip_agent.agent import run
5
+
6
+
7
+ def main(argv: list[str] | None = None) -> None:
8
+ parser = argparse.ArgumentParser(prog="pip-boy")
9
+ group = parser.add_mutually_exclusive_group()
10
+ group.add_argument("--scan", action="store_true", help="Force WeChat QR login")
11
+ group.add_argument("--cli", action="store_true", help="CLI-only mode")
12
+ group.add_argument("--version", action="store_true", help="Show version and exit")
13
+ args = parser.parse_args(argv)
14
+
15
+ if args.version:
16
+ from pip_agent import __version__
17
+ print(f"pip-boy {__version__}")
18
+ return
19
+
20
+ if args.cli:
21
+ run(mode="cli")
22
+ elif args.scan:
23
+ run(mode="scan")
24
+ else:
25
+ run(mode="auto")
26
+
27
+
28
+ if __name__ == "__main__":
29
+ main()