ohbaby-cli 0.1.0

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 (133) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +69 -0
  3. package/dist/bin.d.ts +19 -0
  4. package/dist/bin.d.ts.map +1 -0
  5. package/dist/bin.js +5705 -0
  6. package/dist/bin.js.map +1 -0
  7. package/dist/cli/commands/run.d.ts +8 -0
  8. package/dist/cli/commands/run.d.ts.map +1 -0
  9. package/dist/cli/commands/serve.d.ts +13 -0
  10. package/dist/cli/commands/serve.d.ts.map +1 -0
  11. package/dist/cli/commands/terminal.d.ts +13 -0
  12. package/dist/cli/commands/terminal.d.ts.map +1 -0
  13. package/dist/cli/commands/types.d.ts +64 -0
  14. package/dist/cli/commands/types.d.ts.map +1 -0
  15. package/dist/cli/exit-codes.d.ts +7 -0
  16. package/dist/cli/exit-codes.d.ts.map +1 -0
  17. package/dist/cli/stdin.d.ts +3 -0
  18. package/dist/cli/stdin.d.ts.map +1 -0
  19. package/dist/cli/stdout-renderer.d.ts +10 -0
  20. package/dist/cli/stdout-renderer.d.ts.map +1 -0
  21. package/dist/index.d.ts +3 -0
  22. package/dist/index.d.ts.map +1 -0
  23. package/dist/index.js +5215 -0
  24. package/dist/index.js.map +1 -0
  25. package/dist/package-version.d.ts +2 -0
  26. package/dist/package-version.d.ts.map +1 -0
  27. package/dist/tui/app.d.ts +10 -0
  28. package/dist/tui/app.d.ts.map +1 -0
  29. package/dist/tui/components/dialog/command-panel-manager.d.ts +14 -0
  30. package/dist/tui/components/dialog/command-panel-manager.d.ts.map +1 -0
  31. package/dist/tui/components/dialog/command-panel-state.d.ts +25 -0
  32. package/dist/tui/components/dialog/command-panel-state.d.ts.map +1 -0
  33. package/dist/tui/components/dialog/connect-panel.d.ts +9 -0
  34. package/dist/tui/components/dialog/connect-panel.d.ts.map +1 -0
  35. package/dist/tui/components/dialog/overlay-card.d.ts +7 -0
  36. package/dist/tui/components/dialog/overlay-card.d.ts.map +1 -0
  37. package/dist/tui/components/header.d.ts +6 -0
  38. package/dist/tui/components/header.d.ts.map +1 -0
  39. package/dist/tui/components/logo.d.ts +3 -0
  40. package/dist/tui/components/logo.d.ts.map +1 -0
  41. package/dist/tui/components/message/message-list.d.ts +10 -0
  42. package/dist/tui/components/message/message-list.d.ts.map +1 -0
  43. package/dist/tui/components/message/message-row.d.ts +50 -0
  44. package/dist/tui/components/message/message-row.d.ts.map +1 -0
  45. package/dist/tui/components/message/notice-banner.d.ts +9 -0
  46. package/dist/tui/components/message/notice-banner.d.ts.map +1 -0
  47. package/dist/tui/components/message/parts/tool-part.d.ts +10 -0
  48. package/dist/tui/components/message/parts/tool-part.d.ts.map +1 -0
  49. package/dist/tui/components/prompt/completion.d.ts +9 -0
  50. package/dist/tui/components/prompt/completion.d.ts.map +1 -0
  51. package/dist/tui/components/prompt/editor-reducer.d.ts +46 -0
  52. package/dist/tui/components/prompt/editor-reducer.d.ts.map +1 -0
  53. package/dist/tui/components/prompt/index.d.ts +21 -0
  54. package/dist/tui/components/prompt/index.d.ts.map +1 -0
  55. package/dist/tui/components/shimmer-text.d.ts +28 -0
  56. package/dist/tui/components/shimmer-text.d.ts.map +1 -0
  57. package/dist/tui/components/spinner.d.ts +8 -0
  58. package/dist/tui/components/spinner.d.ts.map +1 -0
  59. package/dist/tui/components/transcript/command-notice-lane.d.ts +6 -0
  60. package/dist/tui/components/transcript/command-notice-lane.d.ts.map +1 -0
  61. package/dist/tui/components/transcript/committed-transcript.d.ts +13 -0
  62. package/dist/tui/components/transcript/committed-transcript.d.ts.map +1 -0
  63. package/dist/tui/components/transcript/live-tail-window.d.ts +14 -0
  64. package/dist/tui/components/transcript/live-tail-window.d.ts.map +1 -0
  65. package/dist/tui/components/transcript/live-tail.d.ts +6 -0
  66. package/dist/tui/components/transcript/live-tail.d.ts.map +1 -0
  67. package/dist/tui/components/transcript/notice-lane.d.ts +6 -0
  68. package/dist/tui/components/transcript/notice-lane.d.ts.map +1 -0
  69. package/dist/tui/components/transcript/transcript-viewport.d.ts +13 -0
  70. package/dist/tui/components/transcript/transcript-viewport.d.ts.map +1 -0
  71. package/dist/tui/components/working-phrases.d.ts +13 -0
  72. package/dist/tui/components/working-phrases.d.ts.map +1 -0
  73. package/dist/tui/components/working-spinner.d.ts +12 -0
  74. package/dist/tui/components/working-spinner.d.ts.map +1 -0
  75. package/dist/tui/dialogs/confirm.d.ts +9 -0
  76. package/dist/tui/dialogs/confirm.d.ts.map +1 -0
  77. package/dist/tui/dialogs/manager.d.ts +10 -0
  78. package/dist/tui/dialogs/manager.d.ts.map +1 -0
  79. package/dist/tui/dialogs/model-dialog.d.ts +9 -0
  80. package/dist/tui/dialogs/model-dialog.d.ts.map +1 -0
  81. package/dist/tui/dialogs/permission-dialog.d.ts +8 -0
  82. package/dist/tui/dialogs/permission-dialog.d.ts.map +1 -0
  83. package/dist/tui/dialogs/select-one.d.ts +10 -0
  84. package/dist/tui/dialogs/select-one.d.ts.map +1 -0
  85. package/dist/tui/dialogs/session-dialog.d.ts +10 -0
  86. package/dist/tui/dialogs/session-dialog.d.ts.map +1 -0
  87. package/dist/tui/index.d.ts +6 -0
  88. package/dist/tui/index.d.ts.map +1 -0
  89. package/dist/tui/layout/app-shell.d.ts +6 -0
  90. package/dist/tui/layout/app-shell.d.ts.map +1 -0
  91. package/dist/tui/layout/context.d.ts +9 -0
  92. package/dist/tui/layout/context.d.ts.map +1 -0
  93. package/dist/tui/layout/metrics.d.ts +13 -0
  94. package/dist/tui/layout/metrics.d.ts.map +1 -0
  95. package/dist/tui/render/highlight.d.ts +2 -0
  96. package/dist/tui/render/highlight.d.ts.map +1 -0
  97. package/dist/tui/render/logo.d.ts +5 -0
  98. package/dist/tui/render/logo.d.ts.map +1 -0
  99. package/dist/tui/render/markdown.d.ts +5 -0
  100. package/dist/tui/render/markdown.d.ts.map +1 -0
  101. package/dist/tui/render/status-panel.d.ts +2 -0
  102. package/dist/tui/render/status-panel.d.ts.map +1 -0
  103. package/dist/tui/render/usage.d.ts +3 -0
  104. package/dist/tui/render/usage.d.ts.map +1 -0
  105. package/dist/tui/render/wrap.d.ts +4 -0
  106. package/dist/tui/render/wrap.d.ts.map +1 -0
  107. package/dist/tui/slash-commands/completions.d.ts +7 -0
  108. package/dist/tui/slash-commands/completions.d.ts.map +1 -0
  109. package/dist/tui/slash-commands/hints.d.ts +5 -0
  110. package/dist/tui/slash-commands/hints.d.ts.map +1 -0
  111. package/dist/tui/slash-commands/runtime.d.ts +23 -0
  112. package/dist/tui/slash-commands/runtime.d.ts.map +1 -0
  113. package/dist/tui/store/events.d.ts +7 -0
  114. package/dist/tui/store/events.d.ts.map +1 -0
  115. package/dist/tui/store/selectors/transcript.d.ts +19 -0
  116. package/dist/tui/store/selectors/transcript.d.ts.map +1 -0
  117. package/dist/tui/store/selectors.d.ts +9 -0
  118. package/dist/tui/store/selectors.d.ts.map +1 -0
  119. package/dist/tui/store/snapshot.d.ts +82 -0
  120. package/dist/tui/store/snapshot.d.ts.map +1 -0
  121. package/dist/tui/store/stream-coalescer.d.ts +10 -0
  122. package/dist/tui/store/stream-coalescer.d.ts.map +1 -0
  123. package/dist/tui/store/transcript.d.ts +43 -0
  124. package/dist/tui/store/transcript.d.ts.map +1 -0
  125. package/dist/tui/theme/colors.d.ts +55 -0
  126. package/dist/tui/theme/colors.d.ts.map +1 -0
  127. package/dist/tui/theme/detect.d.ts +12 -0
  128. package/dist/tui/theme/detect.d.ts.map +1 -0
  129. package/dist/tui/theme/index.d.ts +14 -0
  130. package/dist/tui/theme/index.d.ts.map +1 -0
  131. package/dist/tui/theme/tokens.d.ts +61 -0
  132. package/dist/tui/theme/tokens.d.ts.map +1 -0
  133. package/package.json +55 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 ohbaby-agent 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.
package/README.md ADDED
@@ -0,0 +1,69 @@
1
+ <p align="center">
2
+ <img src="https://raw.githubusercontent.com/diverHansun/ohbaby-agent/main/assets/images/logo.png" alt="ohbaby-agent" width="150">
3
+ </p>
4
+
5
+ <p align="center">The MVP CLI/TUI package for ohbaby-agent.</p>
6
+
7
+ <p align="center">
8
+ <a href="https://github.com/diverHansun/ohbaby-agent/actions/workflows/ci.yml"><img alt="CI" src="https://img.shields.io/github/actions/workflow/status/diverHansun/ohbaby-agent/ci.yml?style=flat-square&label=CI&logo=github"></a>
9
+ <a href="https://www.npmjs.com/package/ohbaby-cli"><img alt="npm" src="https://img.shields.io/npm/v/ohbaby-cli?style=flat-square&color=cb3837&logo=npm"></a>
10
+ <a href="https://github.com/diverHansun/ohbaby-agent/blob/main/LICENSE"><img alt="license" src="https://img.shields.io/badge/license-MIT-blue?style=flat-square"></a>
11
+ <img alt="node" src="https://img.shields.io/node/v/ohbaby-cli?style=flat-square&color=339933&logo=node.js">
12
+ </p>
13
+
14
+ <p align="center">
15
+ <img src="https://raw.githubusercontent.com/diverHansun/ohbaby-agent/main/assets/images/dashboard.png" alt="ohbaby-agent CLI/TUI" width="760">
16
+ </p>
17
+
18
+ ---
19
+
20
+ **ohbaby-agent** is a provider-agnostic AI coding agent. This package provides its
21
+ current MVP interface: a fast [Ink](https://github.com/vadimdemedes/ink)-based CLI/TUI
22
+ installed from npm as `ohbaby-cli` and launched with the `ohbaby` command. The same
23
+ runtime can support future web or app interfaces.
24
+
25
+ ## Installation
26
+
27
+ Requires **Node.js >= 24**.
28
+
29
+ ```bash
30
+ npm install -g ohbaby-cli
31
+ ```
32
+
33
+ This installs the `ohbaby` command globally.
34
+
35
+ ## Quick Start
36
+
37
+ 1. Launch the ohbaby-agent CLI/TUI:
38
+
39
+ ```bash
40
+ ohbaby
41
+ ```
42
+
43
+ 2. Type `/connect` in the CLI/TUI to configure your model provider (provider, base URL,
44
+ API key, model name), then save.
45
+
46
+ <p align="center">
47
+ <img src="https://raw.githubusercontent.com/diverHansun/ohbaby-agent/main/assets/images/connect-providers.png" alt="ohbaby-agent /connect provider setup" width="760">
48
+ </p>
49
+
50
+ 3. Start coding.
51
+
52
+ Supports OpenAI, Anthropic/Claude, and any OpenAI-compatible endpoint (Zhipu/GLM,
53
+ DeepSeek, Qwen/DashScope, …).
54
+
55
+ **Web search (optional):** get a free [Tavily](https://tavily.com) API key and add
56
+ `TAVILY_API_KEY=tvly-...` to `~/.ohbaby-agent/.env` or your project's `.env`.
57
+
58
+ **MCP & Skills:** configure MCP servers globally or per project under `.ohbaby-agent/mcp/`.
59
+ Skills are discovered from ohbaby-agent-compatible skill directories and exposed as slash commands.
60
+
61
+ ## Documentation
62
+
63
+ Full docs, configuration, and source: **https://github.com/diverHansun/ohbaby-agent**
64
+ ([English](https://github.com/diverHansun/ohbaby-agent/blob/main/README.md) ·
65
+ [简体中文](https://github.com/diverHansun/ohbaby-agent/blob/main/README.zh.md))
66
+
67
+ ## License
68
+
69
+ [MIT](https://github.com/diverHansun/ohbaby-agent/blob/main/LICENSE)
package/dist/bin.d.ts ADDED
@@ -0,0 +1,19 @@
1
+ #!/usr/bin/env node
2
+ import type { Readable } from "node:stream";
3
+ import type { CliCommandRuntime, CliCoreHostResult, CliGlobalOptions, CliWritable } from "./cli/commands/types.js";
4
+ export interface RunOhbabyCliIo {
5
+ readonly stderr?: CliWritable;
6
+ readonly stdin?: Readable & {
7
+ readonly isTTY?: boolean;
8
+ };
9
+ readonly stdout?: CliWritable;
10
+ }
11
+ export interface RunOhbabyCliDependencies {
12
+ readonly createCoreHost?: (options: CliGlobalOptions) => CliCoreHostResult;
13
+ readonly loadRuntimeEnvIntoProcessEnv?: () => Promise<void> | void;
14
+ readonly readDaemonStatus?: CliCommandRuntime["readDaemonStatus"];
15
+ readonly startDaemonServer?: CliCommandRuntime["startDaemonServer"];
16
+ readonly stopDaemonFromState?: CliCommandRuntime["stopDaemonFromState"];
17
+ }
18
+ export declare function runOhbabyCli(argv?: readonly string[], io?: RunOhbabyCliIo, dependencies?: RunOhbabyCliDependencies): Promise<number>;
19
+ //# sourceMappingURL=bin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bin.d.ts","sourceRoot":"","sources":["../src/bin.ts"],"names":[],"mappings":";AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAS5C,OAAO,KAAK,EACV,iBAAiB,EAEjB,iBAAiB,EACjB,gBAAgB,EAChB,WAAW,EACZ,MAAM,yBAAyB,CAAC;AAiBjC,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,MAAM,CAAC,EAAE,WAAW,CAAC;IAC9B,QAAQ,CAAC,KAAK,CAAC,EAAE,QAAQ,GAAG;QAAE,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC;IACzD,QAAQ,CAAC,MAAM,CAAC,EAAE,WAAW,CAAC;CAC/B;AAED,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,cAAc,CAAC,EAAE,CAAC,OAAO,EAAE,gBAAgB,KAAK,iBAAiB,CAAC;IAC3E,QAAQ,CAAC,4BAA4B,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IACnE,QAAQ,CAAC,gBAAgB,CAAC,EAAE,iBAAiB,CAAC,kBAAkB,CAAC,CAAC;IAClE,QAAQ,CAAC,iBAAiB,CAAC,EAAE,iBAAiB,CAAC,mBAAmB,CAAC,CAAC;IACpE,QAAQ,CAAC,mBAAmB,CAAC,EAAE,iBAAiB,CAAC,qBAAqB,CAAC,CAAC;CACzE;AA8FD,wBAAsB,YAAY,CAChC,IAAI,GAAE,SAAS,MAAM,EAAiB,EACtC,EAAE,GAAE,cAAmB,EACvB,YAAY,GAAE,wBAA6B,GAC1C,OAAO,CAAC,MAAM,CAAC,CA2GjB"}