REPLIT ファイル形式とは?
.replit ファイルは、オンライン開発プラットフォーム Replit 上のプロジェクト(App または Repl と呼ばれます)の設定ファイルです。これはプレーンテキストの設定形式である .toml で記述されており、プロジェクトのルートフォルダに配置されます。Replit ではデフォルトでファイルツリーから非表示になっているため、«Show hidden files»(隠しファイルを表示)オプションで表示させる必要があります。
このファイルは、プロジェクトがどのように動作するかを Replit ランタイムに伝えます。entrypoint キーはエディタで開かれるファイルを設定し、run は «実行» ボタンが実行するコマンドを定義し、modules は言語とツールチェーンのバージョンを固定します。[nix]、[deployment]、[[ports]]、[unitTest]、[packager] などの名前付きテーブルは、システムパッケージ、デプロイ先、ポートマッピング、テスト、およびパッケージ管理を処理します。run の値は、単純な文字列、引数の配列、またはより詳細な制御のためのオブジェクトにすることができます。
.replit ファイルは、Nix パッケージマネージャーを介してシステム依存関係を宣言する replit.nix と連携して動作します。これら2つのファイルによって、アプリとその環境の両方が記述されます。Replit, Inc. がこの形式を開発および読み取りしており、2023年以降、ウェブエディタは Taplo TOML 言語サーバーを介して .replit ファイルのオートコンプリートとインラインドキュメントを提供しています。
セキュリティと安全性
リスク: 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.
形式の詳細
概要REPLIT ファイルを開くプログラム
.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. 技術的詳細
詳細仕様| 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 |
| リリース日 | 2016 |
| 最新バージョン | TOML-based schema (validated via Taplo LSP) |
| オープンスタンダード | はい · ロイヤリティフリー |
| 仕様書 | docs.replit.com |
REPLIT の変換
コミュニティ Q&A
ユーザーからの質問まだ質問はありません。REPLIT ファイルについて最初の質問をしてみましょう。
よくある質問
.replit ファイルを開くにはどうすればよいですか?
.replit をクリックして編集します。Replit 以外では、プレーンテキストの TOML であるため、Visual Studio Code などの任意のテキストエディタで開くことができます。なぜ .replit ファイルは隠されているのですか?
.replit と replit.nix の違いは何ですか?
.replit ファイルは、TOML を使用してアプリの実行、デプロイ、およびロードする言語モジュールを設定します。replit.nix ファイルは、Nix パッケージマネージャーを介してシステムパッケージを宣言します。これらは連携して動作しますが、互換性はありません。