https://github.com/web-dev-sam/toolry
A wrapper library around citty and @clack/prompts to create a beautiful devtool cli with no boilerplate.
https://github.com/web-dev-sam/toolry
Last synced: about 1 month ago
JSON representation
A wrapper library around citty and @clack/prompts to create a beautiful devtool cli with no boilerplate.
- Host: GitHub
- URL: https://github.com/web-dev-sam/toolry
- Owner: web-dev-sam
- Created: 2026-03-19T19:58:21.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2026-03-19T20:00:47.000Z (2 months ago)
- Last Synced: 2026-03-20T11:12:24.420Z (2 months ago)
- Language: TypeScript
- Homepage:
- Size: 38.1 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# toolry
A beautiful, plugin-based CLI toolkit. Define commands in small TypeScript plugin files, wire them together with a shell alias, and get a fully interactive, categorised CLI with zero boilerplate. Useful for remembering complex commands that aren't used frequently and have complex syntax.
## Setup
```bash
pnpm i -g toolry
# Add a shell alias (~/.bashrc or similar)
alias tools="pnpx toolry ~/.toolry/*.ts" # If using ts you need tsx or bun or a new enough node version (24+) that can directly run ts files
```
Now `tools` anywhere gives you a beautiful interactive menu.
---
## Writing a plugin
A plugin is any `.ts` or `.js` file that exports one or more tools via `defineTool` / `defineTools`.
```ts
// ~/.toolry/laravel.ts
import { defineTools } from "toolry";
export default defineTools(
{
name: "serve",
description: "Start the dev server",
category: "Laravel",
args: {
port: { type: "string", description: "Port", default: "8000" },
},
run: ({ port }) => `php artisan serve --port=${port}`,
},
{
name: "migrate",
description: "Run migrations",
category: "Laravel",
args: {
fresh: { type: "boolean", description: "Drop all tables first?" },
},
run: ({ fresh }) => `php artisan migrate${fresh ? ":fresh" : ""}`,
},
);
```
That's it. Full autocomplete on `args` and `run`. Under 20 lines.
### Named exports also work
```ts
export const up = defineTool({ name: 'docker:up', ... })
export const down = defineTool({ name: 'docker:down', ... })
```