{"_id":"@emanuelsan/create-monthly-accounting","name":"@emanuelsan/create-monthly-accounting","dist-tags":{"latest":"1.2.0"},"versions":{"1.2.0":{"name":"@emanuelsan/create-monthly-accounting","version":"1.2.0","description":"Omnitrans multi-purpose CLI tool. Initially for selecting and generating the folder structure requested by Especial Audit.","main":"dist/cli.js","bin":{"create-monthly-accounting":"dist/cli.js"},"type":"module","devDependencies":{"@types/inquirer":"^9.0.8","@types/node":"^22.15.29","ts-node":"^10.9.2","tsx":"^4.19.4","typescript":"^5.8.3"},"dependencies":{"commander":"^14.0.0","inquirer":"^12.6.3","chalk":"^5.4.1","open":"^10.1.2"},"scripts":{"build":"tsc","start":"tsx src/cli.ts"},"_id":"@emanuelsan/create-monthly-accounting@1.2.0","_integrity":"sha512-ynYSBiV2ia+jmvGMm/Dbyrb0roH6jk9zziyIIdR1WyxWV4r0ZAIlNlOTc44agX5Vqj3hnc/2ET6wUMfU5jxDwQ==","_resolved":"/private/var/folders/nd/k78zxm_j19j9560stygxprtc0000gn/T/31421d9b417ec4ccd3b7a0935f767c7c/emanuelsan-create-monthly-accounting-1.2.0.tgz","_from":"file:emanuelsan-create-monthly-accounting-1.2.0.tgz","_nodeVersion":"22.9.0","_npmVersion":"10.8.3","dist":{"integrity":"sha512-ynYSBiV2ia+jmvGMm/Dbyrb0roH6jk9zziyIIdR1WyxWV4r0ZAIlNlOTc44agX5Vqj3hnc/2ET6wUMfU5jxDwQ==","shasum":"b4b39dee8e0aa6391026ef75d4698ae79a45f9bf","tarball":"https://registry.npmjs.org/@emanuelsan/create-monthly-accounting/-/create-monthly-accounting-1.2.0.tgz","fileCount":7,"unpackedSize":29494,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCICNEI5c4u/830/IvznlRxvtI22dH/6Wjv6X3WSCaojNAAiBM/lem4d2cAWWa2/qqgQsf1dTtKPBJsB+PQFeVwVludw=="}]},"_npmUser":{"name":"emanuelsan","email":"e.sandu@gmail.com"},"directories":{},"maintainers":[{"name":"emanuelsan","email":"e.sandu@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/create-monthly-accounting_1.2.0_1749713791672_0.4851929728556612"},"_hasShrinkwrap":false}},"time":{"created":"2025-06-12T07:36:31.582Z","1.2.0":"2025-06-12T07:36:31.900Z","modified":"2025-06-12T07:36:32.152Z"},"maintainers":[{"name":"emanuelsan","email":"e.sandu@gmail.com"}],"description":"Omnitrans multi-purpose CLI tool. Initially for selecting and generating the folder structure requested by Especial Audit.","readme":"# omnitrans-conta-cli Developer Documentation\n\n## Overview\n\n`omnitrans-conta-cli` is a Node.js-based command-line tool for selecting months and creating directory structures. This README provides instructions for developers who want to modify, build, and deploy the CLI tool, as well as manage global installation in their development environment.\n\n---\n\n## Table of Contents\n\n* [Changing the CLI Tool Name](#changing-the-cli-tool-name)\n* [Understanding package.json Properties](#understanding-packagejson-properties)\n* [Development Workflow](#development-workflow)\n\n  * [Updating the Version Number](#updating-the-version-number)\n  * [Building the CLI Tool](#building-the-cli-tool)\n  * [Testing Locally](#testing-locally)\n  * [Linking the CLI Tool Globally](#linking-the-cli-tool-globally)\n  * [Unlinking the CLI Tool](#unlinking-the-cli-tool)\n  * [Redeploying after Changes](#redeploying-after-changes)\n* [Troubleshooting](#troubleshooting)\n\n---\n\n## Changing the CLI Tool Name\n\nTo change the command name used in the terminal, modify the `bin` field in your `package.json`:\n\n```json\n\"bin\": {\n  \"omnitrans-conta\": \"dist/cli.js\"\n}\n```\n\n* The **key** (`omnitrans-conta`) is the command you type in the terminal.\n* The **value** (`dist/cli.js`) is the script that runs.\n\nIf you change the project name (the `name` property in `package.json`), also update it to reflect the new CLI tool identity.\n\n---\n\n## Understanding package.json Properties\n\n| Property          | Purpose                                                                |\n| ----------------- | ---------------------------------------------------------------------- |\n| `name`            | The npm package name and identifier for the CLI tool                   |\n| `version`         | The version number; update this for each new release                   |\n| `bin`             | Maps the command-line executable to your JS entry point                |\n| `main`            | Entry point for usage as a Node.js library (not used by CLI execution) |\n| `scripts`         | Scripts for building, starting, and testing the CLI tool               |\n| `devDependencies` | Lists dev-only packages (TypeScript, Commander, etc.)                  |\n| `type`            | Module system (`module` or `commonjs`)                                 |\n\n---\n\n## Development Workflow\n\n### 1. Updating the Version Number\n\nEdit the `version` field in `package.json` before publishing or redeploying:\n\n```json\n\"version\": \"1.0.1\"\n```\n\n### 2. Building the CLI Tool\n\nTranspile TypeScript to JavaScript:\n\n```bash\npnpm build\n```\n\n(This runs the `tsc` command as defined in `scripts.build`.)\n\n### 3. Testing Locally\n\nYou can run the CLI directly via Node.js:\n\n```bash\npnpm start\n```\n\nOr:\n\n```bash\nnode dist/cli.js\n```\n\n### 4. Linking the CLI Tool Globally\n\nTo use the CLI command anywhere in your terminal:\n\n```bash\npnpm link --global\n```\n\nThis creates a symlink so you can run your CLI command (as set in `bin`) globally.\n\n#### To verify the global link:\n\n```bash\nwhich omnitrans-conta\n```\n\n### 5. Unlinking the CLI Tool\n\nTo remove the global CLI command:\n\n```bash\npnpm remove --global omnitrans-conta-cli\n```\n\nThis cleans up the symlink and removes the binary from your path.\n\n### 6. Redeploying after Changes\n\n1. Make your code changes.\n2. Bump the `version` number in `package.json`.\n3. Rebuild:\n\n   ```bash\n   pnpm build\n   ```\n4. If already linked globally, run:\n\n   ```bash\n   pnpm remove --global omnitrans-conta-cli\n   pnpm link --global\n   ```\n\n   This ensures you are running the latest build globally.\n\n---\n\n## Troubleshooting\n\n* **Unlink not working?**\n\n  * Ensure you run `pnpm remove --global <package-name>` from outside the project directory.\n  * Manually check and remove the binary using `which omnitrans-conta` and `rm` if needed.\n* **Binary not updating?**\n\n  * Always unlink and re-link after rebuilding for changes to take effect globally.\n\n---\n\n## Contribution Notes\n\n* Make sure to keep dependencies up to date and regularly update the `devDependencies` as needed.\n* Use semantic versioning for releases.\n* Test CLI changes locally before deploying or sharing with others.","readmeFilename":"README.md","_rev":"1-2f55474226381dde578d35f4c5d2ead1"}