A command-line tool that speeds up your development process by using AI to understand and execute your requests.
- Natural language processing of your requests
- Automatic detection and execution of terminal commands
- Secure storage of API keys and preferences
- Debug mode for troubleshooting
- Support for both interactive and non-interactive commands
- Customizable preferences and settings
- Node.js (version 14 or higher)
- npm (comes with Node.js)
- OpenAI API key
# Install globally from GitHub Packages
npm install -g @bvdr/bluejay# Clone the repository
git clone https://github.com/bvdr/BlueJay.git
cd BlueJay
# Install dependencies
npm install
# Install globally
npm install -g .After installation, you can use the j command from anywhere in your terminal.
# Ask BlueJay to list files in the current directory
j "list all the files in this folder"
# Ask BlueJay to create a new directory
j "create a new directory called my-project"
# Ask BlueJay for help with a git command
j "how do I revert my last commit"
# Ask BlueJay to help with file operations
j "find all JavaScript files in this directory"
# Ask BlueJay to help with system tasks
j "show me the current disk usage"On first run, BlueJay will ask for your OpenAI API key, which will be stored securely in the ~/.j/.env file in your home directory.
You can customize BlueJay by editing the .j-preferences file in the ~/.j/ directory or in your current project directory (local preferences take precedence).
The .j-preferences file contains the following settings:
{
"defaultModel": "gpt-4o",
"showCommandConfirmation": true,
"colorOutput": true,
"saveCommandHistory": true,
"maxHistoryItems": 100,
"debug": false
}- defaultModel: The OpenAI model to use for processing requests (default: "gpt-4o")
- showCommandConfirmation: Whether to ask for confirmation before executing commands (default: true)
- colorOutput: Whether to use colored output in the terminal (default: true)
- saveCommandHistory: Whether to save command history (default: true)
- maxHistoryItems: Maximum number of history items to keep (default: 100)
- debug: Whether to show debug information during execution (default: false)
BlueJay CLI uses AI to interpret your natural language requests and convert them into terminal commands. Here's the process:
- Input Processing: You provide a natural language request
- AI Analysis: The AI analyzes your request to determine if it can be fulfilled with a terminal command
- Command Generation: If applicable, the AI generates the appropriate terminal command
- Confirmation: By default, BlueJay shows you the command and asks for confirmation before execution
- Execution: Upon confirmation, the command is executed with proper handling for both interactive and non-interactive commands
BlueJay automatically detects whether a command is interactive (like vim, nano, ssh) and handles them appropriately:
- Interactive commands: Full terminal control is passed to the command
- Non-interactive commands: Output is captured and displayed after execution
We welcome contributions! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
- Fork the repository
- Clone your fork:
git clone https://github.com/your-username/BlueJay.git - Install dependencies:
npm install - Link for local development:
npm run dev- This creates a symlink so the global
jcommand uses your local code - Make changes and test immediately without reinstalling
- This creates a symlink so the global
- Make your changes
- Test your changes:
npm run test:local- Test without global installationnpm run validate- Validate package structure
- Clean up test configuration (optional):
npm run clean- Interactive cleanup of API keys and preferencesnpm run clean:prefs- Remove only preferencesnpm run clean:env- Remove only API keys
- Submit a pull request
Development Commands:
npm run dev- Link local code for live developmentnpm run dev:unlink- Remove development symlinknpm run test:local- Test local version without installingnpm run validate- Validate package configurationnpm run clean- Interactive cleanup utilitynpm run clean:prefs- Remove preference files onlynpm run clean:env- Remove API key files only
This project uses GitHub Actions for automated publishing to GitHub Packages:
- On Release: The package is published when a new GitHub release is created
- Go to the "Actions" tab in the GitHub repository
- Select "Create Release" workflow
- Click "Run workflow"
- Choose the version bump type (patch, minor, or major)
- The workflow will:
- Run tests
- Bump the version in package.json
- Update CHANGELOG.md
- Create a git tag and GitHub release
- Trigger the publish workflow automatically
Run the package test script to verify everything is configured correctly:
node test-package.jsIf you encounter any problems or have feature requests, please open an issue on GitHub.
This tool requires an OpenAI API key which is stored locally in ~/.j/.env. Never commit this file or share your API key publicly.
MIT - see the LICENSE file for details.