@kaluchi/jdtbridge
v1.3.0
Published
CLI for Eclipse JDT Bridge — semantic Java analysis via Eclipse JDT SearchEngine
Maintainers
Readme
@kaluchi/jdtbridge — CLI reference
CLI for JDT Bridge. Requires Eclipse running with the jdtbridge plugin installed.
Install
cd cli
npm install
npm link # registers `jdt` and `jdtbridge` global commandsPlugin setup
jdt setup # build + install into Eclipse
jdt setup --check # diagnostic: show status of all components
jdt setup --skip-build # reinstall last build
jdt setup --clean # clean build (mvn clean verify)
jdt setup --remove # uninstall plugin from Eclipse
jdt setup --eclipse <path> # specify Eclipse path (saved to config)If Eclipse is running, you will be prompted to stop it. After install, Eclipse restarts automatically with the same workspace.
Commands
Run jdt help <command> for detailed flags and examples. Most commands have short aliases.
Search & navigation
jdt projects # list workspace projects
jdt project-info <name> [--lines N] # (alias: pi) project overview
jdt find <Name|package> [--source-only] # find types by name, wildcard, or package
jdt references <FQMN> [--field <name>] # (alias: refs) references to type/method/field
jdt subtypes <FQN> # (alias: subt) all subtypes/implementors
jdt hierarchy <FQN> # (alias: hier) supers + interfaces + subtypes
jdt implementors <FQMN> # (alias: impl) implementations of interface method
jdt type-info <FQN> # (alias: ti) class overview (fields, methods)
jdt source <FQMN> # (alias: src) source code (project + libraries)Testing & building
jdt build [--project <name>] [--clean] # (alias: b) build project
jdt test <FQMN> [--timeout N] # run JUnit test class or method
jdt test --project <name> [--package <pkg>] # run tests in project/packageAll commands auto-refresh from disk. build is the only command that triggers explicit builds.
Diagnostics
jdt errors [--project <name>] [--file <path>] # (alias: err) compilation errors
jdt errors --warnings --all # include warnings and all marker typesFile paths are workspace-relative: my-app/src/main/java/.../Foo.java.
Refactoring
jdt organize-imports <file> # (alias: oi) organize imports
jdt format <file> # (alias: fmt) format code (Eclipse settings)
jdt rename <FQN> <newName> # rename type
jdt rename <FQMN> <newName> # rename method (FQMN includes method)
jdt rename <FQN> <newName> --field <old> # rename field
jdt move <FQN> <target.package> # move type to another packageEditor
jdt active-editor # (alias: ae) current file and cursor line
jdt open <FQMN> # open in Eclipse editorInstance discovery
The CLI reads ~/.jdtbridge/instances/*.json to find running Eclipse instances. Each file contains port, auth token, PID, and workspace path. Stale instances are filtered by PID liveness.
When multiple instances are running, use --workspace <hint> or the CLI picks the first live one.
Override the home directory with JDTBRIDGE_HOME environment variable.
Color output
Auto-detected from TTY. Override:
--color/--no-colorflagsFORCE_COLOR=1/NO_COLOR=1envJDTBRIDGE_COLOR=1env
Development
npm test # run tests
npm run test:watch # watch mode