{"id":51166342,"url":"https://github.com/shahradelahi/ts-code-frame","last_synced_at":"2026-06-26T19:02:24.089Z","repository":{"id":366805805,"uuid":"1273355065","full_name":"shahradelahi/ts-code-frame","owner":"shahradelahi","description":"🖼️ Visual terminal code frame pointer generator","archived":false,"fork":false,"pushed_at":"2026-06-23T10:50:34.000Z","size":55,"stargazers_count":3,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-06-23T12:53:05.824Z","etag":null,"topics":["code-frame","error-highlighting","syntax-error","terminal-pointer","typescript","visual-reporting"],"latest_commit_sha":null,"homepage":"https://npmjs.com/@se-oss/code-frame","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shahradelahi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-18T12:49:10.000Z","updated_at":"2026-06-23T10:50:40.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/shahradelahi/ts-code-frame","commit_stats":null,"previous_names":["shahradelahi/ts-code-frame"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/shahradelahi/ts-code-frame","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shahradelahi%2Fts-code-frame","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shahradelahi%2Fts-code-frame/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shahradelahi%2Fts-code-frame/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shahradelahi%2Fts-code-frame/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shahradelahi","download_url":"https://codeload.github.com/shahradelahi/ts-code-frame/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shahradelahi%2Fts-code-frame/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34829415,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-26T02:00:06.560Z","response_time":106,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["code-frame","error-highlighting","syntax-error","terminal-pointer","typescript","visual-reporting"],"created_at":"2026-06-26T19:02:20.539Z","updated_at":"2026-06-26T19:02:24.084Z","avatar_url":"https://github.com/shahradelahi.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\n  \u003csup\u003ets-code-frame\u003c/sup\u003e\n  \u003cbr\u003e\n  \u003ca href=\"https://github.com/shahradelahi/ts-code-frame/actions/workflows/ci.yml\"\u003e\u003cimg src=\"https://github.com/shahradelahi/ts-code-frame/actions/workflows/ci.yml/badge.svg?branch=main\u0026event=push\" alt=\"CI\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/package/@se-oss/code-frame\"\u003e\u003cimg src=\"https://img.shields.io/npm/v/@se-oss/code-frame.svg\" alt=\"NPM Version\"\u003e\u003c/a\u003e\n  \u003ca href=\"/LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/badge/License-MIT-blue.svg?style=flat\" alt=\"MIT License\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://bundlephobia.com/package/@se-oss/code-frame\"\u003e\u003cimg src=\"https://img.shields.io/bundlephobia/minzip/@se-oss/code-frame\" alt=\"npm bundle size\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://packagephobia.com/result?p=@se-oss/code-frame\"\u003e\u003cimg src=\"https://packagephobia.com/badge?p=@se-oss/code-frame\" alt=\"Install Size\"\u003e\u003c/a\u003e\n\u003c/h1\u003e\n\n_ts-code-frame_ is a visual terminal code frame pointer generator.\n\n---\n\n- [Installation](#-installation)\n- [Usage](#-usage)\n- [Documentation](#-documentation)\n- [Contributing](#-contributing)\n- [License](#license)\n\n## 📦 Installation\n\n```bash\npnpm add @se-oss/code-frame\n```\n\n\u003cdetails\u003e\n\u003csummary\u003eInstall using your favorite package manager\u003c/summary\u003e\n\n**npm**\n\n```bash\nnpm install @se-oss/code-frame\n```\n\n**yarn**\n\n```bash\nyarn add @se-oss/code-frame\n```\n\n\u003c/details\u003e\n\n## 📖 Usage\n\n### Basic Usage\n\nUse `createCodeFrame` to generate a pointer at a specific string index.\n\n```ts\nimport { createCodeFrame } from '@se-oss/code-frame';\n\nconst code = 'const a = 1;\\nconst b = 2;\\nconst c = 3;';\nconst result = createCodeFrame(code, 15);\nconsole.log(result);\n```\n\n### Advanced Code Frame\n\nUse `codeFrameColumns` to specify exact line and column ranges.\n\n```ts\nimport { codeFrameColumns } from '@se-oss/code-frame';\n\nconst code = 'const a = 1;\\nconst b = 2;\\nconst c = 3;';\nconst result = codeFrameColumns(code, {\n  start: { line: 2, column: 7 },\n  end: { line: 2, column: 8 },\n});\nconsole.log(result);\n```\n\n### Inline Messages\n\nAdd custom messages pointing to the error location.\n\n```ts\nconst result = codeFrameColumns(\n  code,\n  { start: { line: 2, column: 7 } },\n  { message: 'Unexpected token' }\n);\n```\n\n### Syntax Highlighting\n\nEnable colored output using native node utility styling.\n\n```ts\nconst result = codeFrameColumns(\n  code,\n  { start: { line: 2, column: 7 } },\n  { highlightCode: true }\n);\n```\n\n### Custom Line Boundaries\n\nControl context windows above and below the error.\n\n```ts\nconst result = codeFrameColumns(\n  code,\n  { start: { line: 2, column: 7 } },\n  {\n    linesAbove: 1,\n    linesBelow: 1,\n  }\n);\n```\n\n### Highlight Utility\n\nManually syntax highlight code snippets.\n\n```ts\nimport { highlight } from '@se-oss/code-frame';\n\nconst colored = highlight('const x = 42;');\n```\n\n## 📚 Documentation\n\nFor all configuration options, please see [the API docs](https://www.jsdocs.io/package/@se-oss/code-frame).\n\n## 🤝 Contributing\n\nWant to contribute? Awesome! To show your support is to star the project, or to raise issues on [GitHub](https://github.com/shahradelahi/ts-code-frame).\n\nThanks again for your support, it is much appreciated! 🙏\n\n## License\n\n[MIT](/LICENSE) © [Shahrad Elahi](https://github.com/shahradelahi) and [contributors](https://github.com/shahradelahi/ts-code-frame/graphs/contributors).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshahradelahi%2Fts-code-frame","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshahradelahi%2Fts-code-frame","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshahradelahi%2Fts-code-frame/lists"}