Welcome to Pieces CLI, a command-line interface for interacting with the Pieces OS Client API. This tool allows you to ask questions, get formatted responses, and search Stack Overflow for relevant coding issues.
- Interactive Mode: Engage in an interactive session with the CLI.
- Formatted Responses: Get responses with syntax highlighting and formatting.
- Stack Overflow Search: Automatically search Stack Overflow for relevant coding issues.
To install the Pieces CLI, you need to have Node.js and npm installed on your machine. Then, you can install the CLI globally using npm:
npm install -g pieces-cli
You can use the Pieces CLI in two main ways: interactive mode or direct query mode.
To enter interactive mode, use the -i
or --interactive
flag:
npx pieces-cli -i
In interactive mode, you can type your queries directly and get immediate responses. You can also use the following commands:
exit
: Quit the interactive mode.help
: Display available commands.version
: Display the version number.clear
: Clear the screen.
You can also provide a query directly as an argument:
npx pieces-cli "What is the capital of France?"
-i, --interactive
: Enter interactive mode.-h, --help
: Display the help message.-v, --version
: Display the version number.
# Ask a question directly
npx pieces-cli "What is the capital of France?"
# Enter interactive mode
npx pieces-cli -i
# Display help message
npx pieces-cli --help
# Display version number
npx pieces-cli --version
If you want to contribute or modify the CLI, follow these steps:
-
Clone the repository:
git clone https://github.com/yourusername/pieces-cli.git
-
Navigate to the project directory:
cd pieces-cli
-
Install dependencies:
npm install
-
Run the CLI locally:
node index.js
This project is licensed under the MIT License.
For any questions or issues, please open an issue on the GitHub repository.