Skip to content
Jo Shinonome edited this page Sep 20, 2023 · 7 revisions

kuki

K Ultimate pacKage Installer

Environment Configuration

Command Options

Global

  • default kuki path $HOME/kuki, use environment variable KUKIPATH to overwrite the path
    • _config/kukirc.json: target registry site and token configuration
    • _cache: directory caches downloaded package files
    • _profile: directory for q/k process profile
    • .index: index for installed packages

Package

  • kuki.json: package information and dependencies
  • kuki_index.json: maintains indices of all required packages. For a version conflict:
    • it will use specified version if it is a direct dependency
    • latest version if it is not a direct dependency
  • .kukiinclude: extra glob pattern for publishing. in default, kuki only publishes src/*, lib/*, kuki.index and README.md

Command Options

help

print command options help of kuki

kuki -h
# or
kuki --help

adduser

register an user on the registry, only if registry supports this. If registry doesn't support adduser, generate token on the npm artifactory and use config to set token

kuki -a
# or
kuki --adduser

login

login to the registry, only if registry supports this. If registry doesn't support login, generate token on the npm artifactory and use config to set token

kuki --login

config

use format 'field=value', supports registry and token only

kuki -c registry=https://localhost token=some_token
# or
kuki --config registry=https://localhost token=some_token

init

init kuki.json for a new package

kuki --init

pack

pack source codes into a tgz file

kuki --pack

publish

publish current package to the registry

kuki -p
# or
kuki --publish

unpublish

unpublish all versions or a version of a package from the registry

# unpublish all versions of dummy
kuki --unpublish dummy
# unpublish a version fo dummy
kuki --unpublish dummy@0.0.1

download

download a package from the registry

kuki -d dummy
# or
kuki --download dummy@0.0.1

install

install a package to the local repo

kuki -i dummy
# or
kuki --install dummy@0.0.1

install all dependencies based on kuki.json file in current folder

kuki -i
# or
kuki --install

global

global mode, work with install

kuki -g -i dummy
# or
kuki --global --install dummy@0.0.1

force

force to install packages, work with install

kuki --force --install dummy@0.0.1
# or
kuki --force --install
# or
kuki --global --force --install dummy@0.0.1

uninstall

uninstall a package from current working package

kuki -u dummy
# or
kuki --uninstall dummy

version

roll up version in the kuki.json

kuki -v patch
# or
kuki --version minor
# or
kuki --version major

search

search package on the registry

kuki -s dummy
# or
kuki --search dummy