withub-cli
v0.1.0
Published
wit CLI (Commander + Ink) skeleton
Downloads
95
Readme
wit CLI
Wit with Withub: A private, decentralized alternative to Git with GitHub, powered by Walrus. This CLI (Node.js/TypeScript, Commander + Ink) talks directly to Walrus decentralized storage instead of centralized hosts, targeting a single-branch, verifiable repository model with Sui state integration.
Requirements
- Node.js >= 18.
- Access to a Walrus relay (testnet by default); Sui RPC endpoints are configurable as the state layer evolves.
Install & Run
- Global install:
npm install -g withub-clithenwit --help. - On-demand:
npx withub-cli --help(no global install needed). - Upgrade:
npm install -g withub-cli@latest. Uninstall:npm uninstall -g withub-cli.
Quickstart
- Initialize a repo scaffold in the current directory:
This createswit init <repo-name>.wit/, writesconfig.jsonwith sensible defaults (Walrus testnet relay, author/key placeholders), and ensures.gitignore/.witignoreinclude.wit/and key paths. - Local VC workflow:
wit status,wit add,wit reset/wit restore --staged,wit restore <paths>,wit commit,wit log,wit diff,wit checkout. - Storage experiments:
wit push-blob/pull-blob;wit push-quilt/pull-quilt/quilt-cat/quilt-ls/quilt-cat-id;push-quilt-legacy/pull-quilt-legacyas archive fallback. - Colorized output can be toggled via
--color/--no-coloror env varsNO_COLOR/WIT_NO_COLOR.
Developer Scripts
npm ci: install dependencies deterministically.npm run build: compile todist/(entrydist/index.jsships with shebang for npm shims).npm start: run the compiled CLI locally.npm run test:smoke: minimal smoke test.prepublishOnly: runsnpm run build && npm run test:smoketo guard against unbuilt or untested publishes.
Publish Checklist (manual)
npm ci && npm run build.npm run test:smoke.npm packand inspect the tarball (should containdist/**,README.md,LICENSE,package.json;binpoints todist/index.js).npm publish(scope is alreadyaccess: public; for prerelease usenpm publish --tag next).- Verify:
npm info withub-cli version,npx withub-cli --version, optionallynpm install -g withub-cli && wit --helpfor global smoke.
Current Scope
- Local VC core:
init,status,add,reset,restore,commit,log,diff,checkout. - Walrus storage flows: quilt/blob push/pull commands plus legacy archive fallback.
- Remote/contract/Web flows are under active development; CLI surfaces will expand alongside Sui state and privacy (Seal) integration.
