{"id":25442047,"url":"https://github.com/ui-js/grok","last_synced_at":"2025-07-14T05:37:24.378Z","repository":{"id":42860919,"uuid":"259391384","full_name":"ui-js/grok","owner":"ui-js","description":"A tool to build beautiful documentation from TypeScript declaration files","archived":false,"fork":false,"pushed_at":"2023-03-10T04:20:56.000Z","size":1745,"stargazers_count":60,"open_issues_count":4,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-06T08:51:26.881Z","etag":null,"topics":["documentation","documentation-tool","typescript"],"latest_commit_sha":null,"homepage":"","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/ui-js.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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}},"created_at":"2020-04-27T16:37:53.000Z","updated_at":"2025-06-18T11:48:50.000Z","dependencies_parsed_at":"2024-06-20T23:35:16.571Z","dependency_job_id":null,"html_url":"https://github.com/ui-js/grok","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ui-js/grok","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ui-js%2Fgrok","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ui-js%2Fgrok/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ui-js%2Fgrok/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ui-js%2Fgrok/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ui-js","download_url":"https://codeload.github.com/ui-js/grok/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ui-js%2Fgrok/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265246229,"owners_count":23734111,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["documentation","documentation-tool","typescript"],"created_at":"2025-02-17T13:16:38.384Z","updated_at":"2025-07-14T05:37:24.348Z","avatar_url":"https://github.com/ui-js.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Grok\n\n\u003e **grok**: /grok/, /grohk/, vt.\n\u003e\n\u003e To understand. Connotes intimate and exhaustive knowledge.\n\n-- [The Jargon File](http://catb.org/jargon/html/G/grok.html)\n\nGrok turns a TypeScript declaration file into a beautiful, readable, web page.\n\n## Installation\n\n```bash\nnpm install --global @ui-js/grok\n```\n\n## Usage\n\nA `.tsconfig` file describing your project must be included. For example, if the\ninterface file to document is `index.d.ts`:\n\n```json\n{\n  \"compilerOptions\": {\n    \"declaration\": true,\n    \"emitDecoratorMetadata\": false,\n    \"esModuleInterop\": true,\n    \"experimentalDecorators\": false,\n    \"incremental\": true,\n    \"lib\": [\"es2020\"],\n    \"module\": \"es2020\",\n    \"moduleResolution\": \"node\",\n    \"noImplicitAny\": false,\n    \"noLib\": false,\n    \"removeComments\": false,\n    \"sourceMap\": true,\n    \"strictNullChecks\": true,\n    \"target\": \"es2020\",\n    \"types\": []\n  },\n  \"include\": [\"index.d.ts\"]\n}\n```\n\n```bash\n# Create documentation for the .d.ts file into the ./docs folder\ngrok index.d.ts --outDir docs\n```\n\n## Configuration\n\nConfiguration can be specified:\n\n- as a `grok` property in `package.json`\n- as a `grok.config.json`, `grok.config.yaml`, `grok.config.js` file in your\n  project\n- or as a specific file using the `--config` CLI option. In that case, the\n  config file will be used **in addition** to other configuration files that may\n  be present (it doesn't replace them)\n\nThe configuration can include the following keys:\n\n- `sdkName` The name of the SDK being documented\n- `exclude` An array of glob patterns to skip documenting, e.g. `'**/*.test.ts'`\n- `cssVariables` A dictionary of variables and their associated value which will\n  be attached to the `\u003cbody\u003e` tag.\n- `tutorialPath` Prefix added to the value of a `{@tutorial}` tag to determine\n  the URL to redirected to.\n\n  For example, `{@tutorial readme.html}` with\n  `tutorialPath = 'https://example.com/docs'` will redirect to\n  'https://example.com/docs/readme.html'\n\n- `externalReferences`: Set of symbols that have an external reference other\n  than the standard one (MDN).\n\n  Can be used for global symbols, or symbols referenced cross-module.\n\n- `modules` An array of module names that will be documented. This is useful\n  both to indicate the order in which the modules should be displayed in the\n  documentation and to 'hide' any unnecessary modules, while still preserving\n  their visibility to the parser.\n- `documentTemplate` A string or function which will be used to build the output\n  file. If a string, the following substitutions will be applied:\n\n  - `{{content}}` HTML markup of the documentation (suitable for as the content\n    of a `\u003cbody\u003e` tag)\n  - `{{sdkName}}` The name of the SDK, as indicated above\n  - `{{packageName}}`\n  - `{{moduleName}}` The name of the module being documented, if there is a\n    single one\n  - `{{className}}` The name of the first class being documented\n  - `{{directoryName}}` The name of the directory being documented\n\n  If a function, the function is passed an object literal with the following\n  properties: `content`, `sdkName`, `packageName` and `cssVariables` which is\n  the dictionary specified in the options.\n\n## Tags\n\nGrok supports the\n[standard tags](https://github.com/microsoft/tsdoc/blob/master/tsdoc/src/details/StandardTags.ts)\ndefined by tsdoc.\n\nThe `{@link symbol}` and its variants can use the tsdoc\n[standard declaration references](https://github.com/microsoft/tsdoc/blob/master/spec/code-snippets/DeclarationReferences.ts)\nto disambiguate which symbol to point to.\n\nGrok supports a few additional extensions, including:\n\n- `{@tutorial path | name} to create links to pages with more detailed\n  discussions\n- `{@linkcode symbol}` and `` [[`symbol` | title]] `` to create a link to a\n  symbold displayed as code (in monospace font)\n- `[[symbol]]` a synonym for `{@link symbol}`\n- `@keywords` followed by a comma separated list of words which can be used by\n  the search box\n\n````typescript\nexport type InlineShortcutsOptions = {\n  /** @deprecated Use:\n   * ```typescript\n   * mf.setConfig(\n   *      'inlineShortcuts',\n   *      {   ...mf.getConfig('inlineShortcuts'),\n   *          ...newShortcuts\n   *      }\n   * )\n   * ```\n   * to add `newShortcuts` to the default ones. See {@linkcode setConfig} */\n  overrideDefaultInlineShortcuts?: boolean;\n};\n````\n\n```typescript\n/**\n * Converts a LaTeX string to an Abstract Syntax Tree (MathJSON)\n *\n * **See:** {@tutorial MATHJSON | MathJson}\n *\n * @param latex A string of valid LaTeX. It does not have to start\n * with a mode token such as a `$$` or `\\(`.\n * @param options.macros A dictionary of LaTeX macros\n *\n * @return  The Abstract Syntax Tree as an object literal using the MathJSON format.\n * @category Converting\n * @keywords convert, latex, mathjson, ast\n */\nexport declare function latexToAST(\n  latex: string,\n  options?: {\n    macros?: MacroDictionary;\n  }\n);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fui-js%2Fgrok","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fui-js%2Fgrok","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fui-js%2Fgrok/lists"}