npm release

This commit is contained in:
Matyi Kari 2025-03-05 17:02:41 -06:00
parent 053946fa2e
commit 8c4d3768be
4 changed files with 80 additions and 38 deletions

View File

@ -8,28 +8,62 @@ Before using this tool, you need to configure your API key and preferences.
Get an OpenAI API key at https://platform.openai.com/api-keys
Alternatively, sign up for VVK Cloud at https://vvk.ai/
## **Development**
## Installation
To set up the development environment:
### Prerequisites
- Node.js 18+
Verify with:
```bash
node --version
```
### Install as a Global CLI Tool
```bash
# Clone the repository
git clone https://github.com/matyik/vvk.git
# Using npm
npm install -g vvk
# Install dependencies
pnpm install
# Using pnpm
pnpm add -g vvk
# Build the project
pnpm build
# Create a global link
pnpm link --global
# Now you can use the development version globally
vvk <command>
# Using yarn
yarn global add vvk
```
### **Setup Configuration**
### Verify Installation
```bash
vvk --version
```
### Update
```bash
npm update -g vvk
# or
pnpm update -g vvk
```
### Uninstall
```bash
npm uninstall -g vvk
# or
pnpm remove -g vvk
```
### Troubleshooting
- **Permission Errors**: Use `sudo` (not recommended) or fix npm permissions:
```bash
# Reset npm permissions
npm config set prefix ~/.npm-global
echo 'export PATH="$PATH:$HOME/.npm-global/bin"' >> ~/.bashrc
source ~/.bashrc
```
## **Setup Configuration**
Use the `vvk config set` command to configure your settings:
@ -50,7 +84,7 @@ You can check your current settings with:
vvk config list
```
### **Login**
## **Login**
Use the `vvk login` command to log in in the browser:
@ -93,6 +127,27 @@ The tool will:
3. Show you the command for confirmation (if enabled)
4. Execute the command upon your approval
## **Development**
To set up the development environment:
```bash
# Clone the repository
git clone https://github.com/matyik/vvk.git
# Install dependencies
pnpm install
# Build the project
pnpm build
# Create a global link
pnpm link --global
# Now you can use the development version globally
vvk <command>
```
## **License**
MIT License - see LICENSE file for details

View File

@ -1,14 +1,19 @@
{
"name": "vvk",
"version": "1.1.0",
"version": "1.1.1",
"description": "A command-line interface tool that converts natural language instructions into shell commands using OpenAI's GPT-4.",
"main": "index.js",
"main": "dist/index.js",
"scripts": {
"build": "rimraf dist && webpack"
},
"bin": {
"vvk": "dist/index.js"
},
"files": [
"dist/",
"README.md",
"LICENSE"
],
"keywords": [],
"author": "Matyi Kari",
"license": "MIT",
@ -23,8 +28,6 @@
},
"dependencies": {
"axios": "^1.8.1",
"child_process": "^1.0.2",
"openai": "^4.85.4",
"readline": "^1.3.0"
"openai": "^4.85.4"
}
}

16
pnpm-lock.yaml generated
View File

@ -11,15 +11,9 @@ importers:
axios:
specifier: ^1.8.1
version: 1.8.1
child_process:
specifier: ^1.0.2
version: 1.0.2
openai:
specifier: ^4.85.4
version: 4.86.0
readline:
specifier: ^1.3.0
version: 1.3.0
devDependencies:
'@types/node':
specifier: ^22.13.5
@ -277,9 +271,6 @@ packages:
resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==}
engines: {node: '>=10'}
child_process@1.0.2:
resolution: {integrity: sha512-Wmza/JzL0SiWz7kl6MhIKT5ceIlnFPJX+lwUGj7Clhy5MMldsSoJR0+uvRzOS5Kv45Mq7t1PoE8TsOA9bzvb6g==}
chrome-trace-event@1.0.4:
resolution: {integrity: sha512-rNjApaLzuwaOTjCiT8lSDdGN1APCiqkChLMJxJPWLunPAt5fy8xgU9/jNOchV84wfIxrA0lRQB7oCT8jrn/wrQ==}
engines: {node: '>=6.0'}
@ -660,9 +651,6 @@ packages:
randombytes@2.1.0:
resolution: {integrity: sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==}
readline@1.3.0:
resolution: {integrity: sha512-k2d6ACCkiNYz222Fs/iNze30rRJ1iIicW7JuX/7/cozvih6YCkFZH+J6mAFDVgv0dRBaAyr4jDqC95R2y4IADg==}
rechoir@0.8.0:
resolution: {integrity: sha512-/vxpCXddiX8NGfGO/mTafwjq4aFa/71pvamip0++IQk3zG8cbCj0fifNPrjjF1XMXUne91jL9OoxmdykoEtifQ==}
engines: {node: '>= 10.13.0'}
@ -1155,8 +1143,6 @@ snapshots:
ansi-styles: 4.3.0
supports-color: 7.2.0
child_process@1.0.2: {}
chrome-trace-event@1.0.4: {}
clone-deep@4.0.1:
@ -1470,8 +1456,6 @@ snapshots:
dependencies:
safe-buffer: 5.2.1
readline@1.3.0: {}
rechoir@0.8.0:
dependencies:
resolve: 1.22.10

View File

@ -29,7 +29,7 @@ if (args[0] === 'config') {
`);
process.exit(0);
} else if ((args[0] === '--version' || args[0] === '-v') && args.length === 1) {
console.log('1.1.0');
console.log('1.1.1');
} else if (args[0] === 'login' && args.length === 1) {
login();
} else if (args[0] === 'logout' && args.length === 1) {