Skip to content

Turn any codebase, with its docs, SQL schemas, configs, and PDFs, into a queryable knowledge graph. A /graphify skill for Claude Code, Cursor, Codex, and Gemini CLI: local deterministic AST parsing, every edge explained, no vector store.

359 B
Raw Blame
require 'json'
require 'net/http'

class ApiClient
  def initialize(base_url)
    @base_url = base_url
  end

  def get(path)
    fetch(path, 'GET')
  end

  def post(path, body)
    fetch(path, 'POST')
  end

  private

  def fetch(path, method)
    uri = URI(@base_url + path)
    Net::HTTP.get(uri)
  end
end

def parse_response(raw)
  JSON.parse(raw)
end