Welcome to FluentCLI
The docs are a work in progress but what docs aren't?
Last updated
The docs are a work in progress but what docs aren't?
Last updated
Welcome to the official documentation for FluentCLI, a versatile command-line interface designed to interact with FlowiseAI, Langflow, and Webhook workflows. This documentation will guide you through the installation, configuration, and usage of FluentCLI.
Introduction
Installation
Configuration
Basic Usage
Advanced Commands
Outputs and Formats
Integration with Other Tools
Examples
Troubleshooting
Appendix
FluentCLI is a command-line tool that facilitates interactions with various AI engines and services, including FlowiseAI, Langflow, and Webhooks. By leveraging FluentCLI, users can easily send requests, upload files, and receive responses in different formats directly from the terminal.
Easy Configuration: Define multiple flows with customizable configurations.
Versatile Usage: Supports multiple AI engines and services including FlowiseAI, Langflow, and Webhooks.
Rich Output Options: Choose from various output formats, including JSON, markdown, and plain text.
File Uploads: Upload files to endpoints seamlessly.
Integration: Easily integrate with other tools and services in your workflow.
This documentation aims to cover all aspects of FluentCLI, from initial setup to advanced usage scenarios. Let's get started!
To get started with FluentCLI, you must first install it. FluentCLI is written in Rust, so you'll need to have Rust installed on your system. Follow the steps below to install Rust and then FluentCLI.
If you don't have Rust installed, you can install it using the following command:
Follow the on-screen instructions to complete the installation. After installation, ensure Rust is correctly installed by running:
Clone the FluentCLI repository from GitHub and navigate to the project directory:
Next, build and install FluentCLI using Cargo:
This command compiles the FluentCLI source code and installs the fluent
command on your system.
After installation, you can verify that FluentCLI is installed correctly by running:
You should see the version information of FluentCLI displayed in the terminal.
FluentCLI uses a configuration file to manage different flows and their settings. The configuration file is written in JSON format and must be placed in a directory specified by the FLUENT_CLI_CONFIG_PATH
environment variable.
Create a JSON configuration file and set the FLUENT_CLI_CONFIG_PATH
environment variable to the directory containing the file. Here's an example configuration file:
Set the FLUENT_CLI_CONFIG_PATH
environment variable to the directory containing your configuration file:
You can also add this line to your shell's configuration file (e.g., .bashrc
, .zshrc
) to make it persistent.
name: The name of the flow.
engine: The AI engine or service to be used (e.g., "flowise", "langflow").
protocol: The protocol to use ("http" or "https").
hostname: The hostname of the service.
port: The port number of the service.
chat_id: The chat ID or endpoint identifier.
request_path: The request path for the service.
sessionId: The session ID (can use environment variables prefixed with "AMBER_").
bearer_token: The bearer token for authentication (can use environment variables prefixed with "AMBER_").
overrideConfig: Custom configuration overrides.
tweaks: Additional configuration tweaks.
timeout_ms: Request timeout in milliseconds.
Once you have installed and configured FluentCLI, you can start using it to interact with various AI engines and services.
To send a request to a configured flow, use the following command:
For example:
This command sends the request "What is the weather today?" to the flow named "LocalGoogleGeminiChain".
You can provide additional context to your request using the --context
flag or by piping input from a file or stdin.
Using the --context
flag:
Piping input from a file:
FluentCLI allows you to upload files as part of your request using the --upload-image-path
flag:
FluentCLI supports multiple output formats such as markdown, plain text, and JSON.
Markdown output:
Extracting code blocks:
Full JSON output:
FluentCLI offers several advanced commands and flags to customize your interactions and workflows.
You can override configuration settings directly from the command line using the --override
flag:
This command overrides the modelName
setting for the specified request.
FluentCLI can generate autocomplete scripts for Bash and Fig.
Generating a Bash autocomplete script:
Generating a Fig autocomplete script:
You can upsert data using the --upsert-no-upload
or --upsert-with-upload
flags.
Upserting without file upload:
Upserting with file upload:
FluentCLI provides flexible output options to suit different use cases.
By default, FluentCLI prints the response text to the terminal:
To format the response in markdown, use the --markdown-output
flag:
Example markdown output:
To extract and display only the code blocks from the response, use the --parse-code-output
flag:
Example extracted code:
To view the full JSON response, use the --full-output
flag:
Example JSON output:
FluentCLI can be integrated with other tools and services to enhance your workflow.
You can use FluentCLI in shell scripts to automate tasks:
FluentCLI supports piping data to and from other commands:
You can use FluentCLI with cron to schedule tasks:
Here are some examples to help you get started with FluentCLI.
Send a simple request to the "LocalGoogleGeminiChain" flow:
Send a request with additional context:
Upload an image file as part of the request:
Get the response in markdown format:
Extract and display only the code blocks:
If you encounter issues while using FluentCLI, this section provides some troubleshooting tips.
Invalid configuration file path: Ensure that the FLUENT_CLI_CONFIG_PATH
environment variable is set correctly.
Missing dependencies: Ensure that all required dependencies are installed, including Rust.
Network issues: Check network connectivity and ensure that the specified host and port are accessible.
Enable debug logging to get more detailed output:
If you encounter error messages, refer to the detailed error output and logs to diagnose the issue.
Here is a complete example of a JSON configuration file:
Here are the environment variables used in FluentCLI:
FLUENT_CLI_CONFIG_PATH: Path to the directory containing the configuration file.
RUST_LOG: Set to debug
to enable debug logging.
This concludes the documentation for FluentCLI. We hope you find it helpful and informative. If you have any questions or need further assistance, please refer to the troubleshooting section or contact support. Used Tools: