From cc2468cfd3ded4faad7ede9ebfc5e09ef2f0c0b7 Mon Sep 17 00:00:00 2001
From: Mendon Kissling <59585235+mendonk@users.noreply.github.com>
Date: Thu, 10 Jul 2025 11:59:18 -0400
Subject: [PATCH] docs: add windows related content (#8903)
* add-mac-uninstall-error
* windows-commands
* style
* Apply suggestions from code review
Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>
* tabs-and-tab-groups
---------
Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>
---
.../contributing-how-to-contribute.md | 191 +++++++++++++-----
docs/docs/Support/troubleshooting.md | 16 ++
2 files changed, 161 insertions(+), 46 deletions(-)
diff --git a/docs/docs/Contributing/contributing-how-to-contribute.md b/docs/docs/Contributing/contributing-how-to-contribute.md
index 9529a9477..bbe84aac5 100644
--- a/docs/docs/Contributing/contributing-how-to-contribute.md
+++ b/docs/docs/Contributing/contributing-how-to-contribute.md
@@ -3,6 +3,9 @@ title: Contribute to Langflow
slug: /contributing-how-to-contribute
---
+import Tabs from '@theme/Tabs';
+import TabItem from '@theme/TabItem';
+
This guide is intended to help you start contributing to Langflow.
As an open-source project in a rapidly developing field, Langflow welcomes contributions, whether it be in the form of a new feature, improved infrastructure, or better documentation.
@@ -18,6 +21,10 @@ Install Langflow from source by forking the repository, and then set up your dev
* [Node.js](https://nodejs.org/en/download/package-manager)
* [Make](https://www.gnu.org/software/make/#documentation)
+:::tip Windows
+For Windows installations, you don't need need Make, and you can find [Windows scripts](https://github.com/langflow-ai/langflow/tree/main/scripts/windows) in the Langflow repository.
+:::
+
### Clone the Langflow repository
1. Fork the [Langflow GitHub repository](https://github.com/langflow-ai/langflow).
@@ -32,74 +39,164 @@ Replace the following:
### Run Langflow from source
-If you're not developing, but want to run Langflow from source after cloning the repo, run:
+If you're not developing, but want to run Langflow from source after cloning the repo, run the following commands.
-```bash
-make run_cli
-```
+
+
-This command:
-- Installs frontend and backend dependencies
-- Builds the frontend static files
-- Starts the application with default settings
+ 1. To run Langflow from source, run the following command:
+ ```bash
+ make run_cli
+ ```
-The `make run_cli` command allows you to configure the application such as logging level, host, port, and environment variables.
+ This command does the following:
+ - Installs frontend and backend dependencies
+ - Builds the frontend static files
+ - Starts the application with default settings
-For example, this command starts Langflow with custom settings for the logging level, host binding, and port number, and specifies a custom `.env` file.
+ The Langflow frontend is available at `http://localhost:7860/`.
-```bash
-make run_cli log_level=info host=localhost port=8000 env=.env.custom
-```
+
+
-The `make run_cli` command accepts the following parameters:
+ To run Langflow from source on Windows, you can use the Langflow project's included scripts, or run the commands in the terminal.
-| Parameter | Default | Description |
-|-----------|---------|-------------|
-| `log_level` | `debug` | Set the logging level. Options: `debug`, `info`, `warning`, `error`, `critical` |
-| `host` | `0.0.0.0` | The host address to bind the server to. Use `localhost` or `127.0.0.1` for local-only access. |
-| `port` | `7860` | The port number to run the server on. |
-| `env` | `.env` | Path to the environment file containing configuration variables. |
-| `open_browser` | `true` | Whether to automatically open the browser when starting. Set to `false` to disable. |
+ 1. To run Langflow with the included scripts, navigate to the `scripts/windows` directory.
+ Two scripts are available to install and start Langflow.
+
+ 2. Run Langflow with one of the scripts.
+
+
+
+
+ To install and start Langflow with a Windows Batch file, double-click `build_and_run.bat`.
+
+
+
+
+ To install and start Langflow with the Powershell script, run:
+
+ ```ps
+ .\build_and_run.ps1
+ ```
+
+
+
+
+ **Alternatively**, to run Langflow from source with the Windows Command Line or Powershell, do the following.
+
+
+
+
+ 1. Run the following commands to build the Langflow frontend.
+ ```
+ cd src/frontend && npm install && npm run build && npm run start
+ ```
+
+ 2. Copy the contents of the built `src/frontend/build` directory to `src/backend/base/langflow/frontend`.
+
+ 3. To start Langflow, run the following command.
+ ```
+ uv run langflow run
+ ```
+
+ The frontend is served at http://localhost:7860.
+
+
+
+
+ 1. Run the following commands to build the Langflow frontend.
+ ```
+ cd src/frontend
+ npm install
+ npm run build
+ npm run start
+ ```
+
+ 2. Copy the contents of the built `src/frontend/build` directory to `src/backend/base/langflow/frontend`.
+
+ 3. To start Langflow, run the following command.
+ ```
+ uv run langflow run
+ ```
+
+ The frontend is served at http://localhost:7860.
+
+
+
+
+
+
### Set up your Langflow development environment
+
+
+
1. To set up the Langflow development environment, run the following command:
+ ```bash
+ make init
+ ```
-```bash
-make init
-```
-
-This command sets up the development environment by:
-- Checking for uv and npm.
-- Installing backend and frontend dependencies.
-- Installing pre-commit hooks.
+ This command sets up the development environment by doing the following:
+ - Checking for uv and npm.
+ - Installing backend and frontend dependencies.
+ - Installing pre-commit hooks.
2. Run the backend and frontend in separate terminals for development:
-```bash
-# Run backend in development mode (includes hot reload)
-make backend
+ ```bash
+ # Run backend in development mode (includes hot reload)
+ make backend
-# In another terminal, run frontend in development mode (includes hot reload)
-make frontend
-```
+ # In another terminal, run frontend in development mode (includes hot reload)
+ make frontend
+ ```
-The `make backend` and `make frontend` commands automatically install dependencies, so you don't need to run install commands separately.
+ The frontend is served at `http://localhost:7860`.
-3. (Optional) Install pre-commit hooks to help keep your changes clean and well-formatted. `make init` installs pre-commit hooks automatically.
+ The `make backend` and `make frontend` commands automatically install dependencies, so you don't need to run install commands separately.
-```bash
-uv sync
-uv run pre-commit install
-```
+3. Optional: Install pre-commit hooks to help keep your changes clean and well-formatted. `make init` installs pre-commit hooks automatically.
-:::note
-With pre-commit hooks installed, you need to use `uv run git commit` instead of `git commit` directly.
-:::
+ ```bash
+ uv sync
+ uv run pre-commit install
+ ```
+
+ :::note
+ With pre-commit hooks installed, you need to use `uv run git commit` instead of `git commit` directly.
+ :::
4. To test your changes, run `make lint`, `make format`, and `make unit_tests` before pushing to the repository.
To run all tests, including unit tests, integration tests, and coverage, run `make tests`.
+
+
+
+Since Windows does not include `make`, building and running Langflow from source uses `npm` and `uv`.
+
+To set up the Langflow development environment, run the frontend and backend in separate terminals.
+
+1. To run the frontend, run the following commands.
+
+ ```bash
+ cd src/frontend
+ npm install
+ npm run start
+ ```
+
+2. To run the backend, run the following command.
+
+ ```bash
+ uv run langflow run --backend-only
+ ```
+
+The frontend is served at `http://localhost:7860`.
+
+
+
+
### Debug
The repo includes a `.vscode/launch.json` file for debugging the backend in VSCode, which is faster than debugging with Docker Compose. To debug Langflow with the `launch.json` file in VSCode:
@@ -142,10 +239,12 @@ cd docs
4. To install dependencies and start a local Docusaurus static site with hot reloading, run:
```bash
-yarn install && yarn start
+yarn install
+yarn start
```
-The documentation will be available at `localhost:3000` and all the files are located in the `/docs` folder.
+The documentation is available at `localhost:3000`.
+The Markdown content files are located in the `langflow/docs/docs` folder.
5. Optional: Run `yarn build` to build the site locally and ensure there are no broken links.
diff --git a/docs/docs/Support/troubleshooting.md b/docs/docs/Support/troubleshooting.md
index ed8a57357..a125d4ebb 100644
--- a/docs/docs/Support/troubleshooting.md
+++ b/docs/docs/Support/troubleshooting.md
@@ -145,6 +145,22 @@ The cache folder location depends on your OS:
- **WSL2 on Windows**: `home//.cache/langflow/`
- **macOS**: `/Users//Library/Caches/langflow/`
+## Langflow uninstall issues
+
+The following issues can occur when uninstalling Langflow.
+
+### Dot directory isn't deleted when uninstalling Langflow Desktop on macOS
+
+On macOS, uninstalling Langflow Desktop deletes the `.app` file but doesn't delete files in `~/.langflow`, which includes files generated during usage like cache and settings.
+
+If you reinstall Langflow Desktop, it starts with the existing data from the previous installation.
+
+To fully remove a Langflow Desktop macOS installation, you must also delete `~/.langflow`:
+
+ ```bash
+ rm -rf .langflow
+ ```
+
## MCP server issues
- [Use MCP Inspector to test and debug flows](/mcp-server#test-and-debug-flows)