{"id":15017159,"url":"https://github.com/eth-p/obsidian-extra","last_synced_at":"2025-04-12T11:41:10.679Z","repository":{"id":65772826,"uuid":"599414447","full_name":"eth-p/obsidian-extra","owner":"eth-p","description":"Utilities for working with Obsidian's undocumented API in a version-agnostic manner.","archived":false,"fork":false,"pushed_at":"2023-03-25T09:04:12.000Z","size":77,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-26T06:23:40.852Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/eth-p.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}},"created_at":"2023-02-09T04:40:26.000Z","updated_at":"2025-03-07T05:57:22.000Z","dependencies_parsed_at":"2024-09-24T20:35:19.403Z","dependency_job_id":null,"html_url":"https://github.com/eth-p/obsidian-extra","commit_stats":{"total_commits":32,"total_committers":1,"mean_commits":32.0,"dds":0.0,"last_synced_commit":"613468cf3d28befb5fad0e8a5cfd0949dc1cbd26"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eth-p%2Fobsidian-extra","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eth-p%2Fobsidian-extra/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eth-p%2Fobsidian-extra/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eth-p%2Fobsidian-extra/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eth-p","download_url":"https://codeload.github.com/eth-p/obsidian-extra/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248563094,"owners_count":21125202,"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":[],"created_at":"2024-09-24T19:49:58.458Z","updated_at":"2025-04-12T11:41:10.658Z","avatar_url":"https://github.com/eth-p.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# obsidian-extra\n[![support Obsidian versions](https://img.shields.io/badge/Obsidian-1.1.0_--_1.1.15-blue?logo=obsidian)](https://obsidian.md/) [![total downloads](https://img.shields.io/npm/dt/obsidian-extra?label=Total\u0026logo=npm)](https://www.npmjs.com/package/obsidian-extra)\n\nUtilities for working with Obsidian's [undocumented API](https://github.com/eth-p/obsidian-undocumented) in a version-agnostic manner.\n\n## Installation\nUse `npm` or `yarn` to install type definitions for undocumented Obsidian APIs:\n\n```bash\nnpm install obsidian-extra\n```\n\n## Usage\nImport the desired function(s) and use them!\n\n```typescript\nimport { getEnabledPluginIDs, getPluginInstance } from \"obsidian-extra\";\n\n// Inside your Plugin class:\nconst enabledPluginInstances = getEnabledPluginIDs(this.app)\n\t.map((id) =\u003e getPluginInstance(this.app, id));\n```\n\nCertain functions are deemed \"unsafe\", as they have the ability to easily break Obsidian or interfere with the operation of other plugins. These functions are only available in the `obsidian-extra/unsafe` import.\n\n## Design Goals\n- **Tree-shakeable.**  \n  Using functions from `obsidian-extra` should only bring in exactly what they need.\n\n- **Safety first.**  \n  Functions should not have the ability to break Obsidian just by themselves, unless exported through the \"unsafe\" import.\n\n- **Simple abstraction.**  \n  No complicated classes and designs. A function does exactly what you need, only abstracting away the parts that could be accidentally misused.\n\n\n## Features\n\n### Workspace\n\n- [Get secondary window DOMs](./src/functions/getFloatingWindowRoots.ts)\n\n### Plugins\n\n- [List installed plugins](./src/functions/getInstalledPluginIDs.ts)\n- [List enabled plugins](./src/functions/getEnabledPluginIDs.ts)\n- [Get plugin instances](./src/functions/getPluginInstance.ts)\n- [Get plugin manifests](./src/functions/getPluginManifest.ts)\n- [Open plugin settings pane](./src/functions/openPluginSettings.ts)\n- [Enable plugins](./src/functions/enablePlugin.ts) (unsafe)\n- [Disable plugins](./src/functions/disablePlugin.ts) (unsafe)\n- [Reload plugins](./src/functions/reloadPlugin.ts) (unsafe)\n\n### Settings\n\n- [Close settings dialog](./src/functions/closeSettings.ts) (unsafe)\n\n### CSS\n\n- [List installed snippets](./src/functions/getInstalledSnippetIDs.ts)\n- [List enabled snippets](./src/functions/getEnabledSnippetIDs.ts)\n- [Check if snippet is installed](./src/functions/isSnippetInstalled.ts)\n- [Check if snippet is enabled](./src/functions/isSnippetEnabled.ts)\n- [Get style element of snippet](./src/functions/getSnippetStyleElement.ts)\n- [Get style elements of all snippets](./src/functions/getSnippetStyleElements.ts)\n- [List installed themes](./src/functions/getInstalledThemeIDs.ts)\n- [Get current theme ID](./src/functions/getCurrentThemeID.ts)\n- [Get theme manifest](./src/functions/getThemeManifest.ts)\n- [Get theme style element](./src/functions/getThemeStyleElement.ts)\n- [Check if theme is installed](./src/functions/isThemeInstalled.ts)\n- [Get current color scheme](./src/functions/getCurrentColorScheme.ts)\n- [Get Obsidian's CSS rules](./src/functions/fetchObsidianStyleSheet.ts)\n\n### Custom CSS\n\n- [Create a custom stylesheet at runtime](./src/functions/createCustomStyleSheet.ts)\n\n### View Registry\n\n- [Get registered view types](./src/functions/getRegisteredViewTypes.ts)\n- [Get registered file extensions](./src/functions/getRegisteredFileExtensions.ts)\n\n### Platform\n\n- [Get OS info](./src/functions/detectPlatformOperatingSystem.ts)\n- [Get runtime info](./src/functions/detectPlatformRuntime.ts)\n- [Get browser info](./src/functions/detectPlatformBrowser.ts)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feth-p%2Fobsidian-extra","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feth-p%2Fobsidian-extra","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feth-p%2Fobsidian-extra/lists"}