import type { TinkerConfig } from '@stacksjs/tinker'; export type { TinkerConfig } from '@stacksjs/tinker'; /** * Start a Stacks REPL session. * * This is the main entry point for `buddy tinker` and `buddy repl`. * It launches Bun's official REPL (`bun repl`) with all Stacks framework * modules preloaded as globals — `db`, `config`, every ORM model, * `cache`, `queue`, etc. all available without imports. * * @example * ```ts * import { startRepl } from '@stacksjs/repl' * * // Interactive session * await startRepl() * * // With custom preloaded modules * await startRepl({ * preload: ['lodash', 'dayjs'], * }) * * // Evaluate and exit * await startRepl({ print: 'await User.count()' }) * * // Show registered routes when the session opens * await startRepl({ showRoutes: true }) * * // App-specific bootstrap — runs before the prompt * await startRepl({ * bootstrap: `globalThis.me = await User.firstOrFail({ email: 'me@example.com' })`, * }) * ``` */ export declare function startRepl(config?: ReplConfig): Promise<{ exitCode: number }>; /** * Lower-level entry that bypasses the bootstrap / route printing * conveniences and forwards straight to `bun repl`. Use this if you * need the bare wrapper (e.g. when scripting your own REPL launcher). */ export declare function startBunRepl(config?: TinkerConfig): Promise<{ exitCode: number }>; export declare interface ReplConfig extends TinkerConfig { loadFile?: string bootstrap?: string showRoutes?: boolean } // Re-export everything from tinker export { startTinker, tinkerEval, tinkerPrint, getHistoryPath, readHistory, appendHistory, clearHistory, } from '@stacksjs/tinker';