Skip to content

Commit

Permalink
Added CLI and other change improvements.
Browse files Browse the repository at this point in the history
  • Loading branch information
pdparchitect committed Jan 5, 2024
1 parent 3c92872 commit 3178db9
Show file tree
Hide file tree
Showing 51 changed files with 1,049 additions and 23 deletions.
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,13 +146,14 @@ Some examples include:

The ChatBotKit Node SDK is comprised of the following packages:

| Package | Version | Description |
| ------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------- | ---------------------------------------------- |
| [@chatbotkit/sdk](https://github.com/chatbotkit/node-sdk/tree/main/packages/sdk) | [![NPM](https://img.shields.io/npm/v/@chatbotkit/sdk.svg)](https://www.npmjs.com/package/@chatbotkit/sdk) | The ChatBotKit API SDK. |
| [@chatbotkit/react](https://github.com/chatbotkit/node-sdk/tree/main/packages/react) | [![NPM](https://img.shields.io/npm/v/@chatbotkit/react.svg)](https://www.npmjs.com/package/@chatbotkit/react) | The ChatBotKit React SDK. |
| [@chatbotkit/next](https://github.com/chatbotkit/node-sdk/tree/main/packages/next) | [![NPM](https://img.shields.io/npm/v/@chatbotkit/next.svg)](https://www.npmjs.com/package/@chatbotkit/next) | The ChatBotKit Next.js SDK. |
| Package | Version | Description |
| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------- |
| [@chatbotkit/cli](https://github.com/chatbotkit/node-sdk/tree/main/packages/cli) | [![NPM](https://img.shields.io/npm/v/@chatbotkit/cli.svg)](https://www.npmjs.com/package/@chatbotkit/cli) | The ChatBotKit CLI. |
| [@chatbotkit/sdk](https://github.com/chatbotkit/node-sdk/tree/main/packages/sdk) | [![NPM](https://img.shields.io/npm/v/@chatbotkit/sdk.svg)](https://www.npmjs.com/package/@chatbotkit/sdk) | The ChatBotKit API SDK. |
| [@chatbotkit/react](https://github.com/chatbotkit/node-sdk/tree/main/packages/react) | [![NPM](https://img.shields.io/npm/v/@chatbotkit/react.svg)](https://www.npmjs.com/package/@chatbotkit/react) | The ChatBotKit React SDK. |
| [@chatbotkit/next](https://github.com/chatbotkit/node-sdk/tree/main/packages/next) | [![NPM](https://img.shields.io/npm/v/@chatbotkit/next.svg)](https://www.npmjs.com/package/@chatbotkit/next) | The ChatBotKit Next.js SDK. |
| [@chatbotkit/nextauth](https://github.com/chatbotkit/node-sdk/tree/main/packages/nextauth) | [![NPM](https://img.shields.io/npm/v/@chatbotkit/nextauth.svg)](https://www.npmjs.com/package/@chatbotkit/nextauth) | The ChatBotKit NextAuth.js SDK. |
| [@chatbotkit/fetch](https://github.com/chatbotkit/node-sdk/tree/main/packages/fetch) | [![NPM](https://img.shields.io/npm/v/@chatbotkit/fetch.svg)](https://www.npmjs.com/package/@chatbotkit/fetch) | The ChatBotKit isometric fetch implementation. |
| [@chatbotkit/fetch](https://github.com/chatbotkit/node-sdk/tree/main/packages/fetch) | [![NPM](https://img.shields.io/npm/v/@chatbotkit/fetch.svg)](https://www.npmjs.com/package/@chatbotkit/fetch) | The ChatBotKit isometric fetch implementation. |

## Documentation

Expand Down
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,15 @@
"scripts": {
"build": "run-s build:*",
"build:all": "turbo run build",
"check": "turbo run check",
"check": "run-s check:*",
"check:all": "turbo run check",
"clean": "run-p clean:*",
"clean:all": "turbo run clean",
"format": "run-p format:*",
"format:pkg": "format-package -w",
"format:src": "prettier -w .",
"lint": "turbo run lint",
"lint": "run-s lint:*",
"lint:all": "turbo run lint",
"preinstall": "npx only-allow pnpm",
"prepare": "husky install",
"prepare-changes": "changeset",
Expand Down
1 change: 1 addition & 0 deletions packages/cli/.eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
7 changes: 7 additions & 0 deletions packages/cli/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# @chatbotkit/cli

## 1.5.0

### Minor Changes

- 10f0d94: Added initial version of the cli tools.
45 changes: 45 additions & 0 deletions packages/cli/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
[![Follow on Twitter](https://img.shields.io/twitter/follow/chatbotkit.svg?logo=twitter)](https://twitter.com/chatbotkit)
[![ChatBotKit](https://img.shields.io/badge/credits-ChatBotKit-blue.svg)](https://chatbotkit.com)
[![NPM](https://img.shields.io/npm/v/@chatbotkit/cli.svg)](https://www.npmjs.com/package/@chatbotkit/cli)

# ChatBotKit CLI

The ChatBotKit CLI is a command-line interface for the ChatBotKit SDK. It provides a set of commands to help you manage your ChatBotKit projects.

## Getting Started

To begin using the ChatBotKit CLI, follow these steps:

1. **Installation**: Add the SDK to your project using npm:

```bash
npm install --global @chatbotkit/cli
```

2. **Help**: Get help on the available commands:

```bash
cbk --help
```

3. **Usage**: Use the CLI to interact with ChatBotKit:

Keep in mind that you will need to authenticate with your ChatBotKit token first.

```bash
export CHATBOTKIT_API_TOKEN=<your token here>
```

Then you can use the CLI to interact with ChatBotKit:

```bash
cbk api conversation list
```

## Documentation

For comprehensive information about the ChatBotKit CLI SDK, including detailed documentation on its functionalities, helper methods, and configuration options, please visit our [type documentation page](https://chatbotkit.github.io/node-sdk/modules/_chatbotkit_cli.html).

## Contributing

If you find a bug or would like to contribute to the ChatBotKit SDK, please open an issue or submit a pull request on the [official GitHub repository](https://github.com/chatbotkit/node-sdk).
4 changes: 4 additions & 0 deletions packages/cli/bin/cbk.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import cbk from '../src/index.js'
import { printError } from '../src/output.js'

cbk().catch(printError)
1 change: 1 addition & 0 deletions packages/cli/docs/.nojekyll
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
TypeDoc added this file to prevent GitHub Pages from using Jekyll. You can turn off this behavior by setting the `githubPages` option to false.
33 changes: 33 additions & 0 deletions packages/cli/docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
@chatbotkit/cli / [Modules](modules.md)

[![Follow on Twitter](https://img.shields.io/twitter/follow/chatbotkit.svg?logo=twitter)](https://twitter.com/chatbotkit)
[![ChatBotKit](https://img.shields.io/badge/credits-ChatBotKit-blue.svg)](https://chatbotkit.com)
[![NPM](https://img.shields.io/npm/v/@chatbotkit/cli.svg)](https://www.npmjs.com/package/@chatbotkit/cli)

# ChatBotKit CLI

The ChatBotKit CLI is a command-line interface for the ChatBotKit SDK. It provides a set of commands to help you manage your ChatBotKit projects.

## Getting Started

To begin using the ChatBotKit CLI, follow these steps:

1. **Installation**: Add the SDK to your project using npm:

```bash
npm install --global @chatbotkit/cli
```

2. **Usage**: Get help on the available commands:

```bash
cbk --help
```

## Documentation

For comprehensive information about the ChatBotKit CLI SDK, including detailed documentation on its functionalities, helper methods, and configuration options, please visit our [type documentation page](https://chatbotkit.github.io/node-sdk/modules/_chatbotkit_cli.html).

## Contributing

If you find a bug or would like to contribute to the ChatBotKit SDK, please open an issue or submit a pull request on the [official GitHub repository](https://github.com/chatbotkit/node-sdk).
10 changes: 10 additions & 0 deletions packages/cli/docs/modules.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[@chatbotkit/cli](README.md) / Modules

# @chatbotkit/cli

## Table of contents

### Modules

- [env](modules/env.md)
- [output](modules/output.md)
40 changes: 40 additions & 0 deletions packages/cli/docs/modules/env.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
[@chatbotkit/cli](../README.md) / [Modules](../modules.md) / env

# Module: env

## Table of contents

### Functions

- [getRUNAS\_USERID](env.md#getrunas_userid)
- [getSECRET](env.md#getsecret)

## Functions

### getRUNAS\_USERID

**getRUNAS_USERID**(): `string`

#### Returns

`string`

#### Defined in

[env.js:16](https://github.com/chatbotkit/node-sdk/blob/main/packages/cli/src/env.js#L16)

___

### getSECRET

**getSECRET**(): `string`

#### Returns

`string`

**`Throws`**

#### Defined in

[env.js:5](https://github.com/chatbotkit/node-sdk/blob/main/packages/cli/src/env.js#L5)
50 changes: 50 additions & 0 deletions packages/cli/docs/modules/output.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
[@chatbotkit/cli](../README.md) / [Modules](../modules.md) / output

# Module: output

## Table of contents

### Functions

- [print](output.md#print)
- [printError](output.md#printerror)

## Functions

### print

**print**(`input`): `void`

#### Parameters

| Name | Type |
| :------ | :------ |
| `input` | `any` |

#### Returns

`void`

#### Defined in

[output.js:13](https://github.com/chatbotkit/node-sdk/blob/main/packages/cli/src/output.js#L13)

___

### printError

**printError**(`error`): `void`

#### Parameters

| Name | Type |
| :------ | :------ |
| `error` | `any` |

#### Returns

`void`

#### Defined in

[output.js:49](https://github.com/chatbotkit/node-sdk/blob/main/packages/cli/src/output.js#L49)
Loading

0 comments on commit 3178db9

Please sign in to comment.