Skip to content

Commit 3333794

Browse files
committed
fix: rename package to @boneskull/bargs
1 parent 089f88b commit 3333794

4 files changed

Lines changed: 22 additions & 14 deletions

File tree

AGENTS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ node --import tsx --test --test-name-pattern="parses string" "test/**/*.test.ts"
3030
`src/index.ts` exports `bargs` as a function with builder methods attached via `Object.assign(parseAsync, opt)`. This allows:
3131

3232
```typescript
33-
import { bargs } from 'bargs';
33+
import { bargs } from '@boneskull/bargs';
3434
bargs({ ... }); // Call as function
3535
bargs.string({ ... }); // Use as builder namespace
3636
```

README.md

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
## Install
1212

1313
```shell
14-
npm install bargs
14+
npm install @boneskull/bargs
1515
```
1616

1717
## Why bargs?
@@ -74,7 +74,7 @@ Only Node.js v22+.
7474
## Quick Start
7575

7676
```typescript
77-
import { bargs } from 'bargs';
77+
import { bargs } from '@boneskull/bargs';
7878

7979
const result = bargs({
8080
name: 'greet',
@@ -111,7 +111,7 @@ const result = bargs({
111111
Instead, use **`bargsAsync()`**:
112112

113113
```typescript
114-
import { bargsAsync } from 'bargs';
114+
import { bargsAsync } from '@boneskull/bargs';
115115

116116
// Async - handlers can return Promises
117117
const result = await bargsAsync({
@@ -353,7 +353,7 @@ bargs(config, { theme: 'mono' });
353353
The `ansi` export provides common ANSI escape codes for styled terminal output: text styles (`bold`, `dim`, `italic`, `underline`, etc.), foreground colors, background colors, and their `bright*` variants. Use this to create your own themes (instead of hardcoding ANSI escape codes).
354354

355355
```typescript
356-
import { ansi } from 'bargs';
356+
import { ansi } from '@boneskull/bargs';
357357

358358
bargs(someConfig, {
359359
theme: {
@@ -402,7 +402,12 @@ Available theme color slots:
402402
**bargs** exports some `Error` subclasses:
403403

404404
```typescript
405-
import { bargs, BargsError, HelpError, ValidationError } from 'bargs';
405+
import {
406+
bargs,
407+
BargsError,
408+
HelpError,
409+
ValidationError,
410+
} from '@boneskull/bargs';
406411

407412
try {
408413
bargs(config);
@@ -425,7 +430,7 @@ try {
425430
Generate help text without calling `bargs()`:
426431

427432
```typescript
428-
import { generateHelp, generateCommandHelp } from 'bargs';
433+
import { generateHelp, generateCommandHelp } from '@boneskull/bargs';
429434

430435
const helpText = generateHelp(config);
431436
const commandHelp = generateCommandHelp(config, 'migrate');
@@ -436,7 +441,7 @@ const commandHelp = generateCommandHelp(config, 'migrate');
436441
Create clickable terminal hyperlinks ([OSC 8](https://github.com/Alhadis/OSC8-Adoption)):
437442

438443
```typescript
439-
import { link, linkifyUrls, supportsHyperlinks } from 'bargs';
444+
import { link, linkifyUrls, supportsHyperlinks } from '@boneskull/bargs';
440445

441446
// Check if terminal supports hyperlinks
442447
if (supportsHyperlinks()) {
@@ -460,7 +465,7 @@ import {
460465
defaultTheme, // The default theme object
461466
stripAnsi, // Remove ANSI codes from string
462467
themes, // All built-in themes
463-
} from 'bargs';
468+
} from '@boneskull/bargs';
464469

465470
// Create a custom styler
466471
const styler = createStyler({ colors: { flag: ansi.green } });

docs/plans/2025-12-27-remove-zod-redesign-api.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ const validateAliasConflicts = (schema: OptionsSchema): void => {
391391
* @example
392392
*
393393
* ```typescript
394-
* import { opt } from 'bargs';
394+
* import { opt } from '@boneskull/bargs';
395395
*
396396
* const options = opt.options({
397397
* verbose: opt.boolean({ aliases: ['v'] }),
@@ -2270,7 +2270,7 @@ This plan removes Zod and replaces it with an explicit, traditional argument par
22702270
**Before (Zod):**
22712271

22722272
```typescript
2273-
import { bargs } from 'bargs';
2273+
import { bargs } from '@boneskull/bargs';
22742274
import { z } from 'zod';
22752275

22762276
await bargs({
@@ -2286,7 +2286,7 @@ await bargs({
22862286
**After (No Zod):**
22872287

22882288
```typescript
2289-
import { bargs, opt } from 'bargs';
2289+
import { bargs, opt } from '@boneskull/bargs';
22902290

22912291
await bargs({
22922292
name: 'my-cli',
@@ -2301,7 +2301,7 @@ await bargs({
23012301
**Composition Example:**
23022302

23032303
```typescript
2304-
import { bargs, opt } from 'bargs';
2304+
import { bargs, opt } from '@boneskull/bargs';
23052305

23062306
// Reusable option sets
23072307
const loggingOptions = opt.options({

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "bargs",
2+
"name": "@boneskull/bargs",
33
"version": "0.1.0",
44
"type": "module",
55
"description": "A TypeScript-first CLI argument parser wrapping util.parseArgs() with full type inference",
@@ -89,6 +89,9 @@
8989
"typescript-eslint": "8.50.0",
9090
"zshy": "0.6.0"
9191
},
92+
"publishConfig": {
93+
"access": "public"
94+
},
9295
"knip": {
9396
"ignoreDependencies": [
9497
"markdownlint-cli2-formatter-pretty"

0 commit comments

Comments
 (0)