---
title: "Installation"
description: "Install @movk/core with your preferred package manager and start importing tree-shakable TypeScript utilities into your project in minutes."
canonical_url: "https://core.mhaibaraai.cn/en/docs/getting-started/installation"
---
# Installation

> Install @movk/core with your preferred package manager and start importing tree-shakable TypeScript utilities into your project in minutes.

## Getting Started

Add `@movk/core` to your project with your preferred package manager.

```bash [pnpm]
pnpm add @movk/core
```

```bash [yarn]
yarn add @movk/core
```

```bash [npm]
npm install @movk/core
```

```bash [bun]
bun add @movk/core
```

## Usage

> [!TIP]
> 
> @movk/core
> 
>  is fully modular and supports on-demand imports. All functions support Tree-Shaking.

### In a TypeScript/JavaScript Project

```typescript [utils.ts]
import { camelCase, chunk, debounce, parseUrl } from '@movk/core'

// Array operations
const items = [1, 2, 3, 4, 5, 6]
const chunked = chunk(items, 2) // => [[1, 2], [3, 4], [5, 6]]

// Async control
const handleSearch = debounce((query: string) => {
  console.log('Search:', query)
}, 300)

// URL handling
const url = parseUrl('https://example.com/path?foo=bar')
console.log(url.pathname) // => '/path'

// String transformation
const text = camelCase('hello-world') // => 'helloWorld'
```

### In a Vue Project

In addition to general utilities, you can use composables in Vue projects:

```vue [MyComponent.vue]
<script setup lang="ts">
import { debounce, upperFirst, useAppStorage } from '@movk/core'
import { ref } from 'vue'

// General utilities
const text = ref('hello world')
const capitalizedText = upperFirst(text.value) // => 'Hello world'

const handleInput = debounce(() => {
  console.log('Debounced input')
}, 300)

// Vue composable
const appState = useAppStorage('app-state', {
  theme: 'dark',
  count: 0
})

function increment() {
  appState.value.count++
}
</script>
```

> [!NOTE]
> 
> All functions support Tree-Shaking. In a production build, only the code you actually import and use will be bundled.


## Sitemap

See the full [sitemap](https://core.mhaibaraai.cn/sitemap.md) for all pages.
