JSPM

one-ide-cli

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2
  • Score
    100M100P100Q31088F
  • License MIT

CLI to access live IDE editor state published by the One-IDE plugin

Package Exports

  • one-ide-cli
  • one-ide-cli/build/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (one-ide-cli) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

one-ide-cli

CLI to access live IDE editor state published by the One-IDE plugin.

When running AI tools in the terminal (Claude CLI, Codex, Kiro CLI, etc.), the tool has no direct access to the IDE. The One-IDE plugin (JetBrains / VS Code) continuously writes editor state to ~/.one-ide/cluster/state.json. one-ide-cli reads that file and exposes the data as simple commands.

Installation

npm install -g one-ide-cli

Prerequisites

The One-IDE plugin must be installed and active in at least one IDE (JetBrains or VS Code/fork).

Commands

Active project root

one-ide-cli active-project
# /Users/you/project

Active file in a project

one-ide-cli active-file /Users/you/project
# /Users/you/project/src/main.ts

Returns the file currently focused in the IDE. Exits with an error if the given project path does not match the active project.

Open files in a project

one-ide-cli opened-files /Users/you/project
[
  "/Users/you/project/src/main.ts",
  "/Users/you/project/src/utils.ts",
  "/Users/you/project/README.md"
]

Active IDE name

one-ide-cli ide
# VSCode

Help

one-ide-cli --help

Using Editor Context in AI Prompts

# Pass active file to Claude CLI
PROJECT=$(one-ide-cli active-project)
ACTIVE=$(one-ide-cli active-file "$PROJECT")
claude "Review $ACTIVE for potential bugs."

# Pass all open files as context
PROJECT=$(one-ide-cli active-project)
FILES=$(one-ide-cli opened-files "$PROJECT")
claude "I have these files open: $FILES. Help me understand the overall structure."

# Kiro CLI
PROJECT=$(one-ide-cli active-project)
ACTIVE=$(one-ide-cli active-file "$PROJECT")
kiro "Review the file at $ACTIVE"