Optimize the RHEL command-line assistant tasks by using goose-redhat

Updated

Introduction to goose

Red Hat Enterprise Linux now offers the ability to interact with AI-driven assistance directly from your terminal. goose is an extensible, open source AI agent framework that you run locally and can use to automate complex engineering tasks by orchestrating LLM-driven conversations with tool execution. While the standard command-line assistant (CLA) provides a streamlined Q&A experience, the new goose package provides the potential for an extensible, agentic framework for advanced troubleshooting and workflow orchestration.
Red Hat provides two RHEL packages for goose integrations. The goose package provides the core agentic framework and command-line interface (CLI) tool. The goose-redhat package provides specific extensions and pre-configured contexts optimized for Red Hat Enterprise Linux (RHEL) environments.

IMPORTANT: The existing RHEL command-line assistant (CLA) is still available for use and integrated directly into the RHEL 10 and late RHEL 9 ecosystems. You can still install it by using standard RHEL AppStream repositories.

How to install the goose package on RHEL 9.8 and RHEL 10.2

This guide provides the basic information to help users get started with the goose-redhat and goose packages available in the RHEL Extensions repository. For more details on RHEL Extensions, see Red Hat Extensions Repository Support Policy.

Choose the installation path that matches your use case.

Prerequisites

  1. Sudo access.
  2. A valid RHEL 9.8 and RHEL 10.2 subscription with internet access.

Option 1: Installing the goose-redhat package

Use this if you have a Red Hat subscription and want an integrated, Red Hat-validated experience.

  1. Register your system (if it has not been registered yet) and enable the architecture-specific RHEL Extensions repository:
$ sudo subscription-manager register

For RHEL 9

$ sudo subscription-manager repos --enable=rhel-9-for-$(arch)-extensions-rpms

For RHEL 10

$ sudo subscription-manager repos --enable=rhel-10-for-$(arch)-extensions-rpms
  1. Install the package and initialize the Red Hat-specific profile:
$ sudo dnf install -y goose-redhat
  1. Open a new shell session for changes to take effect.
$ bash
  1. Verify the connection to the Red Hat provided back end:
$ goose info
$ goose run -t “What is the current OS version and kernel release?”

Option 2: Installing the goose package only

If you want to use goose as a generic agent with your own AI provider and API keys.

  1. Register your system (if it has not been registered yet) and enable the architecture-specific RHEL Extensions repository:
$ sudo subscription-manager register

For RHEL 9

$ sudo subscription-manager repos --enable=rhel-9-for-$(arch)-extensions-rpms

For RHEL 10

$ sudo subscription-manager repos --e
#### Switching to a custom providernable=rhel-10-for-$(arch)-extensions-rpms
  1. Install the goose package:
$ sudo dnf install -y goose

WARNING: When you perform an in-place upgrade from RHEL 9 to RHEL 10 by using the leapp utility on a system that contains the goose package, provide a target repository by adding the --enablerepo rhel-10-for-x86_64-extensions-rpms option to the leapp command. Otherwise, the goose-redhat package is deleted, which breaks the installation and leaves the system with only the goose-proxy-selinux-1.0.0-1.el9_8.noarch and goose-1.23.2-1.el9_8.x86_64 packages.

Switching to a custom provider

By default, goose-redhat is configured to interface with Red Hat’s internal services. To use your own provider (such as OpenAI, Anthropic, or a local LLM), follow these steps:

Procedure
  1. Initialize a new session with the configure option:
$ goose configure

Alternatively, you can bypass the default provider by exporting the relevant API keys for your preferred provider directly to your shell.
See Content from goose-docs.ai is not included.Supported LLM Providers for details about the configuration.

$ export OPENAI_API_KEY=<your_key_here>
  1. Verify the CLI is active and using your custom provider:
$ goose --version
$ goose info

Differences between the RHEL command-line assistant, goose-redhat package, and the goose package

RHEL provides multiple tools to assist administrators through generative AI. While they all aim to simplify system management, they differ in their integration with the Red Hat ecosystem and their level of autonomy.

Overview of tool capabilities

FeatureRHEL command-line assistantgoosegoose-redhat
Primary PurposeInteractive chat manual and troubleshooting guide.A general-purpose agent capable of connecting to third-party AI providers or local inference servers.A configuration package that enables goose to communicate with Red Hat’s internal inference infrastructure.
Operational ModeRead-only: Provides guidance and script suggestions.Full access to all upstream extensions. You can enable any extension, regardless of your goose-redhat configuration, because the package does not enforce extension restrictions.Autonomous: Can execute system tasks with manual approval.
Back endRed Hat provided back end.Bring Your Own Model (OpenAI, Anthropic, local, etc.).Red Hat provided back end
ConfigurationZero configuration required.Manual configuration of LLM providers required.Zero configuration required.
RepositoryStandard RHEL repositories (AppStream).RHEL Extensions repository.RHEL Extensions repository.

Tool-specific details

Command-line assistant

Best for: Understanding RHEL commands, explaining complex concepts, and generating Bash or Ansible snippets.
Capabilities: Provides general troubleshooting steps based on user-provided error messages or logs.
Technical note: Integrated into RHEL 10 and later RHEL 9 releases; cannot access the system directly.

goose

  • Best for: Users who prefer a "Bring Your Own Model" (BYOM) approach and want to operate independently of Red Hat infrastructure.
  • Capabilities: Provides full access to all open-source extensions.
  • Technical note: Lacks RHEL-specific tuning and pre-configured security defaults found in the integrated version.

goose-redhat (integrated)

  • Best for: Users who want a secure, agentic experience optimized for Red Hat-validated services.
  • Capabilities: Offers secure default settings, including manual approval for system changes. However, as goose-redhat does not overwrite existing user configurations, you must verify your settings to ensure these defaults are active.
  • Technical note: Installing this package automatically pulls in the goose and goose-proxy dependencies.

System Interaction and Security

FeatureRHEL command-line assistantgoosegoose-redhat
System accessNo direct access. You must manually copy and paste logs or data into your terminal.Direct access. Access is managed by the local goose configuration and user-defined extensions.After installing and configuring the RHEL MCP server, you can enable the agent to read files and execute commands directly.
Primary back endUses the Red Hat-provided back end, which leverages the Red Hat-provided back end stack, and Generative AI tuned on RHEL documentation and KCS articles. CLA connects to the Red Hat-provided inference backend designed for the command-line assistant integration.User-provided LLM. Connects to external or local providers chosen by the user, such as OpenAI and Anthropic.Uses the Red Hat provided back end, which leverages the Red Hat-provided back end stack and Generative AI tuned on RHEL documentation and KCS articles.
Default safetyProvides only text recommendations.Security and safety guardrails are dependent on the user-provided LLM and local config.Advanced features are disabled by default. Red Hat ships goose-redhat with secure defaults and will not overwrite your custom configuration. You must manually enable features such as reading local files, if desired.
Operation typeRead-only and informational.Agentic (action-oriented).Agentic (action-oriented).

Supported architectures

All three tools are available on the following architectures:

  • AMD and Intel 64-bit (x86_64)
  • ARM64 (aarch64)
  • IBM Z (s390x)
  • IBM POWER systems (ppc64le)

Configure goose-proxy

If you want to change some parameters, such as the proxy server, you can configure the goose-proxy component to use the Red Hat-provided back end with the goose-redhat package.

When you install the goose-proxy package, it automatically installs goose-proxy-selinux, which provides the SELinux policy rules required by the systemd unit files that goose-proxy includes.

The goose-proxy acts as a critical intermediary between the local goose client and the Red Hat-provided back-end infrastructure. Its primary responsibilities include:

  • Translation: Converting goose-standard requests into a format compatible with the Red Hat-provided backend services.
  • Security: Ensuring a secure, encrypted tunnel for data transmission to Red Hat's provided backend.

Prerequisites

  • The goose-redhat package is installed
  • Administrator (root) privileges.
  • Active internet connectivity.
  • A valid RHEL subscription.

Procedure

  1. Verify if the goose-proxy service is active on your system:
$ systemctl status goose-proxy
  1. Configure the /etc/xdg/goose-proxy/config.toml file parameters:
- timeout: HTTP requests timeout(default: 30).
- proxy: The proxy server URL to be used to route requests before reaching the Red Hat provider back end service.
- workers: Number of workers capable of handling requests locally (default: 1).

Troubleshooting

If you encounter issues connecting to the Red Hat-provided back end, check the following:

- Proxy Logs: Review logs by using `journalctl -u goose-proxy` to identify authentication or timeout errors.
- Network Access: Ensure the system has outbound access to the Red Hat API endpoints on port 443.
- Certificate Validity: Verify that the system's entitlement certificates are current by using `subscription-manager list`.

Configure the MCP server for goose

The goose package supports integration with the Red Hat Enterprise Linux (RHEL) Model Context Protocol (MCP) server, an optional component that provides the agent with deep system visibility for advanced troubleshooting.

  • Installation: You must install and configure the RHEL MCP server separately.
  • Configuration: You can enable the connection in the goose configuration file.
  • Security: To protect the host environment, goose uses guarded command execution when interacting with the MCP server.
  • Flexibility: Although the MCP server is RHEL-specific, you can host the underlying large language model (LLM) anywhere, including locally or by using a cloud API.
  • Configure the Model Context Protocol (MCP) server for goose, to enable the RHEL connection to your target machine by using a secure SSH-based connection.

goose is a versatile developer agent that you can configure for troubleshooting by connecting to relevant MCP tools. The configuration is strictly focused on read-only access to system telemetry such as journalctl and systemctl. You can use Goose to connect to the RHEL MCP server for read-only troubleshooting tasks.

Prerequisites

  • A client machine with the operating system of your choice.
  • A RHEL target machine.
  • SSH connectivity between the host running the MCP server and the RHEL target machine.
  • Python 3.11 or later. While RHEL 9.x includes Python 3.9 by default, the MCP server requires features found in newer versions.

Procedure

  1. On the RHEL target machine, create a non-root user. Access the VM by SSH and run the following commands:
$ sudo useradd mcp
$ sudo passwd mcp
  1. On your local machine, generate an SSH keypair for the MCP agent:
$ ssh-keygen -t ed25519 -f ~/.ssh/id_ed25519_mcp -C "rhel-mcp-agent" -N ""
  1. Authorize the key for the local mcp user:
$ ssh-copy-id -i ~/.ssh/id_ed25519_mcp.pub mcp@<target-machine-ip>
  1. Install the Linux MCP Server:

On RHEL 9: Install Python 3.12 from AppStream and use it to install the server:

```
$ sudo dnf install python3.12 python3-pip
$ pip install --user uv
$ uv tool install linux-mcp-server --python python3.12
```

On RHEL 10: Install the default Python and the server:

```
$ sudo dnf install python3 python3-pip
$ pip install --user uv
$ uv tool install linux-mcp-server
```
  1. Configure goose by following these steps:

    5.1 Run the goose configure command:

    $ goose configure
    

    5.2 Select the Command-line Extension option and provide the following details when prompted:

    - Name: `linux-mcp-server`
    - Command to run: `/home/<your_user>/.local/bin/linux-mcp-server`
    - Timeout: `300`
    - Description: `Linux MCP server`
    

    5.3 Optional: Add environment variables to configure the Linux MCP server.

Verification

  1. Start a new goose session:
$ goose
  1. Ask the following question to verify the configuration:
goose "Check the status of the httpd service and show me any recent errors in the logs.

Move from the RHEL command-line assistant to goose

If you are currently using the RHEL command-line assistant and want to migrate to goose, follow these steps:

Prerequisites

  • Your system is registered with a valid Red Hat subscription.
  • You have installed the RHEL command-line assistant.

Procedure

  1. Install the goose-redhat package:
$ sudo dnf install goose-redhat

Installing goose-redhat automatically installs necessary dependencies, including the goose engine and goose-proxy for Red Hat subscription authentication.

Verification

  1. Open a new terminal to initialize the goose-redhat package environment variables and aliases that point to the Red Hat-provided back end.

  2. Verify goose:

$ goose run -t "Analyze my recent journalctl errors related to httpd"

Use the goose CLI

Get started with goose

ActionDescriptionUsage
Launch gooseStarts the default interactive environment for the AI agent.goose
View helpDisplays a full list of available commands, subcommands, and global flags.goose --help
ConfigureOpens the setup menu to manage LLM providers and extensions.goose configure
Session(chat)Sends a specific question or instruction once inside an active session.(0)> In 1 sentence, describe what RHEL is
ExitTerminates the current session and returns to your shell.CTRL+d

Frequently Asked Questions (FAQ)

Q: Can I opt out of these AI tools, such as goose-redhat or RHEL command-line assistant?
A: Yes, you can opt out of AI features by not installing or at any time by uninstalling the command-line-assistant or goose-redhat packages. No AI data processing occurs unless these tools are explicitly installed by an administrator.

Q: Is goose available in the standard RHEL 10 BaseOS repository?
A: No, goose is available through RHEL Extensions.

Q: Does installing goose require a reboot?
A: No, the installation is a standard RPM package deployment and does not require a system restart. However, to ensure the new environment variables and paths are correctly loaded, you will need to log out and log back in.

Q: What if I already had goose configured?
A: Verify your version with goose --version after logging back in.

Submit feedback for AI-generated responses in goose

Provide feedback to help us improve the accuracy, tone, and helpfulness of AI-generated responses by goose.

Prerequisites

Review this article for operational details and standardized instructions to provide impactful feedback.

Procedure

  1. Copy the specific AI response you are referencing.
  2. Send your comments, suggestions, or quality reports, along with the copied AI response, to rhel-goose-feedback [at] redhat [dot] com. Ensure you remove any sensitive or personal details from the AI response before submitting.
    2.1 Ensure to use [goose-Feedback] in your subject line for faster routing.
Category
Article Type