Catalog npm
PACKAGE EXPLORERView in registry

@0x-jerry/x

npm

Some useful command for myself.

Versions collected52
Direct dependencies23From release 2.13.2
Last observed20 Oct, 22:17 UTC

README

Current package documentation

X

Some useful command for myself.

Install

pnpm i -g @0x-jerry/x

Run task xr

xr command can auto detect tasks in package.json/scripts, deno.json/tasks, and run it. you can also append any parameters.

Example: In a node project with pnpm-lock.yaml. And package.json has a script "test": "vitest run"

xr test test/*.ts
# equals
vitest run test/*.ts

# you can also execute binary file in `node_modules/.bin` folder.
xr vite --port 4004

Example: In a deno project with deno.json or deno.jsonc. And have a task "dev": "deno run -A main.ts"

xr dev
# equals
deno run -A main.ts

xr can execute js/ts file directly, also support import any string/yaml/jsonc file directly with import attribute.

Example:

script.ts

const count: number = 3;
console.log(count)

import textData from './test.txt' with { type: 'text' }
console.log(textData) // => typeof textData === 'string'

import yamlData from './test.yaml' with { type: 'yaml' }
console.log(yamlData) // => typeof yamlData === 'object'

import jsoncData from './test.jsonc' with { type: 'jsonc' }
console.log(jsoncData) // => typeof jsoncData === 'object'

import sqlStr from './files/test.sql' with { type: 'text' }
console.log(sqlStr) // => typeof sqlStr === 'string'

Execute it:

xr ./script.ts

Dependency Manager xn

xn command can install modules by detect the correct tool automatically, it detects lockfile to decide which dependency manager tool should be used.

Example: install packages in a node project with pnpm-lock.yaml

xn i lodash-es
# equals
pnpm i lodash-es

xn i lodash-es -D
# equals
pnpm i lodash-es -D

# -t/--types option support install @types/xx package in one command.
xn i lodash-es --types
# equals
pnpm i lodash-es && pnpm i @types/lodash-es -D

Example: remove packages in a node project with pnpm-lock.yaml

xn rm lodash-es
# equals
pnpm uninstall lodash-es

xn rm lodash-es -D
# equals
pnpm uninstall lodash-es -D

# -t/--types option support remove @types/xx package in one command.
xn rm lodash-es --types
# equals
pnpm uninstall lodash-es @types/lodash-es

xn also support rust project.

Example: in a rust project with Cargo.toml

xn i log
# equals
cargo add log

xn rm log
# equals
cargo remove log

Command Completions

This feature only support zsh.

Add those code to ~/.zshrc

source <(xr completion zsh)
Invoke-Expression (xr complete powershell | Out-String)

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 52

Collected releases
VersionPublishedDirect dependenciesOpen version
2.8.04 Sept 202528
2.7.51 Mar 202522
2.7.428 Jan 202522
2.7.326 Jan 202522
2.7.221 Jul 202421
2.7.120 Jul 202421
2.7.019 Jul 202421
2.6.119 Jul 202421
2.6.019 Jul 202421
2.5.118 Jul 202421
2.5.018 Jul 202421
2.4.331 May 202421
2.4.229 May 202421
2.4.118 May 202421
2.4.014 May 202421
2.3.69 May 202421
2.3.59 May 202421
2.3.48 May 202421
2.3.38 May 202421
2.3.28 May 202421

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
0x-jerry/x

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 22:17 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:c46fabdadbc54a0799e636ddbe5fb80f27200ca0672bf58338055153e6de3ff7