{"_id":"@api-weaver/cli","name":"@api-weaver/cli","dist-tags":{"latest":"0.0.1"},"versions":{"0.0.1":{"name":"@api-weaver/cli","version":"0.0.1","description":"Weaving your APIs into TypeScript !","author":{"name":"Aka-Amir"},"private":false,"publisher":"Aka-Amir","homepage":"https://github.com/Aka-Amir/api-weaver","license":"MIT","bin":{"apiva":"dist/main.js","api-weaver":"dist/main.js"},"scripts":{"build":"nest build","build:linux":"nest build && sudo chmod +x ./dist/main.js","format":"prettier --write \"src/**/*.ts\" \"test/**/*.ts\" \"libs/**/*.ts\"","start":"nest start --","start:dev":"nest start --watch","start:debug":"nest start --debug --watch","start:prod":"node dist/main","lint":"eslint \"{src,apps,libs,test}/**/*.ts\" --fix","test":"jest","test:watch":"jest --watch","test:cov":"jest --coverage","test:debug":"node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand","test:e2e":"jest --config ./test/jest-e2e.json"},"dependencies":{"@api-weaver/core":"^0.0.1","@nestjs/common":"^11.0.1","@nestjs/core":"^11.0.1","@nestjs/platform-express":"^11.0.1","nest-commander":"^3.16.1","reflect-metadata":"^0.2.2","rxjs":"^7.8.1"},"devDependencies":{"@eslint/eslintrc":"^3.2.0","@eslint/js":"^9.18.0","@nestjs/cli":"^11.0.0","@nestjs/schematics":"^11.0.0","@nestjs/testing":"^11.0.1","@swc/cli":"^0.6.0","@swc/core":"^1.10.7","@types/express":"^5.0.0","@types/jest":"^29.5.14","@types/node":"^22.15.21","@types/supertest":"^6.0.2","eslint":"^9.18.0","eslint-config-prettier":"^10.0.1","eslint-plugin-prettier":"^5.2.2","github-api":"^3.4.0","globals":"^15.14.0","jest":"^29.7.0","prettier":"^3.6.2","source-map-support":"^0.5.21","supertest":"^7.0.0","ts-jest":"^29.2.5","ts-loader":"^9.5.2","ts-node":"^10.9.2","tsconfig-paths":"^4.2.0","typescript":"^5.7.3","typescript-eslint":"^8.20.0"},"jest":{"moduleFileExtensions":["js","json","ts"],"rootDir":".","testRegex":".*\\.spec\\.ts$","transform":{"^.+\\.(t|j)s$":"ts-jest"},"collectCoverageFrom":["**/*.(t|j)s"],"coverageDirectory":"./coverage","testEnvironment":"node","roots":["<rootDir>/src/","<rootDir>/libs/"],"moduleNameMapper":{"^@app/mock(|/.*)$":"<rootDir>/libs/mock/src/$1","^@app/o(|/.*)$":"<rootDir>/libs/o/src/$1"}},"_id":"@api-weaver/cli@0.0.1","gitHead":"e46dbf4b7041b5e280b33724c14d0a8d39805780","_nodeVersion":"22.14.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-zKKsYiNF22LFMx5N6Gi7yEdSlN/eWJmoTjHNdOt6oCWcGb27V/9QGo1RsNKUhZBlOlp076XeVt/FwYTG/ziN1Q==","shasum":"94f0906000048d473a3aa87b79bd3d39a4880266","tarball":"https://registry.npmjs.org/@api-weaver/cli/-/cli-0.0.1.tgz","fileCount":35,"unpackedSize":158079,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIHqcNqyZ9AP106sVqzhYpZQA/3YPbQxWmsk/lAtWwGiCAiEA5xEtwDSYKF5yzI/uVD8K3API/ix635kIyoGO0jVTUac="}]},"_npmUser":{"name":"supo.amirkhalili","email":"supo.amirkhalili@gmail.com"},"directories":{},"maintainers":[{"name":"supo.amirkhalili","email":"supo.amirkhalili@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/cli_0.0.1_1757749282283_0.8658424313276227"},"_hasShrinkwrap":false}},"time":{"created":"2025-09-13T07:41:22.144Z","0.0.1":"2025-09-13T07:41:22.472Z","modified":"2025-09-13T07:41:22.971Z"},"maintainers":[{"name":"supo.amirkhalili","email":"supo.amirkhalili@gmail.com"}],"description":"Weaving your APIs into TypeScript !","homepage":"https://github.com/Aka-Amir/api-weaver","author":{"name":"Aka-Amir"},"license":"MIT","readme":"# Api Weaver\n\n> Weaving your APIs into TypeScript !\n\nA powerful CLI tool that generates TypeScript SDKs from OpenAPI specifications, making API integration seamless and type-safe.\n\n## 🚀 Installation\n\nInstall Api Weaver globally via npm:\n\n```bash\nnpm install -g api-weaver\n```\n\n## 📖 Usage\n\nApi Weaver provides a simple command-line interface to generate TypeScript SDKs from your OpenAPI specifications.\n\n### Basic Syntax\n\n```bash\napi-weaver <COMMANDS>\n```\n\n**or use the shorter alias:**\n\n```bash\napiva <COMMANDS>\n```\n\n### Generate Command\n\nGenerate a TypeScript SDK from an OpenAPI specification:\n\n```bash\napi-weaver generate -f <openapi-file> -o <output-directory> -n <sdk-name>\n```\n\n**Aliases:** `g`, `gen`\n\n#### Required Options\n\n| Option | Flag | Description |\n|--------|------|-------------|\n| `--file` | `-f` | Path to the OpenAPI specification file (JSON format) |\n| `--out` | `-o` | Output directory for the generated SDK files |\n| `--name` | `-n` | Name for the generated SDK |\n\n#### Examples\n\n```bash\n# Generate SDK from OpenAPI file\napi-weaver generate -f ./api-spec.json -o ./generated-sdk -n MyApiSdk\n\n# Using aliases\napiva g -f ./swagger.json -o ./sdk -n UserApi\n\n# Full command with long flags\napi-weaver generate --file ./openapi.json --out ./output --name PaymentAPI\n```\n\n## 📁 Output Structure\n\nThe generated SDK will include:\n\n- **Type definitions** - TypeScript interfaces and types based on your OpenAPI schemas\n- **API clients** - Ready-to-use client classes for each API endpoint\n- **Models** - Data models corresponding to your API schemas\n- **Enums** - Enumeration types from your OpenAPI specification\n\n## 🔧 Features\n\n- ✅ **OpenAPI 3.x Support** - Full compatibility with OpenAPI 3.x specifications\n- ✅ **Type Safety** - Generate fully typed TypeScript code\n- ✅ **Automatic Client Generation** - Create API clients for all endpoints\n- ✅ **Schema Validation** - Built-in validation for OpenAPI specifications\n- ✅ **Flexible Output** - Customizable output directory and SDK naming\n- ✅ **CLI Friendly** - Simple command-line interface with helpful aliases\n\n## 📋 Requirements\n\n- Node.js (version 14 or higher)\n- Valid OpenAPI 3.x specification file in JSON format\n\n## 🛠️ Development\n\nIf you want to contribute or run Api Weaver from source:\n\n```bash\n# Clone the repository\ngit clone <repository-url>\n\n# Install dependencies\nnpm install\n\n# Build the project\nnpm run build\n\n# Run in development mode\nnpm run start:dev\n\n# Run tests\nnpm test\n```\n\n## 📝 License\n\nThis project is licensed under the MIT License.\n\n## 🤝 Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## 📞 Support\n\nIf you encounter any issues or have questions, please file an issue on the project repository.\n\n---\n\n**Author:** Aka-Amir\n\n**Version:** 0.0.3","readmeFilename":"README.md","_rev":"1-21509e181b5c1bf9eff936b060cbee15"}