# Setting Up the Cheshire Cat: A Comprehensive Guide
Hatched by Alessio Frateily
Aug 28, 2025
4 min read
16 views
Setting Up the Cheshire Cat: A Comprehensive Guide
In the ever-evolving landscape of software development, setting up and configuring applications can sometimes feel like a labyrinth. The Cheshire Cat, a unique application that leverages a large language model (LLM), is no exception. This article serves as a comprehensive guide for installing and configuring the Cheshire Cat, ensuring a smooth user experience from start to finish. Additionally, we'll explore some critical aspects of environment management that can affect your setup, particularly when using Docker and integrating with language models like ChatGPT.
Understanding Environment Variables
To kick off the installation process, it's essential to understand the role of environment variables in your development environment. In recent updates to popular tools like Visual Studio Code, changes have been made regarding how environment variables are inherited. Specifically, the inheritEnv setting plays a crucial role in determining the behavior of terminal sessions.
When set to false, the shell level ($SHLVL) is reset to 1, and $PATH eliminates duplicate entries. This is particularly beneficial for those using Python virtual environments, which can be adversely affected by a cluttered $PATH. For Linux users, the terminal fetches the environment variables from the parent process, while macOS users receive a limited set of essential variables. Windows, however, is yet to see these improvements. Understanding these nuances can save you time and frustration during the installation process.
Installation Prerequisites
Before diving into the installation of the Cheshire Cat, ensure you have Docker and Docker Compose installed on your system. These tools are fundamental for containerization and will help manage the application's dependencies seamlessly.
- Install Docker: Follow the official instructions for your operating system.
- Install Docker Compose: Similarly, ensure you have Docker Compose installed, as it will be crucial for managing multi-container Docker applications.
Configuring the Cheshire Cat
Once the prerequisites are in place, follow these steps to configure the Cheshire Cat:
- Setting Up Your Project Directory
Create a dedicated folder on your machine for the Cheshire Cat. Inside this folder, create a file named compose.yml. This file will define the services your application will use.
- Configuring the Docker Compose File
Copy the following configuration into your compose.yml file:
services:
cheshire-cat-core:
image: ghcr.io/cheshire-cat-ai/core:latest
container_name: cheshire_cat_core
ports:
- 1865:80
- 5678:5678
volumes:
- ./static:/app/cat/static
- ./plugins:/app/cat/plugins
- ./data:/app/cat/data
This setup ensures that the necessary ports are exposed and that your application can access static files, plugins, and data directories.
- Starting the Application
Open a terminal inside the directory where you created compose.yml and run the following command:
docker compose up -d
Using the -d flag will start the container in the background, allowing you to continue using the terminal without interruption.
- Accessing the Admin Portal
Once the application is running, open your web browser and navigate to http://localhost:1865/admin. Log in with the credentials (username: admin, password: admin) to access the Admin Portal.
- Configuring the Large Language Model (LLM)
In the Admin Portal, go to the Settings tab to configure the LLM. If you're using ChatGPT, you will need an API key. Follow these steps to obtain one:
- Visit your OpenAI API Keys page.
- Create a new API key and copy it.
Paste the API key into the appropriate field in the settings and save your configuration.
Stopping and Managing the Application
To stop the Cheshire Cat, you can use the following command:
docker compose down
If you want to check the logs for any issues, run:
docker compose logs -f
This allows you to monitor the application’s output in real-time.
Actionable Advice for a Smooth Setup
-
Double-check Environment Variables: Before starting the application, ensure that your environment variables are correctly set up to prevent issues related to the
$PATHand$SHLVL. -
Use Version Control: Keep your
compose.ymland any other configuration files in a version control system like Git. This practice helps manage changes and roll back if necessary. -
Monitor Resource Usage: Running applications in Docker can consume considerable system resources. Monitor your CPU and memory usage to ensure your system remains responsive, especially if you are running multiple containers.
Conclusion
Setting up the Cheshire Cat involves both understanding the environment variables and following the correct installation steps. By paying attention to the nuances of Docker configuration and language model integration, you can create a powerful and efficient application setup. With the right preparations and configurations in place, you will be well on your way to leveraging the capabilities of the Cheshire Cat in your projects.
Sources
Hatch New Ideas with Glasp AI 🐣
Glasp AI allows you to hatch new ideas based on your curated content. Let's curate and create with Glasp AI :)
Start Hatching 🐣