Engineering Tools for AI

プログラミング

言語別実行環境

主要言語を実行するためのランタイム、コンパイラ、パッケージ管理、設定ファイルを整理したガイドです。

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.