Skip to content

0.9.x SDK/programmatic API usage: timeline and plan? #354

@lst016

Description

@lst016

Context

We use CodeGraph as an embedded library inside an Electron app (tech-cc-hub), calling the programmatic API directly rather than via CLI or MCP. Our current integration is on 0.8.0.

Problem

We tried upgrading to 0.9.3 and found:

  1. @colbymchenry/codegraph@0.9.3 is now a thin CLI shim. No TypeScript types (types: null), no JS entry point (main: null, exports: null), and no internal modules (dist/db/, dist/config.js, dist/utils.js).

  2. The actual code lives in the platform-specific optional dependency (e.g. @colbymchenry/codegraph-darwin-arm64/lib/) which does work with require(), but the main package doesn't re-export anything.

  3. require("@colbymchenry/codegraph") fails with MODULE_NOT_FOUND at runtime.

  4. CodeGraphConfig type and config.js module were removed entirely.

  5. SQLite backend changed to node:sqlite (needs Node >= 22.5). Unclear if Electron's bundled Node supports this.

Questions

  1. Is a programmatic/embedded SDK API planned for the 0.9.x line, or is CLI+MCP the only intended usage going forward?

  2. If SDK support is planned, rough timeline?

  3. For node:sqlite — any fallback planned for environments without it (e.g. Electron)?

  4. Would you accept a PR adding main/types/exports to the main package to re-export the platform package's public API?

Our 0.8.0 usage

We use these exports directly:

  • CodeGraph class (constructor with db + queries + config)
  • initGrammars() / loadGrammarsForLanguages()
  • DatabaseConnection.open() / initialize()
  • QueryBuilder
  • validateConfig() / createDefaultConfig()
  • FileLock

Thanks for the great project! Happy to help with testing or PRs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions