Engineering Tools for AI

编程

按语言划分的运行环境

整理运行常见编程语言所需的 runtime、compiler、包管理器和配置文件。

34 个项目

通用概念

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.

通用概念

Compiler

Compiler

gcc main.c -o main

含义

A 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 main

请求示例

Tell me which compiler command is needed for this file.

通用概念

Interpreter

Interpreter

python3 main.py

含义

A 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.py

请求示例

Explain whether this language is interpreted or compiled in normal use.

通用概念

PATH

PATH

echo $PATH

含义

A 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 $PATH

请求示例

Check whether the needed runtime command is on PATH.

通用概念

Version check

Version check

python3 --version && node -v && go version

含义

A 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 version

请求示例

List the version check commands for this language.

通用概念

Package manager

Package manager

pip install requests

含义

A tool that installs and records third-party libraries.

使用场景

pip, npm, cargo, go modules, Maven, and Gradle all handle dependencies in different ecosystems.

示例

pip install requests

请求示例

Explain which package manager this project uses.

Python

python3

python3

python3 main.py

含义

The common command for running Python 3 scripts.

使用场景

Use it to run a .py file directly or to create a virtual environment.

示例

python3 main.py

请求示例

Show how to run this Python file.

Python

venv

venv

python3 -m venv .venv

含义

A 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 .venv

请求示例

Create and explain a Python virtual environment for this project.

Python

Activate venv

activate

source .venv/bin/activate

含义

Switches 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/activate

请求示例

Tell me whether the Python virtual environment is active.

Python

pip

pip

pip install requests

含义

Python'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 requests

请求示例

Check which Python environment this pip command uses.

Python

requirements.txt

requirements.txt

pip install -r requirements.txt

含义

A text file listing Python packages to install.

使用场景

Use it to recreate a project's Python package environment.

示例

pip install -r requirements.txt

请求示例

Install packages from requirements.txt in the active venv.

C

gcc

gcc

gcc main.c -o main

含义

A 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 main

请求示例

Compile this C file and explain the output executable.

C

clang

clang

clang main.c -o main

含义

A 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 main

请求示例

Check whether clang is installed and compile this C file.

C

.h header file

.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

Makefile

make

含义

A file that defines build commands and dependencies for make.

使用场景

Use it when compiling a C or C++ project needs multiple repeated commands.

示例

make

请求示例

Explain what this Makefile builds.

C++

g++

g++

g++ main.cpp -std=c++20 -o main

含义

A common compiler command for C++ source files.

使用场景

Use g++ instead of gcc when compiling C++ code.

示例

g++ main.cpp -std=c++20 -o main

请求示例

Compile this C++ file with the right standard option.

C++

C++ standard

C++ standard

-std=c++20

含义

A 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++20

请求示例

Tell me which C++ standard this code needs.

C++

CMake

CMake

cmake -S . -B build

含义

A 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 build

请求示例

Explain the CMake configure and build commands for this project.

Go

go

go

go version

含义

The 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 version

请求示例

Check the installed Go version.

Go

go run

go run

go run main.go

含义

Compiles and runs Go code in one command.

使用场景

Use it while developing a small Go program or testing a main package quickly.

示例

go run main.go

请求示例

Run this Go program and explain any errors.

Go

go.mod

go.mod

go mod init example.com/my-app

含义

The 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-app

请求示例

Explain what this go.mod file defines.

Go

go mod tidy

go mod tidy

go mod tidy

含义

Adds missing Go module requirements and removes unused ones.

使用场景

Use it after changing imports or before committing Go dependency changes.

示例

go mod tidy

请求示例

Run go mod tidy and summarize dependency changes.

JavaScript / Node.js

Node.js

Node.js

node index.js

含义

A 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.js

请求示例

Check whether this JavaScript code is meant for Node.js or the browser.

JavaScript / Node.js

npm

npm

npm install

含义

The default package manager installed with Node.js.

使用场景

Use it to install packages and run scripts defined in package.json.

示例

npm install

请求示例

Explain the npm scripts in this package.json.

JavaScript / Node.js

package.json

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

nvm use

含义

A tool for switching Node.js versions per project.

使用场景

Use it when a project requires a specific Node version.

示例

nvm use

请求示例

Check whether this project specifies a Node version.

Rust

rustup

rustup

rustup show

含义

The recommended tool for installing and managing Rust toolchains.

使用场景

Use it to install Rust, switch stable/nightly, or add targets.

示例

rustup show

请求示例

Check the active Rust toolchain.

Rust

rustc

rustc

rustc main.rs

含义

The Rust compiler.

使用场景

Use it for simple single-file Rust experiments, though real projects usually use cargo.

示例

rustc main.rs

请求示例

Explain whether this Rust project should use rustc or cargo.

Rust

cargo

cargo

cargo run

含义

Rust's package manager, build tool, test runner, and project runner.

使用场景

Use cargo run, cargo build, and cargo test for normal Rust projects.

示例

cargo run

请求示例

Run this Rust project with cargo and explain the output.

Rust

Cargo.toml

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

JDK

java -version

含义

The 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 -version

请求示例

Check whether a JDK is installed and which version is active.

Java

javac

javac

javac Main.java

含义

The 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.java

请求示例

Compile this Java file and explain the generated class file.

Java

java

java

java Main

含义

Runs compiled Java classes on the JVM.

使用场景

Use it after compiling a simple Java program with javac.

注意

Run java Main, not java Main.class.

示例

java Main

请求示例

Show the compile and run commands for this Java file.

Java

Maven / Gradle

Maven / Gradle

mvn test / ./gradlew test

含义

Common 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 test

请求示例

Tell me whether this Java project uses Maven or Gradle.