chatbase 0.0.1 → 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 (72) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +1524 -6
  3. package/bin/run.js +4 -0
  4. package/dist/base/agent-command.js +40 -0
  5. package/dist/base/agent-ref.js +16 -0
  6. package/dist/base/assert-file.js +21 -0
  7. package/dist/base/base-command.js +203 -0
  8. package/dist/base/body-input.js +77 -0
  9. package/dist/base/list-command.js +16 -0
  10. package/dist/base/sources.js +33 -0
  11. package/dist/client/chat-helpers.js +173 -0
  12. package/dist/client/client.js +175 -0
  13. package/dist/client/files.js +64 -0
  14. package/dist/client/paginate.js +40 -0
  15. package/dist/client/pairing.js +76 -0
  16. package/dist/client/retry.js +40 -0
  17. package/dist/client/signals.js +43 -0
  18. package/dist/client/stream.js +79 -0
  19. package/dist/commands/agents/auto-retrain.js +46 -0
  20. package/dist/commands/agents/clone.js +28 -0
  21. package/dist/commands/agents/create.js +43 -0
  22. package/dist/commands/agents/delete.js +41 -0
  23. package/dist/commands/agents/get.js +52 -0
  24. package/dist/commands/agents/list.js +48 -0
  25. package/dist/commands/agents/styles.js +44 -0
  26. package/dist/commands/agents/train.js +31 -0
  27. package/dist/commands/agents/update.js +47 -0
  28. package/dist/commands/api.js +69 -0
  29. package/dist/commands/auth/login.js +125 -0
  30. package/dist/commands/auth/logout.js +38 -0
  31. package/dist/commands/auth/status.js +86 -0
  32. package/dist/commands/chat/index.js +210 -0
  33. package/dist/commands/chat/retry.js +49 -0
  34. package/dist/commands/config/get.js +40 -0
  35. package/dist/commands/config/list.js +34 -0
  36. package/dist/commands/config/set.js +106 -0
  37. package/dist/commands/conversations/export.js +75 -0
  38. package/dist/commands/conversations/get.js +69 -0
  39. package/dist/commands/conversations/list.js +75 -0
  40. package/dist/commands/health.js +22 -0
  41. package/dist/commands/helpdesk/statuses.js +31 -0
  42. package/dist/commands/helpdesk/teams.js +25 -0
  43. package/dist/commands/messages/feedback.js +64 -0
  44. package/dist/commands/messages/list.js +55 -0
  45. package/dist/commands/sources/create.js +134 -0
  46. package/dist/commands/sources/delete.js +28 -0
  47. package/dist/commands/sources/get.js +35 -0
  48. package/dist/commands/sources/list.js +47 -0
  49. package/dist/commands/sources/restore.js +22 -0
  50. package/dist/commands/sources/summary.js +33 -0
  51. package/dist/commands/sources/update.js +76 -0
  52. package/dist/commands/tickets/create.js +58 -0
  53. package/dist/commands/tickets/get.js +44 -0
  54. package/dist/commands/tickets/list.js +96 -0
  55. package/dist/commands/tickets/messages.js +87 -0
  56. package/dist/commands/tickets/reply.js +66 -0
  57. package/dist/commands/tickets/search.js +53 -0
  58. package/dist/commands/tickets/update.js +38 -0
  59. package/dist/config/paths.js +22 -0
  60. package/dist/config/resolve.js +37 -0
  61. package/dist/config/store.js +38 -0
  62. package/dist/errors/errors.js +81 -0
  63. package/dist/hooks/chat-message-hint.js +21 -0
  64. package/dist/output/color.js +30 -0
  65. package/dist/output/mode.js +7 -0
  66. package/dist/output/render.js +0 -0
  67. package/dist/output/spinner.js +37 -0
  68. package/dist/repl/chat-repl.js +129 -0
  69. package/dist/version.js +3 -0
  70. package/oclif.manifest.json +3948 -0
  71. package/package.json +92 -4
  72. package/spec/openapi.json +11843 -0
package/package.json CHANGED
@@ -1,12 +1,100 @@
1
1
  {
2
2
  "name": "chatbase",
3
- "version": "0.0.1",
4
- "description": "The official CLI for the Chatbase API — under development. See https://www.chatbase.co/docs",
3
+ "version": "0.1.0",
4
+ "description": "The official command-line interface for the Chatbase API v2",
5
5
  "license": "MIT",
6
- "homepage": "https://www.chatbase.co",
6
+ "type": "module",
7
7
  "repository": {
8
8
  "type": "git",
9
9
  "url": "git+https://github.com/Chatbase-co/chatbase-cli.git"
10
10
  },
11
- "keywords": ["chatbase", "cli", "ai", "agents"]
11
+ "bugs": "https://github.com/Chatbase-co/chatbase-cli/issues",
12
+ "homepage": "https://www.chatbase.co/docs",
13
+ "engines": {
14
+ "node": ">=20"
15
+ },
16
+ "bin": {
17
+ "chatbase": "./bin/run.js"
18
+ },
19
+ "files": [
20
+ "bin",
21
+ "dist",
22
+ "spec",
23
+ "oclif.manifest.json"
24
+ ],
25
+ "scripts": {
26
+ "build": "rm -rf dist && tsc -p tsconfig.build.json",
27
+ "typecheck": "tsc --noEmit",
28
+ "lint": "biome check src tests scripts",
29
+ "test": "vitest run",
30
+ "test:e2e": "vitest run tests/e2e",
31
+ "spec:generate": "openapi-typescript spec/openapi.json -o src/generated/api.d.ts",
32
+ "spec:refresh": "bash scripts/refresh-spec.sh",
33
+ "spec:check": "bash scripts/spec-check.sh",
34
+ "prepack": "npm run build && oclif manifest"
35
+ },
36
+ "oclif": {
37
+ "bin": "chatbase",
38
+ "dirname": "chatbase",
39
+ "commands": "./dist/commands",
40
+ "topicSeparator": " ",
41
+ "additionalHelpFlags": [
42
+ "-h"
43
+ ],
44
+ "plugins": [
45
+ "@oclif/plugin-help",
46
+ "@oclif/plugin-not-found",
47
+ "@oclif/plugin-warn-if-update-available"
48
+ ],
49
+ "warn-if-update-available": {
50
+ "timeoutInDays": 7,
51
+ "message": "<%= config.name %> <%= chalk.greenBright(latest) %> is available (you have <%= config.version %>). Run npm install -g chatbase to update."
52
+ },
53
+ "topics": {
54
+ "agents": {
55
+ "description": "Create, inspect, update, train, and delete agents"
56
+ },
57
+ "auth": {
58
+ "description": "Log in, log out, and inspect credentials"
59
+ },
60
+ "sources": {
61
+ "description": "Manage an agent's knowledge sources (text, qna, link, file, sync)"
62
+ },
63
+ "conversations": {
64
+ "description": "List and inspect agent conversations"
65
+ },
66
+ "messages": {
67
+ "description": "List conversation messages and set feedback"
68
+ },
69
+ "tickets": {
70
+ "description": "Manage helpdesk tickets and their message threads"
71
+ },
72
+ "helpdesk": {
73
+ "description": "Look up helpdesk teams and ticket statuses"
74
+ },
75
+ "config": {
76
+ "description": "Manage CLI configuration (agent, timeout)"
77
+ }
78
+ },
79
+ "hooks": {
80
+ "command_not_found": "./dist/hooks/chat-message-hint"
81
+ }
82
+ },
83
+ "dependencies": {
84
+ "@inquirer/prompts": "^8.5.2",
85
+ "@oclif/core": "^4.13.3",
86
+ "@oclif/plugin-help": "^6.2.58",
87
+ "@oclif/plugin-not-found": "^3.2.93",
88
+ "@oclif/plugin-warn-if-update-available": "^4.0.0",
89
+ "openapi-fetch": "^0.17.0",
90
+ "undici": "^7.29.0"
91
+ },
92
+ "devDependencies": {
93
+ "@biomejs/biome": "^2.5.7",
94
+ "@types/node": "^26.2.0",
95
+ "oclif": "^4.23.30",
96
+ "openapi-typescript": "^7.13.0",
97
+ "typescript": "^5.9.3",
98
+ "vitest": "^4.1.10"
99
+ }
12
100
  }