Wat is het REPLIT-bestandsformaat?
Een .replit-bestand is het configuratiebestand voor een project op het online ontwikkelplatform Replit, waar projecten Apps of Repls worden genoemd. Het is geschreven in .toml, een configuratieformaat in platte tekst, en bevindt zich in de hoofdmap van het project. Replit verbergt het standaard in de mappenstructuur, dus u moet het zichtbaar maken met de optie „Show hidden files”.
Het bestand vertelt de Replit-runtime hoe het project zich gedraagt. De sleutel entrypoint bepaalt welk bestand in de editor wordt geopend, run definieert het commando dat de Run-knop uitvoert, en modules legt de versies van de taal en toolchain vast. Benoemde tabellen zoals [nix], [deployment], [[ports]], [unitTest] en [packager] beheren systeempakketten, implementatiedoelen, poorttoewijzingen, tests en pakketbeheer. De waarde van run kan een gewone string zijn, een reeks argumenten of een object voor fijnmazigere controle.
Het .replit-bestand werkt samen met replit.nix, waarin systeemafhankelijkheden worden gedeclareerd via de Nix-pakketbeheerder. Samen beschrijven ze zowel de app als de omgeving. Replit, Inc. ontwikkelt en leest het formaat, en sinds 2023 biedt de webeditor automatische aanvulling en inline documentatie voor .replit-bestanden via de Taplo TOML-taalserver.
Beveiliging & veiligheid
RISICO: LOWA .replit file is plain-text TOML that stores configuration only; it contains no executable binary code. The main caution is that its run and deployment commands invoke real programs, so an untrusted .replit file could launch unwanted commands when a project is opened and run in Replit. Review the run, compile, and deployment keys before running an imported project. Do not store secrets or API keys in .replit; Replit provides a separate secrets manager for that.
Formaatdetails
in een notendopProgramma's die REPLIT-bestanden openen
.replit directly; install the Even Better TOML extension for syntax highlighting and schema validation. .replit with the Even Better TOML extension. .replit; add the Even Better TOML extension for validation. .replit file to edit it with autocomplete and inline documentation. Technische details
diepe specificaties| Encoding | UTF-8 plain text |
| Byte order | N/A (text file) |
| Container | None; single flat TOML document |
| Typical size | Under 2 KB |
| Structure | TOML document with top-level keys (entrypoint, run, modules, hidden, compile, language, audio) and named tables such as [nix], [deployment], [[ports]], [unitTest], [packager], and [run.env]. The run and deployment run values may be a string, an array of arguments, or an object. |
| Integrity | None built in |
| Platforms | Web (Replit platform), Linux (Nix-based Replit runtime), Windows, macOS |
| Notes | The file lives in the root of a Replit App and is hidden by default in the file tree. It pairs with replit.nix, which declares system packages via the Nix package manager. Since 2023 Replit provides autocomplete and inline documentation for .replit files through the Taplo TOML language server, driven by a JSON Schema generated from Replit's Go type definitions. |
| Run Command Forms | String, array of strings (command plus arguments), or object |
| Reader Software | Replit runtime and cloud IDE; any TOML parser can read the syntax |
| Uitgebracht | 2016 |
| Laatste versie | TOML-based schema (validated via Taplo LSP) |
| Open standaard | Ja · royaltyvrij |
| Specificatie | docs.replit.com |
REPLIT conversies
Community V&A
gevraagd door gebruikersNog geen vragen - wees de eerste om iets te vragen over REPLIT-bestanden.
Veelgestelde vragen
Hoe open ik een .replit-bestand?
.replit om het te bewerken. Buiten Replit kunt u het openen in elke tekstverwerker zoals Visual Studio Code, aangezien het platte tekst in TOML-formaat is.Waarom is het .replit-bestand verborgen?
Wat is het verschil tussen .replit en replit.nix?
.replit-bestand configureert hoe de app draait, wordt geïmplementeerd en welke taalmodules worden geladen met behulp van TOML. Het bestand replit.nix declareert systeempakketten via de Nix-pakketbeheerder. Ze werken samen maar zijn niet uitwisselbaar.