permix
Version:
Permix is a lightweight, framework-agnostic, type-safe permissions management library for JavaScript applications on the client and server sides.
40 lines (24 loc) • 1.23 kB
Markdown
# Permix
[](https://npmjs.com/package/permix) 
Permix is a lightweight, framework-agnostic, type-safe permissions management library for JavaScript applications on the client and server sides.
## Documentation
You can find the documentation [here](https://permix.letstri.dev).
## Example
To quick start you only need to write the following code:
```ts
import { createPermix } from 'permix'
const permix = createPermix<{
post: ['read']
}>()
permix.setup({
post: {
read: true,
},
})
permix.check('post.read') // true
```
Permix has other powerful features, so here's check out the [docs](https://permix.letstri.dev/docs) or the [examples](https://github.com/letstri/permix/tree/main/examples) directory.
## Agent skills
Permix ships [versioned agent skills](permix/skills/README.md) inside the npm package. Install `permix`, then copy the skill folders you want out of `node_modules/permix/skills/` into your agent config directory. They update when you update the package.
## License
MIT License - see the [LICENSE](https://github.com/letstri/permix/blob/main/LICENSE) file for details