通用概念
Runtime
Runtime
node index.js含义
A program or environment that actually runs code.
使用场景
Node.js runs JavaScript, Python runs .py files, and the JVM runs compiled Java bytecode.
示例
node index.js请求示例
Explain which runtime this project needs.
编程
整理运行常见编程语言所需的 runtime、compiler、包管理器和配置文件。
34 个项目
通用概念
Runtime
node index.jsA program or environment that actually runs code.
Node.js runs JavaScript, Python runs .py files, and the JVM runs compiled Java bytecode.
node index.jsExplain which runtime this project needs.
通用概念
Compiler
gcc main.c -o mainA tool that turns source code into another form, often an executable file.
C, C++, Rust, Go, and Java usually need a compilation step before or during execution.
gcc main.c -o mainTell me which compiler command is needed for this file.
通用概念
Interpreter
python3 main.pyA program that reads and runs source code directly or with minimal preparation.
Python is commonly run through an interpreter, while C is commonly compiled first.
python3 main.pyExplain whether this language is interpreted or compiled in normal use.
通用概念
PATH
echo $PATHA list of folders the terminal searches when you type a command.
If python, node, go, cargo, or javac is not found, PATH is one of the first settings to check.
Editing PATH incorrectly can make normal commands disappear from the terminal.
echo $PATHCheck whether the needed runtime command is on PATH.
通用概念
Version check
python3 --version && node -v && go versionA command pattern for confirming which runtime or compiler version is installed.
Use it before debugging version-specific build or package errors.
python3 --version && node -v && go versionList the version check commands for this language.
通用概念
Package manager
pip install requestsA tool that installs and records third-party libraries.
pip, npm, cargo, go modules, Maven, and Gradle all handle dependencies in different ecosystems.
pip install requestsExplain which package manager this project uses.
Python
python3
python3 main.pyThe common command for running Python 3 scripts.
Use it to run a .py file directly or to create a virtual environment.
python3 main.pyShow how to run this Python file.
Python
venv
python3 -m venv .venvA per-project Python environment for isolating installed packages.
Use it when different projects need different package versions.
After creating it, activate the environment before installing packages.
python3 -m venv .venvCreate and explain a Python virtual environment for this project.
Python
activate
source .venv/bin/activateSwitches the terminal to use the Python and pip inside the virtual environment.
Use it before pip install or python commands in that project.
source .venv/bin/activateTell me whether the Python virtual environment is active.
Python
pip
pip install requestsPython's package installation tool.
Use it to install libraries listed by a project or needed by a script.
Make sure pip belongs to the same Python environment you will run.
pip install requestsCheck which Python environment this pip command uses.
Python
requirements.txt
pip install -r requirements.txtA text file listing Python packages to install.
Use it to recreate a project's Python package environment.
pip install -r requirements.txtInstall packages from requirements.txt in the active venv.
C
gcc
gcc main.c -o mainA common compiler for C source files.
Use it to turn main.c into an executable file.
Compiling creates an executable; it does not automatically run it.
gcc main.c -o mainCompile this C file and explain the output executable.
C
clang
clang main.c -o mainA C compiler commonly available on macOS through Xcode Command Line Tools.
Use it as an alternative to gcc for compiling C files.
clang main.c -o mainCheck whether clang is installed and compile this C file.
C
.h header file
#include "math_utils.h"A file that usually declares functions, types, constants, or shared interfaces for C code.
Use it when multiple .c files need to share declarations.
#include "math_utils.h"Explain how this header file connects to the C source files.
C
Makefile
makeA file that defines build commands and dependencies for make.
Use it when compiling a C or C++ project needs multiple repeated commands.
makeExplain what this Makefile builds.
C++
g++
g++ main.cpp -std=c++20 -o mainA common compiler command for C++ source files.
Use g++ instead of gcc when compiling C++ code.
g++ main.cpp -std=c++20 -o mainCompile this C++ file with the right standard option.
C++
C++ standard
-std=c++20A setting that tells the compiler which C++ language version to use.
Use it when code depends on features from C++17, C++20, or another standard.
A project can fail if the compiler is too old for the selected standard.
-std=c++20Tell me which C++ standard this code needs.
C++
CMake
cmake -S . -B buildA build configuration tool often used for C and C++ projects.
Use it when a project has CMakeLists.txt instead of a simple single-file compile command.
cmake -S . -B buildExplain the CMake configure and build commands for this project.
Go
go
go versionThe main command for running, building, testing, and managing Go modules.
Use it for go run, go build, go test, go mod, and dependency management.
go versionCheck the installed Go version.
Go
go run
go run main.goCompiles and runs Go code in one command.
Use it while developing a small Go program or testing a main package quickly.
go run main.goRun this Go program and explain any errors.
Go
go.mod
go mod init example.com/my-appThe file that defines a Go module and its dependency requirements.
Use it as the project boundary for Go dependency and import resolution.
go mod init example.com/my-appExplain what this go.mod file defines.
Go
go mod tidy
go mod tidyAdds missing Go module requirements and removes unused ones.
Use it after changing imports or before committing Go dependency changes.
go mod tidyRun go mod tidy and summarize dependency changes.
JavaScript / Node.js
Node.js
node index.jsA runtime for running JavaScript outside the browser.
Use it for backend scripts, build tools, and web framework tooling such as Next.js.
Browser JavaScript and Node.js do not have exactly the same APIs.
node index.jsCheck whether this JavaScript code is meant for Node.js or the browser.
JavaScript / Node.js
npm
npm installThe default package manager installed with Node.js.
Use it to install packages and run scripts defined in package.json.
npm installExplain the npm scripts in this package.json.
JavaScript / Node.js
package.json
"scripts": { "dev": "next dev" }A Node.js project file that records scripts, dependencies, and package metadata.
Use it to understand npm run dev, npm run build, and required packages.
"scripts": { "dev": "next dev" }Tell me what commands this package.json exposes.
JavaScript / Node.js
nvm
nvm useA tool for switching Node.js versions per project.
Use it when a project requires a specific Node version.
nvm useCheck whether this project specifies a Node version.
Rust
rustup
rustup showThe recommended tool for installing and managing Rust toolchains.
Use it to install Rust, switch stable/nightly, or add targets.
rustup showCheck the active Rust toolchain.
Rust
rustc
rustc main.rsThe Rust compiler.
Use it for simple single-file Rust experiments, though real projects usually use cargo.
rustc main.rsExplain whether this Rust project should use rustc or cargo.
Rust
cargo
cargo runRust's package manager, build tool, test runner, and project runner.
Use cargo run, cargo build, and cargo test for normal Rust projects.
cargo runRun this Rust project with cargo and explain the output.
Rust
Cargo.toml
[dependencies]The manifest file that defines a Rust package, metadata, and dependencies.
Use it to understand which crates the Rust project depends on.
[dependencies]Explain the dependencies in this Cargo.toml.
Java
JDK
java -versionThe Java Development Kit includes tools needed to compile and run Java programs.
Use it when a project needs javac, java, Maven, Gradle, or another Java build tool.
java -versionCheck whether a JDK is installed and which version is active.
Java
javac
javac Main.javaThe Java compiler that turns .java files into .class bytecode files.
Use it for simple Java files or to understand what build tools do internally.
javac Main.javaCompile this Java file and explain the generated class file.
Java
java
java MainRuns compiled Java classes on the JVM.
Use it after compiling a simple Java program with javac.
Run java Main, not java Main.class.
java MainShow the compile and run commands for this Java file.
Java
Maven / Gradle
mvn test / ./gradlew testCommon Java build tools for dependencies, tests, packaging, and project tasks.
Use Maven when a project has pom.xml and Gradle when it has build.gradle or gradlew.
mvn test / ./gradlew testTell me whether this Java project uses Maven or Gradle.