Reading the repo
Opening the box…
Reading the repo
Opening the box…
Assembly instructions
Enhanced ChatGPT Clone: Features Agents, MCP, Skills, DeepSeek, Anthropic, AWS, OpenAI, Responses API, Azure, Groq, o1, GPT-5, Mistral, OpenRouter, Vertex AI, Gemini, Artifacts, AI model switching, message search, Code Interpreter, langchain, DALL-E-3, OpenAPI Actions, Functions, Secure Multi-User Auth, Presets, open-source for self-hosting. Active
GitHub didn't answer, so this is the saved copy from 12 h ago
Will it work on macOS?
Also: Docs ↗ · In the browser ↗
Heads-upBuilding it yourself? It also needs MongoDB, Meilisearch and 215 settings in .env (46 secret).
.github/CONTRIBUTING.mdThank you to all the contributors who have helped make this project possible! We welcome various types of contributions, such as bug reports, documentation improvements, feature requests, and code contributions.
If the feature you would like to contribute has not already received prior approval from the project maintainers (i.e., the feature is currently on the roadmap), please submit a request in the Feature Requests & Suggestions category of the discussions board before beginning work on it. The requests should include specific implementation details, including areas of the application that will be affected by the change (including designs if applicable), and any other relevant information that might be required for a speedy review. However, proposals are not required for small changes, bug fixes, or documentation improvements. Small changes and bug fixes should be tied to an issue and included in the corresponding pull request for tracking purposes.
Please note that a pull request involving a feature that has not been reviewed and approved by the project maintainers may be rejected. We appreciate your understanding and cooperation.
If you would like to discuss the changes you wish to make, join our Discord community, where you can engage with other contributors and seek guidance from the community.
AI coding agents are welcome here. A good part of this project is written with them, and we do not judge a pull request by whether a model helped write it. What we do ask is that agent-assisted work arrives the same way human work always has: attached to an issue, claimed in the open, and expected by someone.
An agent makes a patch cheap to produce, which moves the whole cost of it onto the person reviewing it. Maintainer review time is the scarce resource in this project, so the rules below are about protecting that, not about which tools you use.
A pull request that appears unannounced, with no issue, no assignment and no prior conversation, may be closed without review no matter how good the patch is. Features need prior approval as described above; agent assistance does not exempt a feature from the roadmap or the discussions board.
The one exception is a novel P0/P1 defect: data loss, a broken release, a crash, or a regression with no workaround, that nobody has reported yet. Open it, and put the impact and the reproduction in the first paragraph. Novel is the operative word. A patch for something already reported, already assigned, or already fixed on dev is not an exception, and neither is a cosmetic or speculative change dressed up as urgent.
Security is never an exception. Do not open a pull request, an issue, or a public message that describes a vulnerability, even a critical one, and even with a fix attached. A pull request is a public disclosure that explains the attack and points at the affected code. Report it through LibreChat's private vulnerability reporting form and we will open a private channel and coordinate the fix and its release there. See SECURITY.md.
A pull request produced by pointing an agent at our issue tracker will be rejected unless the issue it addresses was assigned to you. Sweeping open issues and emitting patches for them is not a contribution; it asks a maintainer to review work they never scoped, on an issue that may already belong to someone else. Being first to a patch does not claim an issue, and an issue assigned to another contributor is not available even if your fix is better.
These are patterns we actually receive, not hypotheticals:
git config core.autocrlf input on Windows). An unreadable diff hides things, including reverts of recent commits your branch predates.A maintainer, or one of the agents working alongside us, may push commits to your branch and take a pull request the rest of the way instead of asking you for another round. That is the house style here, and it is meant as help rather than a takeover: the branch stays yours, and so does the authorship.
If you would rather finish the work yourself, say so in the pull request description. One line is enough, and we will keep our suggestions in review instead.
We strive to maintain a positive and inclusive environment within our project community. We expect all contributors to adhere to the following standards:
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that do not align with these standards.
npm run smart-reinstall to install dependencies (uses Turborepo). Use npm run reinstall for a clean install, or npm ci for a fresh lockfile-based install.npm run build..env.test: cp api/test/.env.test.example api/test/.env.test.npm run test:api.npm run test:client..env: cp .env.example .env.mongosh connects to your local instance.npx install playwright, then npx playwright install.config.local: cp e2e/config.local.example.ts e2e/config.local.ts.librechat.yaml: cp librechat.example.yaml librechat.yaml.npm run e2e.dev from this repository. You are working in a fork, so origin is
your fork — add the canonical remote once and sync from it:
git remote add upstream https://github.com/LibreChat-AI/LibreChat.gitgit fetch upstream dev && git checkout -B dev upstream/devnpm run update is the self-host deployment updater — it checks out main and rebuilds your
containers. Do not use it to refresh a development branch.npm run lint. Alternatively, ensure husky pre-commit checks are functioning.
npm install sets the hooks up for you; set HUSKY=0 to opt out.npm run static-checks, against a base ref with npm run static-checks -- --against origin/dev, or with the slow gates (TypeScript, config migration tests, unused i18n keys, unused npm packages) via npm run static-checks:full.dev. It refuses a push from a worktree with uncommitted or untracked changes, or of a ref that is not checked out, because the checks read the working tree; commit or move those changes aside, or bypass with git push --no-verify (CI still runs). A pass is remembered, so pushing the same content again does not rerun it.npm run reinstall and ensure everything still works.
npm run build.npm run test:api.npm run test:client.npm run e2e.We utilize a GitFlow workflow to manage changes to this project's codebase. Follow these general steps when contributing code:
dev with a descriptive slash-based name (e.g., new/feature/x). All contributions target dev; main only moves at release time, and pull requests opened against it are retargeted automatically.feat: Add new feature X to the project).dev with a clear and concise description of your changes and the reasons behind them.dev branch.We follow the semantic format for commit messages.
feat: add hat wobble
^--^ ^------------^
| |
| +-> Summary in present tense.
|
+-------> Type: chore, docs, feat, fix, refactor, style, or test.
* Update Br.tsx
* Update Es.tsx
* Update Br.tsx
When submitting a pull request, please follow these guidelines:
Ensure that your changes meet the following criteria:
git rebase or git merge --squash to clean your commit history before submitting the pull request.Apply the following naming conventions to branches, labels, and other Git-related entities:
new/feature/x).bug-fix).helperFunction.ts, ReactComponent.tsx).config_files.md).For detailed coding conventions, workspace boundaries, and architecture guidance, refer to the AGENTS.md file at the project root. It covers code style, type safety, import ordering, iteration/performance expectations, frontend rules, testing, and development commands.
Original State: The project was initially developed entirely in JavaScript (JS).
Frontend: Fully transitioned to TypeScript.
Backend:
/api as JavaScript./packages/api, which is compiled and consumed by /api./packages/data-schemas (TypeScript)./packages/data-provider (TypeScript)./api; prefer adding TypeScript code to /packages/api and importing it.Imports are organized into three sections (in order):
Package imports — sorted from shortest to longest line length.
react is always the first import.import type imports — sorted from longest to shortest line length.
Local/project imports — sorted from longest to shortest line length.
~ are treated the same as relative imports with respect to line length.import type { ... } for type imports; never use inline type keyword inside value imports (e.g., import { Foo, type Bar } is wrong).Note: ESLint will automatically enforce these import conventions when you run npm run lint --fix or through pre-commit hooks.
For the full set of coding standards, see AGENTS.md.
Then run bash setup.sh. It stops at the first error and is safe to run again. Servers and tests aren't started; it lists them at the end. Read it first.
Needs Git: xcode-select --install
git clone https://github.com/LibreChat-AI/LibreChat.git cd LibreChat
Node.js 24.22.1
# needs nvm: brew install nvm (or https://github.com/nvm-sh/nvm) nvm install nvm use
Fill in secrets: CREDS_KEY, OPENAI_API_KEY, FERRETDB_PG_PASSWORD, CHAT_SEARCH_BOOTSTRAP_PASSWORD, CHAT_SEARCH_OWNER_PASSWORD, CHAT_SEARCH_WRITER_PASSWORD, CHAT_SEARCH_READER_PASSWORD, CLICKHOUSE_PASSWORD
cp .env.example .env
Needs: MongoDB, Meilisearch
brew install --cask docker # Docker Desktop docker compose -f docker-compose.yml up -d
npm ci
No reports for macOS yet.
GitManual AI Agent reads the 16 key files and writes a step-by-step guide for macOS. Once written, it's saved for everyone.