A beautiful CLI chat interface for AI agents, built with Bun.js and Consola.
You can install the CLI globally using npm (after publishing) or by linking locally with Bun:
npm install -g clicmake linkAfter installing or linking, start the chat interface from anywhere with:
clicIf you see 'command not found', ensure that your Bun global bin directory (usually ~/.bun/bin) is in your PATH.
bun install -g ai-cli-chatai-chat --model=grok --logDir=./logs- Interactive chat with user input and AI responses
- Configurable via
.aichatrcfile - Command-line flags for model and log directory
- Chat history and logging to file
- Commands:
/clear,/history,/help
exit: Quit the chat/history: Show chat history/clear: Clear the screen/help: Show help message
Create a .aichatrc file in the project root:
{
"promptColor": "blue",
"logDir": "./logs",
"aiModel": "grok",
"maxHistory": 50
}--model: Set AI model (e.g.,--model=grok)--logDir: Set log directory (e.g.,--logDir=./logs)
This project uses Bun as the runtime and package manager.
- Install Bun: If you don't have Bun installed, follow the instructions on the official Bun website.
- Install Dependencies:
This command installs all necessary dependencies defined in
bun install
package.json.
-
Development Mode:
bun run start
This starts the application with live reloading (if configured) and is suitable for development.
-
Production Mode (after building):
bun run start:dist
This runs the built version of the application from the
dist/directory.
To publish the CLI globally (for your own use or for npm):
make publishThis will run bun publish to publish the package to npm. Make sure you are logged in to npm and have updated the version in package.json.
bun run buildThis command transpiles the TypeScript code to JavaScript and outputs it to the dist/ directory, preparing it for production.
bun run testThis executes all test files (typically *.test.ts) using Bun's built-in test runner.
Contributions are welcome! If you'd like to contribute, please follow these steps:
- Fork the repository on GitHub.
- Clone your fork locally:
git clone https://github.com/YOUR_USERNAME/clic.git cd clic - Create a new branch for your feature or bug fix:
git checkout -b your-feature-branch
- Make your changes and commit them with clear messages.
- Push your changes to your fork:
git push origin your-feature-branch
- Open a Pull Request from your fork to the original repository's
mainbranch.
Please ensure your code follows the existing style and that all tests pass before submitting a pull request.
MIT