pybao-cli 1.3.3 → 1.3.5
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.
- package/README.md +1 -440
- package/README.zh-CN.md +35 -35
- package/cli-acp.js +3 -3
- package/cli.js +4 -4
- package/dist/REPL-4YZC3LJO.js +42 -0
- package/dist/{acp-75HO2LBV.js → acp-SE4B3WSL.js} +43 -43
- package/dist/acp-SE4B3WSL.js.map +7 -0
- package/dist/{agentsValidate-6Z57ARKC.js → agentsValidate-LZISHE5F.js} +15 -15
- package/dist/agentsValidate-LZISHE5F.js.map +7 -0
- package/dist/{ask-NXXXCGY4.js → ask-5IDOHI4E.js} +26 -26
- package/dist/ask-5IDOHI4E.js.map +7 -0
- package/dist/{autoUpdater-PJMGNPUG.js → autoUpdater-ECGS62JN.js} +3 -3
- package/dist/{chunk-6RZIUY5K.js → chunk-3X2KNIS3.js} +5 -5
- package/dist/chunk-3X2KNIS3.js.map +7 -0
- package/dist/{chunk-VTVTEE5N.js → chunk-4U4MLA4R.js} +18 -18
- package/dist/chunk-4U4MLA4R.js.map +7 -0
- package/dist/{chunk-PCXUZ6AT.js → chunk-5AGDLQAW.js} +3 -3
- package/dist/chunk-5AGDLQAW.js.map +7 -0
- package/dist/{chunk-27GYWUY2.js → chunk-5JHD6MUL.js} +3 -3
- package/dist/chunk-5JHD6MUL.js.map +7 -0
- package/dist/{chunk-Z3HMXDXP.js → chunk-5JTKXNG4.js} +6 -6
- package/dist/chunk-5JTKXNG4.js.map +7 -0
- package/dist/{chunk-HIRIJ2LQ.js → chunk-5UJ7KHM7.js} +34 -33
- package/dist/chunk-5UJ7KHM7.js.map +7 -0
- package/dist/{chunk-JKGOGSFT.js → chunk-6BSVSUGW.js} +3 -3
- package/dist/{chunk-4XPNRLJG.js → chunk-AT7FEIUK.js} +7 -7
- package/dist/chunk-AT7FEIUK.js.map +7 -0
- package/dist/{chunk-T6GVXTNQ.js → chunk-B6IMQJZM.js} +7 -7
- package/dist/chunk-B6IMQJZM.js.map +7 -0
- package/dist/{chunk-ZJGXEWKF.js → chunk-BO63S4OP.js} +9 -9
- package/dist/chunk-BO63S4OP.js.map +7 -0
- package/dist/{chunk-6WELHKDA.js → chunk-C66U55GA.js} +11 -11
- package/dist/chunk-C66U55GA.js.map +7 -0
- package/dist/{chunk-3KNGJX7Q.js → chunk-CTKC574I.js} +11 -11
- package/dist/chunk-CTKC574I.js.map +7 -0
- package/dist/{chunk-QBHEERCF.js → chunk-E2R24MD6.js} +139 -129
- package/dist/chunk-E2R24MD6.js.map +7 -0
- package/dist/{chunk-3PDD7M4T.js → chunk-EGHIB45T.js} +5 -5
- package/dist/chunk-EGHIB45T.js.map +7 -0
- package/dist/{chunk-TXFCNQDE.js → chunk-G2W2B3A3.js} +25 -25
- package/dist/chunk-G2W2B3A3.js.map +7 -0
- package/dist/{chunk-XXFY63TM.js → chunk-HBWCMS4E.js} +7 -7
- package/dist/chunk-HBWCMS4E.js.map +7 -0
- package/dist/{chunk-3ZNSAB7B.js → chunk-KVP2VINI.js} +4 -4
- package/dist/chunk-KVP2VINI.js.map +7 -0
- package/dist/{chunk-JZDE77EH.js → chunk-MLU76W2R.js} +3 -3
- package/dist/{chunk-SWYJOV5E.js → chunk-MRHGVQ5T.js} +1 -1
- package/dist/{chunk-SWYJOV5E.js.map → chunk-MRHGVQ5T.js.map} +1 -1
- package/dist/{chunk-VRGR4ZTQ.js → chunk-MWPFU2KU.js} +2 -2
- package/dist/chunk-MWPFU2KU.js.map +7 -0
- package/dist/{chunk-7AAE6EO2.js → chunk-NAXCFXKW.js} +7 -7
- package/dist/chunk-NAXCFXKW.js.map +7 -0
- package/dist/{chunk-ICTEVBLN.js → chunk-NRKOXQT5.js} +11 -11
- package/dist/chunk-NRKOXQT5.js.map +7 -0
- package/dist/{chunk-BQA2EOUU.js → chunk-OTNHBUGC.js} +5 -5
- package/dist/chunk-OTNHBUGC.js.map +7 -0
- package/dist/{chunk-WPTPPOYN.js → chunk-PGLKCZAE.js} +2 -2
- package/dist/{chunk-UUNVJZWA.js → chunk-PMKSJ3AZ.js} +3 -3
- package/dist/chunk-PMKSJ3AZ.js.map +7 -0
- package/dist/{chunk-QIHB5PYM.js → chunk-R6WNNB47.js} +6 -6
- package/dist/{chunk-QIHB5PYM.js.map → chunk-R6WNNB47.js.map} +2 -2
- package/dist/{chunk-Q24ZGKIE.js → chunk-V3AKMLFM.js} +14 -14
- package/dist/chunk-V3AKMLFM.js.map +7 -0
- package/dist/{chunk-T7GPUZVK.js → chunk-VF3J4G4Z.js} +27 -27
- package/dist/chunk-VF3J4G4Z.js.map +7 -0
- package/dist/{chunk-4SNFQYCY.js → chunk-VKMVP2QQ.js} +12 -12
- package/dist/chunk-VKMVP2QQ.js.map +7 -0
- package/dist/chunk-XI4LTVYT.js.map +7 -0
- package/dist/{chunk-A6PUMROK.js → chunk-YDXW3IJK.js} +4 -4
- package/dist/{chunk-A6PUMROK.js.map → chunk-YDXW3IJK.js.map} +1 -1
- package/dist/{chunk-HB2P6645.js → chunk-ZZQ6WGYG.js} +4 -4
- package/dist/{cli-RFYBXM7F.js → cli-MBYLENJH.js} +119 -119
- package/dist/cli-MBYLENJH.js.map +7 -0
- package/dist/commands-ECIN5O3E.js +46 -0
- package/dist/{config-5OPX3H2K.js → config-45ETSXTS.js} +4 -4
- package/dist/{context-THRRBPFP.js → context-34YXWOMP.js} +5 -5
- package/dist/{customCommands-4XOZH44N.js → customCommands-J52KDUBX.js} +4 -4
- package/dist/{env-EL4KBHMB.js → env-ODQXSPMW.js} +8 -8
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/{llm-A3BCM4Q2.js → llm-BBYIGM3X.js} +34 -34
- package/dist/llm-BBYIGM3X.js.map +7 -0
- package/dist/{llmLazy-ZJSRLZVD.js → llmLazy-VHWTJ7FY.js} +1 -1
- package/dist/{loader-HZQBWO74.js → loader-TXZ3EJZO.js} +4 -4
- package/dist/{mcp-XKOJ55B2.js → mcp-SHR6KH2Y.js} +7 -7
- package/dist/{mentionProcessor-ANYU5MLF.js → mentionProcessor-CDELTWDV.js} +5 -5
- package/dist/{messages-75DL5XBP.js → messages-R4ICGYOI.js} +1 -1
- package/dist/{model-OPJGJZRC.js → model-AO4OE46E.js} +5 -5
- package/dist/{openai-DT54BAFP.js → openai-F7WL45GM.js} +5 -5
- package/dist/{outputStyles-TPFVI52O.js → outputStyles-BWAE3CTZ.js} +4 -4
- package/dist/{pluginRuntime-W74PYSZ4.js → pluginRuntime-AHKVCUSE.js} +8 -8
- package/dist/pluginRuntime-AHKVCUSE.js.map +7 -0
- package/dist/{pluginValidation-FALYRVI2.js → pluginValidation-YSUVH4GM.js} +6 -6
- package/dist/prompts-4AUAETB4.js +48 -0
- package/dist/pybAgentSessionId-3HDHCCI5.js +13 -0
- package/dist/pybAgentSessionLoad-5FMAFO4P.js +18 -0
- package/dist/pybAgentSessionResume-GCVJHXVV.js +16 -0
- package/dist/{kodeAgentStreamJson-3T26CHCP.js → pybAgentStreamJson-UG22YE4Z.js} +5 -5
- package/dist/{kodeAgentStreamJsonSession-BZS2VDCY.js → pybAgentStreamJsonSession-BRWXPZ5Z.js} +9 -9
- package/dist/pybAgentStreamJsonSession-BRWXPZ5Z.js.map +7 -0
- package/dist/{kodeAgentStructuredStdio-TNB6U6SP.js → pybAgentStructuredStdio-QDF6UGAJ.js} +3 -3
- package/dist/{kodeHooks-VUAWIY2D.js → pybHooks-WXEUSK2Y.js} +7 -7
- package/dist/query-JNWSOFYQ.js +50 -0
- package/dist/{ripgrep-XJGSUBG7.js → ripgrep-ON745BFW.js} +3 -3
- package/dist/{skillMarketplace-AUGKNCPW.js → skillMarketplace-ZLW4PQFC.js} +3 -3
- package/dist/{state-DQYRXKTG.js → state-E57SH5ZM.js} +2 -2
- package/dist/{theme-MS5HDUBJ.js → theme-XJG6O2YU.js} +5 -5
- package/dist/{toolPermissionSettings-4MPZVYDR.js → toolPermissionSettings-BXLCU7BK.js} +6 -6
- package/dist/tools-UJZBVLIU.js +47 -0
- package/dist/{userInput-F2PGBRFU.js → userInput-IVM4BDPE.js} +34 -34
- package/dist/userInput-IVM4BDPE.js.map +7 -0
- package/package.json +1 -1
- package/scripts/binary-utils.cjs +8 -8
- package/scripts/cli-acp-wrapper.cjs +3 -3
- package/scripts/cli-wrapper.cjs +4 -4
- package/scripts/postinstall.js +7 -7
- package/dist/REPL-WPV32MTF.js +0 -42
- package/dist/acp-75HO2LBV.js.map +0 -7
- package/dist/agentsValidate-6Z57ARKC.js.map +0 -7
- package/dist/ask-NXXXCGY4.js.map +0 -7
- package/dist/chunk-27GYWUY2.js.map +0 -7
- package/dist/chunk-3KNGJX7Q.js.map +0 -7
- package/dist/chunk-3PDD7M4T.js.map +0 -7
- package/dist/chunk-3ZNSAB7B.js.map +0 -7
- package/dist/chunk-4SNFQYCY.js.map +0 -7
- package/dist/chunk-4XPNRLJG.js.map +0 -7
- package/dist/chunk-6RZIUY5K.js.map +0 -7
- package/dist/chunk-6WELHKDA.js.map +0 -7
- package/dist/chunk-7AAE6EO2.js.map +0 -7
- package/dist/chunk-BQA2EOUU.js.map +0 -7
- package/dist/chunk-HIRIJ2LQ.js.map +0 -7
- package/dist/chunk-ICTEVBLN.js.map +0 -7
- package/dist/chunk-M624LT6O.js.map +0 -7
- package/dist/chunk-PCXUZ6AT.js.map +0 -7
- package/dist/chunk-Q24ZGKIE.js.map +0 -7
- package/dist/chunk-QBHEERCF.js.map +0 -7
- package/dist/chunk-T6GVXTNQ.js.map +0 -7
- package/dist/chunk-T7GPUZVK.js.map +0 -7
- package/dist/chunk-TXFCNQDE.js.map +0 -7
- package/dist/chunk-UUNVJZWA.js.map +0 -7
- package/dist/chunk-VRGR4ZTQ.js.map +0 -7
- package/dist/chunk-VTVTEE5N.js.map +0 -7
- package/dist/chunk-XXFY63TM.js.map +0 -7
- package/dist/chunk-Z3HMXDXP.js.map +0 -7
- package/dist/chunk-ZJGXEWKF.js.map +0 -7
- package/dist/cli-RFYBXM7F.js.map +0 -7
- package/dist/commands-YOXMODDO.js +0 -46
- package/dist/kodeAgentSessionId-PROTVRBR.js +0 -13
- package/dist/kodeAgentSessionLoad-UMPV7MC3.js +0 -18
- package/dist/kodeAgentSessionResume-YJS4FVQM.js +0 -16
- package/dist/kodeAgentStreamJsonSession-BZS2VDCY.js.map +0 -7
- package/dist/llm-A3BCM4Q2.js.map +0 -7
- package/dist/pluginRuntime-W74PYSZ4.js.map +0 -7
- package/dist/prompts-J4TPRMJ3.js +0 -48
- package/dist/query-K3QKBVDN.js +0 -50
- package/dist/tools-QW6SIJLJ.js +0 -47
- package/dist/userInput-F2PGBRFU.js.map +0 -7
- /package/dist/{REPL-WPV32MTF.js.map → REPL-4YZC3LJO.js.map} +0 -0
- /package/dist/{autoUpdater-PJMGNPUG.js.map → autoUpdater-ECGS62JN.js.map} +0 -0
- /package/dist/{chunk-JKGOGSFT.js.map → chunk-6BSVSUGW.js.map} +0 -0
- /package/dist/{chunk-JZDE77EH.js.map → chunk-MLU76W2R.js.map} +0 -0
- /package/dist/{chunk-WPTPPOYN.js.map → chunk-PGLKCZAE.js.map} +0 -0
- /package/dist/{chunk-M624LT6O.js → chunk-XI4LTVYT.js} +0 -0
- /package/dist/{chunk-HB2P6645.js.map → chunk-ZZQ6WGYG.js.map} +0 -0
- /package/dist/{commands-YOXMODDO.js.map → commands-ECIN5O3E.js.map} +0 -0
- /package/dist/{config-5OPX3H2K.js.map → config-45ETSXTS.js.map} +0 -0
- /package/dist/{context-THRRBPFP.js.map → context-34YXWOMP.js.map} +0 -0
- /package/dist/{customCommands-4XOZH44N.js.map → customCommands-J52KDUBX.js.map} +0 -0
- /package/dist/{env-EL4KBHMB.js.map → env-ODQXSPMW.js.map} +0 -0
- /package/dist/{kodeAgentSessionId-PROTVRBR.js.map → llmLazy-VHWTJ7FY.js.map} +0 -0
- /package/dist/{kodeAgentSessionLoad-UMPV7MC3.js.map → loader-TXZ3EJZO.js.map} +0 -0
- /package/dist/{kodeAgentSessionResume-YJS4FVQM.js.map → mcp-SHR6KH2Y.js.map} +0 -0
- /package/dist/{mentionProcessor-ANYU5MLF.js.map → mentionProcessor-CDELTWDV.js.map} +0 -0
- /package/dist/{kodeAgentStreamJson-3T26CHCP.js.map → messages-R4ICGYOI.js.map} +0 -0
- /package/dist/{kodeAgentStructuredStdio-TNB6U6SP.js.map → model-AO4OE46E.js.map} +0 -0
- /package/dist/{kodeHooks-VUAWIY2D.js.map → openai-F7WL45GM.js.map} +0 -0
- /package/dist/{llmLazy-ZJSRLZVD.js.map → outputStyles-BWAE3CTZ.js.map} +0 -0
- /package/dist/{loader-HZQBWO74.js.map → pluginValidation-YSUVH4GM.js.map} +0 -0
- /package/dist/{mcp-XKOJ55B2.js.map → prompts-4AUAETB4.js.map} +0 -0
- /package/dist/{messages-75DL5XBP.js.map → pybAgentSessionId-3HDHCCI5.js.map} +0 -0
- /package/dist/{model-OPJGJZRC.js.map → pybAgentSessionLoad-5FMAFO4P.js.map} +0 -0
- /package/dist/{openai-DT54BAFP.js.map → pybAgentSessionResume-GCVJHXVV.js.map} +0 -0
- /package/dist/{outputStyles-TPFVI52O.js.map → pybAgentStreamJson-UG22YE4Z.js.map} +0 -0
- /package/dist/{pluginValidation-FALYRVI2.js.map → pybAgentStructuredStdio-QDF6UGAJ.js.map} +0 -0
- /package/dist/{prompts-J4TPRMJ3.js.map → pybHooks-WXEUSK2Y.js.map} +0 -0
- /package/dist/{query-K3QKBVDN.js.map → query-JNWSOFYQ.js.map} +0 -0
- /package/dist/{ripgrep-XJGSUBG7.js.map → ripgrep-ON745BFW.js.map} +0 -0
- /package/dist/{skillMarketplace-AUGKNCPW.js.map → skillMarketplace-ZLW4PQFC.js.map} +0 -0
- /package/dist/{state-DQYRXKTG.js.map → state-E57SH5ZM.js.map} +0 -0
- /package/dist/{theme-MS5HDUBJ.js.map → theme-XJG6O2YU.js.map} +0 -0
- /package/dist/{toolPermissionSettings-4MPZVYDR.js.map → toolPermissionSettings-BXLCU7BK.js.map} +0 -0
- /package/dist/{tools-QW6SIJLJ.js.map → tools-UJZBVLIU.js.map} +0 -0
package/README.md
CHANGED
|
@@ -1,440 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
A small AI agent implementation that delivers complex problem-solving capabilities with the least amount of code.
|
|
4
|
-
|
|
5
|
-
## Project Overview
|
|
6
|
-
|
|
7
|
-
PYB-CLI is an AI agent implementation that follows the minimalist agent philosophy, embodying the core concept of "letting LLMs do what they do best." This implementation achieves core functionality with minimal code, fully leveraging LLMs as general problem-solving engines.
|
|
8
|
-
|
|
9
|
-
<img width="991" height="479" alt="image" src="https://github.com/user-attachments/assets/c1751e92-94dc-4e4a-9558-8cd2d058c1a1" /> <br>
|
|
10
|
-
[](https://www.npmjs.com/package/pyb-ts)
|
|
11
|
-
[](https://opensource.org/licenses/MIT)
|
|
12
|
-
|
|
13
|
-
[中文文档](README.zh-CN.md) | [Contributing](CONTRIBUTING.md) | [Documentation](docs/)
|
|
14
|
-
|
|
15
|
-
<img width="90%" alt="image" src="https://github.com/user-attachments/assets/fdce7017-8095-429d-b74e-07f43a6919e1" />
|
|
16
|
-
|
|
17
|
-
<img width="90%" alt="2c0ad8540f2872d197c7b17ae23d74f5" src="https://github.com/user-attachments/assets/f220cc27-084d-468e-a3f4-d5bc44d84fac" />
|
|
18
|
-
|
|
19
|
-
<img width="90%" alt="f266d316d90ddd0db5a3d640c1126930" src="https://github.com/user-attachments/assets/90ec7399-1349-4607-b689-96613b3dc3e2" />
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
<img width="90%" alt="image" src="https://github.com/user-attachments/assets/b30696ce-5ab1-40a0-b741-c7ef3945dba0" />
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
## 📢 Update Log
|
|
26
|
-
|
|
27
|
-
**2025-08-29**: We've added Windows support! All Windows users can now run PYB-ts using Git Bash, Unix subsystems, or WSL (Windows Subsystem for Linux) on their computers.
|
|
28
|
-
|
|
29
|
-
**2025-12-30**: Windows now works out of the box with native cmd.exe support. Git Bash and WSL are optional but recommended for the best experience.
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
## 🤝 AGENTS.md Standard Support
|
|
33
|
-
|
|
34
|
-
**PYB-ts proudly supports the [AGENTS.md standard protocol](https://agents.md) initiated by OpenAI** - a simple, open format for guiding programming agents that's used by 20k+ open source projects.
|
|
35
|
-
|
|
36
|
-
### Full Compatibility with Multiple Standards
|
|
37
|
-
|
|
38
|
-
- ✅ **AGENTS.md** - Native support for the OpenAI-initiated standard format
|
|
39
|
-
- ✅ **CLAUDE.md** - Full backward compatibility with Claude Code `.claude` configurations
|
|
40
|
-
- ✅ **Subagent System** - Advanced agent delegation and task orchestration
|
|
41
|
-
- ✅ **Cross-platform** - Works with 20+ AI models and providers
|
|
42
|
-
|
|
43
|
-
Use `# Your documentation request` to generate and maintain your AGENTS.md file automatically, while preserving compatibility with existing `.claude` workflows.
|
|
44
|
-
|
|
45
|
-
## Overview
|
|
46
|
-
|
|
47
|
-
Kode is a powerful AI assistant that lives in your terminal. It can understand your codebase, edit files, run commands, and handle entire workflows for you.
|
|
48
|
-
|
|
49
|
-
> **⚠️ Security Notice**: Kode runs in YOLO mode by default (equivalent to Claude Code's `--dangerously-skip-permissions` flag), bypassing all permission checks for maximum productivity. YOLO mode is recommended only for trusted, secure environments when working on non-critical projects. If you're working with important files or using models of questionable capability, we strongly recommend using `kode --safe` to enable permission checks and manual approval for all operations.
|
|
50
|
-
>
|
|
51
|
-
> **📊 Model Performance**: For optimal performance, we recommend using newer, more capable models designed for autonomous task completion. Avoid older Q&A-focused models like GPT-4o or Gemini 2.5 Pro, which are optimized for answering questions rather than sustained independent task execution. Choose models specifically trained for agentic workflows and extended reasoning capabilities.
|
|
52
|
-
|
|
53
|
-
<img width="600" height="577" alt="image" src="https://github.com/user-attachments/assets/8b46a39d-1ab6-4669-9391-14ccc6c5234c" />
|
|
54
|
-
|
|
55
|
-
## Features
|
|
56
|
-
|
|
57
|
-
### Core Capabilities
|
|
58
|
-
- 🤖 **AI-Powered Assistance** - Uses advanced AI models to understand and respond to your requests
|
|
59
|
-
- 🔄 **Multi-Model Collaboration** - Flexibly switch and combine multiple AI models to leverage their unique strengths
|
|
60
|
-
- 🦜 **Expert Model Consultation** - Use `@ask-model-name` to consult specific AI models for specialized analysis
|
|
61
|
-
- 👤 **Intelligent Agent System** - Use `@run-agent-name` to delegate tasks to specialized subagents
|
|
62
|
-
- 📝 **Code Editing** - Directly edit files with intelligent suggestions and improvements
|
|
63
|
-
- 🔍 **Codebase Understanding** - Analyzes your project structure and code relationships
|
|
64
|
-
- 🚀 **Command Execution** - Run shell commands and see results in real-time
|
|
65
|
-
- 🛠️ **Workflow Automation** - Handle complex development tasks with simple prompts
|
|
66
|
-
|
|
67
|
-
### Authoring Comfort
|
|
68
|
-
- `Ctrl+G` opens your message in your preferred editor (respects `$EDITOR`/`$VISUAL`; falls back to code/nano/vim/notepad) and returns the text to the prompt when you close it.
|
|
69
|
-
- `Shift+Enter` inserts a newline inside the prompt without sending; plain Enter submits. `Ctrl+M` switches the active model.
|
|
70
|
-
|
|
71
|
-
### 🎯 Advanced Intelligent Completion System
|
|
72
|
-
Our state-of-the-art completion system provides unparalleled coding assistance:
|
|
73
|
-
|
|
74
|
-
#### Smart Fuzzy Matching
|
|
75
|
-
- **Hyphen-Aware Matching** - Type `dao` to match `run-agent-dao-qi-harmony-designer`
|
|
76
|
-
- **Abbreviation Support** - `dq` matches `dao-qi`, `nde` matches `node`
|
|
77
|
-
- **Numeric Suffix Handling** - `py3` intelligently matches `python3`
|
|
78
|
-
- **Multi-Algorithm Fusion** - Combines 7+ matching algorithms for best results
|
|
79
|
-
|
|
80
|
-
#### Intelligent Context Detection
|
|
81
|
-
- **No @ Required** - Type `gp5` directly to match `@ask-gpt-5`
|
|
82
|
-
- **Auto-Prefix Addition** - Tab/Enter automatically adds `@` for agents and models
|
|
83
|
-
- **Mixed Completion** - Seamlessly switch between commands, files, agents, and models
|
|
84
|
-
- **Smart Prioritization** - Results ranked by relevance and usage frequency
|
|
85
|
-
|
|
86
|
-
#### Unix Command Optimization
|
|
87
|
-
- **500+ Common Commands** - Curated database of frequently used Unix/Linux commands
|
|
88
|
-
- **System Intersection** - Only shows commands that actually exist on your system
|
|
89
|
-
- **Priority Scoring** - Common commands appear first (git, npm, docker, etc.)
|
|
90
|
-
- **Real-time Loading** - Dynamic command discovery from system PATH
|
|
91
|
-
|
|
92
|
-
### User Experience
|
|
93
|
-
- 🎨 **Interactive UI** - Beautiful terminal interface with syntax highlighting
|
|
94
|
-
- 🔌 **Tool System** - Extensible architecture with specialized tools for different tasks
|
|
95
|
-
- 💾 **Context Management** - Smart context handling to maintain conversation continuity
|
|
96
|
-
- 📋 **AGENTS.md Integration** - Use `# documentation requests` to auto-generate and maintain project documentation
|
|
97
|
-
|
|
98
|
-
## Installation
|
|
99
|
-
|
|
100
|
-
```bash
|
|
101
|
-
npm install -g @shareai-lab/kode
|
|
102
|
-
```
|
|
103
|
-
|
|
104
|
-
After installation, you can use any of these commands:
|
|
105
|
-
- `kode` - Primary command
|
|
106
|
-
- `kwa` - Kode With Agent (alternative)
|
|
107
|
-
- `kd` - Ultra-short alias
|
|
108
|
-
|
|
109
|
-
### Windows Notes
|
|
110
|
-
|
|
111
|
-
- **Git Bash is optional**: Kode now works natively with Windows cmd.exe and PowerShell.
|
|
112
|
-
- Kode automatically prefers Git Bash/MSYS or WSL Bash when available for better Unix compatibility.
|
|
113
|
-
- If neither is available, it uses cmd.exe which works out of the box.
|
|
114
|
-
- For best experience, consider using VS Code's integrated terminal:
|
|
115
|
-
- Better font rendering and icon support.
|
|
116
|
-
- Fewer path and encoding quirks compared to legacy Command Prompt.
|
|
117
|
-
- Optional: Install Git for Windows for enhanced Unix-like functionality: https://git-scm.com/download/win
|
|
118
|
-
- If you install globally via npm, avoid spaces in the global prefix path to prevent shim issues.
|
|
119
|
-
- Example: `npm config set prefix "C:\\npm"` and reinstall global packages.
|
|
120
|
-
|
|
121
|
-
## Usage
|
|
122
|
-
|
|
123
|
-
### Interactive Mode
|
|
124
|
-
Start an interactive session:
|
|
125
|
-
```bash
|
|
126
|
-
kode
|
|
127
|
-
# or
|
|
128
|
-
kwa
|
|
129
|
-
# or
|
|
130
|
-
kd
|
|
131
|
-
```
|
|
132
|
-
|
|
133
|
-
### Non-Interactive Mode
|
|
134
|
-
Get a quick response:
|
|
135
|
-
```bash
|
|
136
|
-
kode -p "explain this function" path/to/file.js
|
|
137
|
-
# or
|
|
138
|
-
kwa -p "explain this function" path/to/file.js
|
|
139
|
-
```
|
|
140
|
-
|
|
141
|
-
### Using the @ Mention System
|
|
142
|
-
|
|
143
|
-
Kode supports a powerful @ mention system for intelligent completions:
|
|
144
|
-
|
|
145
|
-
#### 🦜 Expert Model Consultation
|
|
146
|
-
```bash
|
|
147
|
-
# Consult specific AI models for expert opinions
|
|
148
|
-
@ask-claude-sonnet-4 How should I optimize this React component for performance?
|
|
149
|
-
@ask-gpt-5 What are the security implications of this authentication method?
|
|
150
|
-
@ask-o1-preview Analyze the complexity of this algorithm
|
|
151
|
-
```
|
|
152
|
-
|
|
153
|
-
#### 👤 Specialized Agent Delegation
|
|
154
|
-
```bash
|
|
155
|
-
# Delegate tasks to specialized subagents
|
|
156
|
-
@run-agent-simplicity-auditor Review this code for over-engineering
|
|
157
|
-
@run-agent-architect Design a microservices architecture for this system
|
|
158
|
-
@run-agent-test-writer Create comprehensive tests for these modules
|
|
159
|
-
```
|
|
160
|
-
|
|
161
|
-
#### 📁 Smart File References
|
|
162
|
-
```bash
|
|
163
|
-
# Reference files and directories with auto-completion
|
|
164
|
-
@src/components/Button.tsx
|
|
165
|
-
@docs/api-reference.md
|
|
166
|
-
@.env.example
|
|
167
|
-
```
|
|
168
|
-
|
|
169
|
-
The @ mention system provides intelligent completions as you type, showing available models, agents, and files.
|
|
170
|
-
|
|
171
|
-
### AGENTS.md Documentation Mode
|
|
172
|
-
|
|
173
|
-
Use the `#` prefix to generate and maintain your AGENTS.md documentation:
|
|
174
|
-
|
|
175
|
-
```bash
|
|
176
|
-
# Generate setup instructions
|
|
177
|
-
# How do I set up the development environment?
|
|
178
|
-
|
|
179
|
-
# Create testing documentation
|
|
180
|
-
# What are the testing procedures for this project?
|
|
181
|
-
|
|
182
|
-
# Document deployment process
|
|
183
|
-
# Explain the deployment pipeline and requirements
|
|
184
|
-
```
|
|
185
|
-
|
|
186
|
-
This mode automatically formats responses as structured documentation and appends them to your AGENTS.md file.
|
|
187
|
-
|
|
188
|
-
### Docker Usage
|
|
189
|
-
|
|
190
|
-
#### Alternative: Build from local source
|
|
191
|
-
|
|
192
|
-
```bash
|
|
193
|
-
# Clone the repository
|
|
194
|
-
git clone https://github.com/shareAI-lab/Kode.git
|
|
195
|
-
cd Kode
|
|
196
|
-
|
|
197
|
-
# Build the image locally
|
|
198
|
-
docker build --no-cache -t kode .
|
|
199
|
-
|
|
200
|
-
# Run in your project directory
|
|
201
|
-
cd your-project
|
|
202
|
-
docker run -it --rm \
|
|
203
|
-
-v $(pwd):/workspace \
|
|
204
|
-
-v ~/.kode:/root/.kode \
|
|
205
|
-
-v ~/.kode.json:/root/.kode.json \
|
|
206
|
-
-w /workspace \
|
|
207
|
-
kode
|
|
208
|
-
```
|
|
209
|
-
|
|
210
|
-
#### Docker Configuration Details
|
|
211
|
-
|
|
212
|
-
The Docker setup includes:
|
|
213
|
-
|
|
214
|
-
- **Volume Mounts**:
|
|
215
|
-
- `$(pwd):/workspace` - Mounts your current project directory
|
|
216
|
-
- `~/.kode:/root/.kode` - Preserves your kode configuration directory between runs
|
|
217
|
-
- `~/.kode.json:/root/.kode.json` - Preserves your kode global configuration file between runs
|
|
218
|
-
|
|
219
|
-
- **Working Directory**: Set to `/workspace` inside the container
|
|
220
|
-
|
|
221
|
-
- **Interactive Mode**: Uses `-it` flags for interactive terminal access
|
|
222
|
-
|
|
223
|
-
- **Cleanup**: `--rm` flag removes the container after exit
|
|
224
|
-
|
|
225
|
-
**Note**: Kode uses both `~/.kode` directory for additional data (like memory files) and `~/.kode.json` file for global configuration.
|
|
226
|
-
|
|
227
|
-
The first time you run the Docker command, it will build the image. Subsequent runs will use the cached image for faster startup.
|
|
228
|
-
|
|
229
|
-
You can use the onboarding to set up the model, or `/model`.
|
|
230
|
-
If you don't see the models you want on the list, you can manually set them in `/config`
|
|
231
|
-
As long as you have an openai-like endpoint, it should work.
|
|
232
|
-
|
|
233
|
-
### Commands
|
|
234
|
-
|
|
235
|
-
- `/help` - Show available commands
|
|
236
|
-
- `/model` - Change AI model settings
|
|
237
|
-
- `/config` - Open configuration panel
|
|
238
|
-
- `/cost` - Show token usage and costs
|
|
239
|
-
- `/clear` - Clear conversation history
|
|
240
|
-
- `/compact-threshold` - View or set auto-compact threshold ratio (e.g. `/compact-threshold 0.85` or `/compact-threshold 85%`)
|
|
241
|
-
|
|
242
|
-
| Value | Effect | Use Case |
|
|
243
|
-
|-------|--------|----------|
|
|
244
|
-
| 0.80 | Compress earlier, more conservative | Small context models (e.g. deepseek 131k) |
|
|
245
|
-
| 0.85 | Balanced | Medium context models |
|
|
246
|
-
| 0.90 | Default | Large context models (e.g. Claude 200k) |
|
|
247
|
-
|
|
248
|
-
- `/init` - Initialize project context
|
|
249
|
-
|
|
250
|
-
## Multi-Model Intelligent Collaboration
|
|
251
|
-
|
|
252
|
-
Unlike official Claude which supports only a single model, Kode implements **true multi-model collaboration**, allowing you to fully leverage the unique strengths of different AI models.
|
|
253
|
-
|
|
254
|
-
### 🏗️ Core Technical Architecture
|
|
255
|
-
|
|
256
|
-
#### 1. **ModelManager Multi-Model Manager**
|
|
257
|
-
We designed a unified `ModelManager` system that supports:
|
|
258
|
-
- **Model Profiles**: Each model has an independent configuration file containing API endpoints, authentication, context window size, cost parameters, etc.
|
|
259
|
-
- **Model Pointers**: Users can configure default models for different purposes in the `/model` command:
|
|
260
|
-
- `main`: Default model for main Agent
|
|
261
|
-
- `task`: Default model for SubAgent
|
|
262
|
-
- `reasoning`: Reserved for future ThinkTool usage
|
|
263
|
-
- `quick`: Fast model for simple NLP tasks (security identification, title generation, etc.)
|
|
264
|
-
- **Dynamic Model Switching**: Support runtime model switching without restarting sessions, maintaining context continuity
|
|
265
|
-
|
|
266
|
-
#### 2. **TaskTool Intelligent Task Distribution**
|
|
267
|
-
Our specially designed `TaskTool` (Architect tool) implements:
|
|
268
|
-
- **Subagent Mechanism**: Can launch multiple sub-agents to process tasks in parallel
|
|
269
|
-
- **Model Parameter Passing**: Users can specify which model SubAgents should use in their requests
|
|
270
|
-
- **Default Model Configuration**: SubAgents use the model configured by the `task` pointer by default
|
|
271
|
-
|
|
272
|
-
#### 3. **AskExpertModel Expert Consultation Tool**
|
|
273
|
-
We specially designed the `AskExpertModel` tool:
|
|
274
|
-
- **Expert Model Invocation**: Allows temporarily calling specific expert models to solve difficult problems during conversations
|
|
275
|
-
- **Model Isolation Execution**: Expert model responses are processed independently without affecting the main conversation flow
|
|
276
|
-
- **Knowledge Integration**: Integrates expert model insights into the current task
|
|
277
|
-
|
|
278
|
-
#### 🎯 Flexible Model Switching
|
|
279
|
-
- **Tab Key Quick Switch**: Press Tab in the input box to quickly switch the model for the current conversation
|
|
280
|
-
- **`/model` Command**: Use `/model` command to configure and manage multiple model profiles, set default models for different purposes
|
|
281
|
-
- **User Control**: Users can specify specific models for task processing at any time
|
|
282
|
-
|
|
283
|
-
#### 🔄 Intelligent Work Allocation Strategy
|
|
284
|
-
|
|
285
|
-
**Architecture Design Phase**
|
|
286
|
-
- Use **o3 model** or **GPT-5 model** to explore system architecture and formulate sharp and clear technical solutions
|
|
287
|
-
- These models excel in abstract thinking and system design
|
|
288
|
-
|
|
289
|
-
**Solution Refinement Phase**
|
|
290
|
-
- Use **gemini model** to deeply explore production environment design details
|
|
291
|
-
- Leverage its deep accumulation in practical engineering and balanced reasoning capabilities
|
|
292
|
-
|
|
293
|
-
**Code Implementation Phase**
|
|
294
|
-
- Use **Qwen Coder model**, **Kimi k2 model**, **GLM-4.5 model**, or **Claude Sonnet 4 model** for specific code writing
|
|
295
|
-
- These models have strong performance in code generation, file editing, and engineering implementation
|
|
296
|
-
- Support parallel processing of multiple coding tasks through subagents
|
|
297
|
-
|
|
298
|
-
**Problem Solving**
|
|
299
|
-
- When encountering complex problems, consult expert models like **o3 model**, **Claude Opus 4.1 model**, or **Grok 4 model**
|
|
300
|
-
- Obtain deep technical insights and innovative solutions
|
|
301
|
-
|
|
302
|
-
#### 💡 Practical Application Scenarios
|
|
303
|
-
|
|
304
|
-
```bash
|
|
305
|
-
# Example 1: Architecture Design
|
|
306
|
-
"Use o3 model to help me design a high-concurrency message queue system architecture"
|
|
307
|
-
|
|
308
|
-
# Example 2: Multi-Model Collaboration
|
|
309
|
-
"First use GPT-5 model to analyze the root cause of this performance issue, then use Claude Sonnet 4 model to write optimization code"
|
|
310
|
-
|
|
311
|
-
# Example 3: Parallel Task Processing
|
|
312
|
-
"Use Qwen Coder model as subagent to refactor these three modules simultaneously"
|
|
313
|
-
|
|
314
|
-
# Example 4: Expert Consultation
|
|
315
|
-
"This memory leak issue is tricky, ask Claude Opus 4.1 model separately for solutions"
|
|
316
|
-
|
|
317
|
-
# Example 5: Code Review
|
|
318
|
-
"Have Kimi k2 model review the code quality of this PR"
|
|
319
|
-
|
|
320
|
-
# Example 6: Complex Reasoning
|
|
321
|
-
"Use Grok 4 model to help me derive the time complexity of this algorithm"
|
|
322
|
-
|
|
323
|
-
# Example 7: Solution Design
|
|
324
|
-
"Have GLM-4.5 model design a microservice decomposition plan"
|
|
325
|
-
```
|
|
326
|
-
|
|
327
|
-
### 🛠️ Key Implementation Mechanisms
|
|
328
|
-
|
|
329
|
-
#### **Configuration System**
|
|
330
|
-
```typescript
|
|
331
|
-
// Example of multi-model configuration support
|
|
332
|
-
{
|
|
333
|
-
"modelProfiles": {
|
|
334
|
-
"o3": { "provider": "openai", "model": "o3", "apiKey": "..." },
|
|
335
|
-
"claude4": { "provider": "anthropic", "model": "claude-sonnet-4", "apiKey": "..." },
|
|
336
|
-
"qwen": { "provider": "alibaba", "model": "qwen-coder", "apiKey": "..." }
|
|
337
|
-
},
|
|
338
|
-
"modelPointers": {
|
|
339
|
-
"main": "claude4", // Main conversation model
|
|
340
|
-
"task": "qwen", // Task execution model
|
|
341
|
-
"reasoning": "o3", // Reasoning model
|
|
342
|
-
"quick": "glm-4.5" // Quick response model
|
|
343
|
-
}
|
|
344
|
-
}
|
|
345
|
-
```
|
|
346
|
-
|
|
347
|
-
#### **Cost Tracking System**
|
|
348
|
-
- **Usage Statistics**: Use `/cost` command to view token usage and costs for each model
|
|
349
|
-
- **Multi-Model Cost Comparison**: Track usage costs of different models in real-time
|
|
350
|
-
- **History Records**: Save cost data for each session
|
|
351
|
-
|
|
352
|
-
#### **Context Manager**
|
|
353
|
-
- **Context Inheritance**: Maintain conversation continuity when switching models
|
|
354
|
-
- **Context Window Adaptation**: Automatically adjust based on different models' context window sizes
|
|
355
|
-
- **Session State Preservation**: Ensure information consistency during multi-model collaboration
|
|
356
|
-
|
|
357
|
-
### 🚀 Advantages of Multi-Model Collaboration
|
|
358
|
-
|
|
359
|
-
1. **Maximized Efficiency**: Each task is handled by the most suitable model
|
|
360
|
-
2. **Cost Optimization**: Use lightweight models for simple tasks, powerful models for complex tasks
|
|
361
|
-
3. **Parallel Processing**: Multiple models can work on different subtasks simultaneously
|
|
362
|
-
4. **Flexible Switching**: Switch models based on task requirements without restarting sessions
|
|
363
|
-
5. **Leveraging Strengths**: Combine advantages of different models for optimal overall results
|
|
364
|
-
|
|
365
|
-
### 📊 Comparison with Official Implementation
|
|
366
|
-
|
|
367
|
-
| Feature | Kode | Official Claude |
|
|
368
|
-
|---------|------|-----------------|
|
|
369
|
-
| Number of Supported Models | Unlimited, configurable for any model | Only supports single Claude model |
|
|
370
|
-
| Model Switching | ✅ Tab key quick switch | ❌ Requires session restart |
|
|
371
|
-
| Parallel Processing | ✅ Multiple SubAgents work in parallel | ❌ Single-threaded processing |
|
|
372
|
-
| Cost Tracking | ✅ Separate statistics for multiple models | ❌ Single model cost |
|
|
373
|
-
| Task Model Configuration | ✅ Different default models for different purposes | ❌ Same model for all tasks |
|
|
374
|
-
| Expert Consultation | ✅ AskExpertModel tool | ❌ Not supported |
|
|
375
|
-
|
|
376
|
-
This multi-model collaboration capability makes Kode a true **AI Development Workbench**, not just a single AI assistant.
|
|
377
|
-
|
|
378
|
-
## Development
|
|
379
|
-
|
|
380
|
-
Kode is built with modern tools and requires [Bun](https://bun.sh) for development.
|
|
381
|
-
|
|
382
|
-
### Install Bun
|
|
383
|
-
|
|
384
|
-
```bash
|
|
385
|
-
# macOS/Linux
|
|
386
|
-
curl -fsSL https://bun.sh/install | bash
|
|
387
|
-
|
|
388
|
-
# Windows
|
|
389
|
-
powershell -c "irm bun.sh/install.ps1 | iex"
|
|
390
|
-
```
|
|
391
|
-
|
|
392
|
-
### Setup Development Environment
|
|
393
|
-
|
|
394
|
-
```bash
|
|
395
|
-
# Clone the repository
|
|
396
|
-
git clone https://github.com/shareAI-lab/kode.git
|
|
397
|
-
cd kode
|
|
398
|
-
|
|
399
|
-
# Install dependencies
|
|
400
|
-
bun install
|
|
401
|
-
|
|
402
|
-
# Run in development mode
|
|
403
|
-
bun run dev
|
|
404
|
-
```
|
|
405
|
-
|
|
406
|
-
### Build
|
|
407
|
-
|
|
408
|
-
```bash
|
|
409
|
-
bun run build
|
|
410
|
-
```
|
|
411
|
-
|
|
412
|
-
### Testing
|
|
413
|
-
|
|
414
|
-
```bash
|
|
415
|
-
# Run tests
|
|
416
|
-
bun test
|
|
417
|
-
|
|
418
|
-
# Test the CLI
|
|
419
|
-
./cli.js --help
|
|
420
|
-
```
|
|
421
|
-
|
|
422
|
-
## Contributing
|
|
423
|
-
|
|
424
|
-
We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for details.
|
|
425
|
-
|
|
426
|
-
## License
|
|
427
|
-
|
|
428
|
-
Apache 2.0 License - see [LICENSE](LICENSE) for details.
|
|
429
|
-
|
|
430
|
-
## Thanks
|
|
431
|
-
|
|
432
|
-
- Some code from @dnakov's anonkode
|
|
433
|
-
- Some UI learned from gemini-cli
|
|
434
|
-
- Some system design learned from claude code
|
|
435
|
-
|
|
436
|
-
## Support
|
|
437
|
-
|
|
438
|
-
- 📚 [Documentation](docs/)
|
|
439
|
-
- 🐛 [Report Issues](https://github.com/shareAI-lab/kode/issues)
|
|
440
|
-
- 💬 [Discussions](https://github.com/shareAI-lab/kode/discussions)
|
|
1
|
+
PYB-CLI is an AI agent implementation that follows the minimalist agent philosophy, embodying the core concept of "letting LLMs do what they do best." This implementation achieves core functionality with minimal code, fully leveraging LLMs as general problem-solving engines.
|
package/README.zh-CN.md
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Pyb - 终端 AI 助手
|
|
2
2
|
|
|
3
|
-
[](https://www.npmjs.com/package/@pyb-xc/pyb)
|
|
4
|
+
[](https://opensource.org/licenses/MIT)
|
|
5
5
|
|
|
6
6
|
[English](README.md) | [贡献指南](CONTRIBUTING.md) | [文档](docs/)
|
|
7
7
|
|
|
8
|
-
## 🎉 重磅消息:我们已切换至
|
|
8
|
+
## 🎉 重磅消息:我们已切换至 MIT 开源协议!
|
|
9
9
|
|
|
10
|
-
**开发者社区的福音来了!** 为了推动 AI 智能体技术的民主化进程,构建充满活力的创新生态,我们激动地宣布:
|
|
10
|
+
**开发者社区的福音来了!** 为了推动 AI 智能体技术的民主化进程,构建充满活力的创新生态,我们激动地宣布:Pyb 已正式从 AGPLv3 协议升级为 **MIT 开源协议**。
|
|
11
11
|
|
|
12
12
|
### 这对您意味着什么:
|
|
13
|
-
- ✅ **完全自由**:在任何项目中使用
|
|
13
|
+
- ✅ **完全自由**:在任何项目中使用 Pyb - 无论是个人项目、商业产品还是企业方案
|
|
14
14
|
- ✅ **无障碍创新**:构建专有解决方案,无需开源您的代码
|
|
15
15
|
- ✅ **极简要求**:仅需保留版权声明和许可信息
|
|
16
16
|
- ✅ **共创未来**:与全球开发者一起,加速世界向 AI 驱动生产的转型
|
|
@@ -19,13 +19,13 @@
|
|
|
19
19
|
|
|
20
20
|
## 📢 更新日志
|
|
21
21
|
|
|
22
|
-
**2025-08-29**:我们添加了 Windows 电脑的运行支持!所有的 Windows 用户现在可以使用你电脑上的 Git Bash、Unix 子系统或 WSL(Windows Subsystem for Linux)来运行
|
|
22
|
+
**2025-08-29**:我们添加了 Windows 电脑的运行支持!所有的 Windows 用户现在可以使用你电脑上的 Git Bash、Unix 子系统或 WSL(Windows Subsystem for Linux)来运行 Pyb。
|
|
23
23
|
|
|
24
24
|
**2025-12-30**:Windows 现在开箱即用,原生支持 cmd.exe。Git Bash 和 WSL 是可选的,但推荐使用以获得更好的体验。
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
Pyb 是一个强大的 AI 助手,运行在你的终端中。它能理解你的代码库、编辑文件、运行命令,并为你处理整个开发工作流。
|
|
27
27
|
|
|
28
|
-
> **⚠️ 安全提示**:
|
|
28
|
+
> **⚠️ 安全提示**:Pyb 默认以 YOLO 模式运行(等同于 Claude Code 的 `--dangerously-skip-permissions` 标志),跳过所有权限检查以获得最大生产力。YOLO 模式仅建议在安全可信的环境中处理非重要项目时使用。如果您正在处理重要文件或使用能力存疑的模型,我们强烈建议使用 `pyb --safe` 启用权限检查和手动审批所有操作。
|
|
29
29
|
>
|
|
30
30
|
> **📊 模型性能建议**:为获得最佳体验,建议使用专为自主任务完成设计的新一代强大模型。避免使用 GPT-4o、Gemini 2.5 Pro 等较老的问答型模型,它们主要针对回答问题进行优化,而非持续的独立任务执行。请选择专门训练用于智能体工作流和扩展推理能力的模型。
|
|
31
31
|
|
|
@@ -48,19 +48,19 @@ Kode 是一个强大的 AI 助手,运行在你的终端中。它能理解你
|
|
|
48
48
|
## 安装
|
|
49
49
|
|
|
50
50
|
```bash
|
|
51
|
-
npm install -g @
|
|
51
|
+
npm install -g @pyb-xc/pyb
|
|
52
52
|
```
|
|
53
53
|
|
|
54
54
|
安装后,你可以使用以下任一命令:
|
|
55
|
-
- `
|
|
56
|
-
- `
|
|
57
|
-
- `
|
|
55
|
+
- `pyb` - 主命令
|
|
56
|
+
- `pwa` - Pyb With Agent(备选)
|
|
57
|
+
- `pb` - 超短别名
|
|
58
58
|
|
|
59
59
|
### Windows 提示
|
|
60
60
|
|
|
61
|
-
- **Git Bash 是可选的**:
|
|
62
|
-
- 如果安装了 Git Bash/MSYS 或 WSL Bash,
|
|
63
|
-
- 如果都没有安装,
|
|
61
|
+
- **Git Bash 是可选的**:Pyb 现在原生支持 Windows cmd.exe 和 PowerShell。
|
|
62
|
+
- 如果安装了 Git Bash/MSYS 或 WSL Bash,Pyb 会优先使用它们以获得更好的 Unix 兼容性。
|
|
63
|
+
- 如果都没有安装,Pyb 使用 cmd.exe,同样可以正常工作。
|
|
64
64
|
- 推荐使用 VS Code 集成终端以获得最佳体验:
|
|
65
65
|
- 字体与图标显示更稳定,UI 体验更好。
|
|
66
66
|
- 相比传统命令提示符,路径和编码问题更少。
|
|
@@ -73,30 +73,30 @@ npm install -g @shareai-lab/kode
|
|
|
73
73
|
### 交互模式
|
|
74
74
|
启动交互式会话:
|
|
75
75
|
```bash
|
|
76
|
-
|
|
76
|
+
pyb
|
|
77
77
|
# 或
|
|
78
|
-
|
|
78
|
+
pwa
|
|
79
79
|
# 或
|
|
80
|
-
|
|
80
|
+
pb
|
|
81
81
|
```
|
|
82
82
|
|
|
83
83
|
### 非交互模式
|
|
84
84
|
获取快速响应:
|
|
85
85
|
```bash
|
|
86
|
-
|
|
86
|
+
pyb -p "解释这个函数" 路径/到/文件.js
|
|
87
87
|
# 或
|
|
88
|
-
|
|
88
|
+
pwa -p "解释这个函数" 路径/到/文件.js
|
|
89
89
|
```
|
|
90
90
|
|
|
91
91
|
### Docker 使用说明
|
|
92
92
|
|
|
93
93
|
```bash
|
|
94
94
|
# 克隆仓库
|
|
95
|
-
git clone https://github.com/
|
|
96
|
-
cd
|
|
95
|
+
git clone https://github.com/pyb-xc/pyb-ts.git
|
|
96
|
+
cd pyb-ts
|
|
97
97
|
|
|
98
98
|
# 本地构建镜像
|
|
99
|
-
docker build --no-cache -t
|
|
99
|
+
docker build --no-cache -t pyb .
|
|
100
100
|
|
|
101
101
|
# 在你的项目目录中运行
|
|
102
102
|
cd your-project
|
|
@@ -115,8 +115,8 @@ docker run -it --rm \
|
|
|
115
115
|
* **卷挂载(Volume Mounts)**:
|
|
116
116
|
|
|
117
117
|
* `$(pwd):/workspace` - 挂载当前项目目录
|
|
118
|
-
* `~/.
|
|
119
|
-
* `~/.
|
|
118
|
+
* `~/.pyb:/root/.pyb` - 在运行间保留 pyb 配置目录
|
|
119
|
+
* `~/.pyb.json:/root/.pyb.json` - 在运行间保留 pyb 全局配置文件
|
|
120
120
|
|
|
121
121
|
* **工作目录**:容器内工作目录设置为 `/workspace`
|
|
122
122
|
|
|
@@ -125,7 +125,7 @@ docker run -it --rm \
|
|
|
125
125
|
* **清理**:使用 `--rm` 在退出后自动删除容器
|
|
126
126
|
|
|
127
127
|
**注意**:
|
|
128
|
-
|
|
128
|
+
Pyb 同时使用 `~/.pyb` 目录(存放额外数据,如内存文件)和 `~/.pyb.json` 文件(全局配置)。
|
|
129
129
|
|
|
130
130
|
第一次运行 Docker 命令时会构建镜像,之后的运行会使用缓存镜像以加快启动速度。
|
|
131
131
|
|
|
@@ -153,7 +153,7 @@ Kode 同时使用 `~/.kode` 目录(存放额外数据,如内存文件)和
|
|
|
153
153
|
|
|
154
154
|
## 多模型智能协同
|
|
155
155
|
|
|
156
|
-
与 CC 仅支持单一模型不同,
|
|
156
|
+
与 CC 仅支持单一模型不同,Pyb 实现了**真正的多模型协同工作**,让你能够充分发挥不同 AI 模型的独特优势。
|
|
157
157
|
|
|
158
158
|
### 🏗️ 核心技术架构
|
|
159
159
|
|
|
@@ -268,7 +268,7 @@ Kode 同时使用 `~/.kode` 目录(存放额外数据,如内存文件)和
|
|
|
268
268
|
|
|
269
269
|
### 📊 与官方实现的对比
|
|
270
270
|
|
|
271
|
-
| 特性 |
|
|
271
|
+
| 特性 | Pyb | 官方 CC |
|
|
272
272
|
|------|------|---------|
|
|
273
273
|
| 支持模型数量 | 无限制,可配置任意模型 | 仅支持单一 Claude 模型 |
|
|
274
274
|
| 模型切换 | ✅ Tab 键快速切换 | ❌ 需要重启会话 |
|
|
@@ -277,11 +277,11 @@ Kode 同时使用 `~/.kode` 目录(存放额外数据,如内存文件)和
|
|
|
277
277
|
| 任务模型配置 | ✅ 不同用途配置不同默认模型 | ❌ 所有任务用同一模型 |
|
|
278
278
|
| 专家咨询 | ✅ AskExpertModel 工具 | ❌ 不支持 |
|
|
279
279
|
|
|
280
|
-
这种多模型协同能力让
|
|
280
|
+
这种多模型协同能力让 Pyb 成为真正的 **AI 开发工作台**,而不仅仅是一个单一的 AI 助手。
|
|
281
281
|
|
|
282
282
|
## 开发
|
|
283
283
|
|
|
284
|
-
|
|
284
|
+
Pyb 使用现代化工具构建,开发需要 [Bun](https://bun.sh)。
|
|
285
285
|
|
|
286
286
|
### 安装 Bun
|
|
287
287
|
|
|
@@ -297,8 +297,8 @@ powershell -c "irm bun.sh/install.ps1 | iex"
|
|
|
297
297
|
|
|
298
298
|
```bash
|
|
299
299
|
# 克隆仓库
|
|
300
|
-
git clone https://github.com/
|
|
301
|
-
cd
|
|
300
|
+
git clone https://github.com/pyb-xc/pyb-ts.git
|
|
301
|
+
cd pyb-ts
|
|
302
302
|
|
|
303
303
|
# 安装依赖
|
|
304
304
|
bun install
|
|
@@ -334,5 +334,5 @@ Apache 2.0 许可证 - 详见 [LICENSE](LICENSE)。
|
|
|
334
334
|
## 支持
|
|
335
335
|
|
|
336
336
|
- 📚 [文档](docs/)
|
|
337
|
-
- 🐛 [报告问题](https://github.com/
|
|
338
|
-
- 💬 [讨论](https://github.com/
|
|
337
|
+
- 🐛 [报告问题](https://github.com/pyb-xc/pyb-ts/issues)
|
|
338
|
+
- 💬 [讨论](https://github.com/pyb-xc/pyb-ts/discussions)
|
package/cli-acp.js
CHANGED
|
@@ -27,7 +27,7 @@ function readPackageJson(packageRoot) {
|
|
|
27
27
|
function run(cmd, args) {
|
|
28
28
|
const result = spawnSync(cmd, args, {
|
|
29
29
|
stdio: 'inherit',
|
|
30
|
-
env: { ...process.env,
|
|
30
|
+
env: { ...process.env, PYB_PACKAGED: process.env.PYB_PACKAGED || '1' },
|
|
31
31
|
})
|
|
32
32
|
if (result.error) {
|
|
33
33
|
throw result.error
|
|
@@ -61,14 +61,14 @@ function main() {
|
|
|
61
61
|
|
|
62
62
|
process.stderr.write(
|
|
63
63
|
[
|
|
64
|
-
'❌
|
|
64
|
+
'❌ pyb-acp is not runnable on this system.',
|
|
65
65
|
'',
|
|
66
66
|
'Tried:',
|
|
67
67
|
'- Native binary (postinstall download)',
|
|
68
68
|
'- Node.js runtime fallback',
|
|
69
69
|
'',
|
|
70
70
|
'Fix:',
|
|
71
|
-
'- Reinstall (ensure network access), or set
|
|
71
|
+
'- Reinstall (ensure network access), or set PYB_BINARY_BASE_URL to a mirror',
|
|
72
72
|
'- Or download a standalone binary from GitHub Releases',
|
|
73
73
|
'',
|
|
74
74
|
version ? `Package version: ${version}` : '',
|
package/cli.js
CHANGED
|
@@ -30,7 +30,7 @@ function hasFlag(flag) {
|
|
|
30
30
|
|
|
31
31
|
function printHelpLite() {
|
|
32
32
|
process.stdout.write(
|
|
33
|
-
`Usage:
|
|
33
|
+
`Usage: pyb [options] [command] [prompt]\n\n` +
|
|
34
34
|
`Common options:\n` +
|
|
35
35
|
` -h, --help Show full help\n` +
|
|
36
36
|
` -v, --version Show version\n` +
|
|
@@ -42,7 +42,7 @@ function printHelpLite() {
|
|
|
42
42
|
function run(cmd, args) {
|
|
43
43
|
const result = spawnSync(cmd, args, {
|
|
44
44
|
stdio: 'inherit',
|
|
45
|
-
env: { ...process.env,
|
|
45
|
+
env: { ...process.env, PYB_PACKAGED: process.env.PYB_PACKAGED || '1' },
|
|
46
46
|
})
|
|
47
47
|
if (result.error) {
|
|
48
48
|
throw result.error
|
|
@@ -87,14 +87,14 @@ function main() {
|
|
|
87
87
|
// 3) Final fallback: explain what to do
|
|
88
88
|
process.stderr.write(
|
|
89
89
|
[
|
|
90
|
-
'❌
|
|
90
|
+
'❌ Pyb is not runnable on this system.',
|
|
91
91
|
'',
|
|
92
92
|
'Tried:',
|
|
93
93
|
'- Native binary (postinstall download)',
|
|
94
94
|
'- Node.js runtime fallback',
|
|
95
95
|
'',
|
|
96
96
|
'Fix:',
|
|
97
|
-
'- Reinstall (ensure network access), or set
|
|
97
|
+
'- Reinstall (ensure network access), or set PYB_BINARY_BASE_URL to a mirror',
|
|
98
98
|
'- Or download a standalone binary from GitHub Releases',
|
|
99
99
|
'',
|
|
100
100
|
].join('\n'),
|