# Bun Get the absolute path of the current file

> Get the absolute path of the current file

- Skill: `jarle/bun-get-the-absolute-path-of-the-current-file` (Agent Skill)
- Install (CLI): `npx skillmds@latest add jarle/bun-get-the-absolute-path-of-the-current-file`
- Raw SKILL.md: https://api.skillmd.com/api/skills/jarle/bun-get-the-absolute-path-of-the-current-file/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: jarle (https://skillmd.com/u/jarle)
- Updated: 2026-09-21
- Page: https://skillmd.com/skills/jarle/bun-get-the-absolute-path-of-the-current-file

---


# Get the absolute path of the current file

Bun provides a handful of module-specific utilities on the [`import.meta`](/runtime/module-resolution#import-meta) object. Use `import.meta.path` to retrieve the absolute path of the current file.

```ts /a/b/c.ts icon="https://mintcdn.com/bun-1dd33a4e/nIz6GtMH5K-dfXeV/icons/typescript.svg?fit=max&auto=format&n=nIz6GtMH5K-dfXeV&q=85&s=5d73d76daf7eb7b158469d8c30d349b0" theme={"theme":{"light":"github-light","dark":"dracula"}}
import.meta.path; // => "/a/b/c.ts"
```

***

See [Docs > API > import.meta](/runtime/module-resolution#import-meta) for complete documentation.

