{"_id":"@brngdsn/tacos","_rev":"1-91467f93308007cb9c9ecd1b0d245bfc","name":"@brngdsn/tacos","dist-tags":{"latest":"0.2.1"},"versions":{"0.2.0":{"name":"@brngdsn/tacos","version":"0.2.0","author":{"name":"brn.gdsn@gmail.com"},"_id":"@brngdsn/tacos@0.2.0","maintainers":[{"name":"brngdsn","email":"brn.gdsn@gmail.com"}],"homepage":"https://github.com/brngdsn/tacos#readme","bugs":{"url":"https://github.com/brngdsn/tacos/issues"},"bin":{"tacos":"bin/tacos.js"},"dist":{"shasum":"0b4d1e7eb524fc5377629888778ad29469e422db","tarball":"https://registry.npmjs.org/@brngdsn/tacos/-/tacos-0.2.0.tgz","fileCount":14,"integrity":"sha512-uSj47oT5iFp287JvDNGlRuACrmWOpz7xVRtJ5IpCqWhn6utYwn7E5Jv1NgdXwZlG+6Mts9XRyWcB0Xq1/KIwng==","signatures":[{"sig":"MEQCIEucWGh7v6gc05yhPBT+xkbgr97zqqF0GOgSMz02gSuSAiBiRw3Ng6OzdwKkfVX/WZRBiMBbwrJazLSPiKIdCJtJJw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":86938},"main":"src/index.js","type":"module","engines":{"node":">=20.8.0"},"gitHead":"1bd30553fddba9e04979f9f70cb82547a9ef2d49","scripts":{"start":"node bin/tacos.js"},"_npmUser":{"name":"brngdsn","email":"brn.gdsn@gmail.com"},"repository":{"url":"git+https://github.com/brngdsn/tacos.git","type":"git"},"_npmVersion":"10.1.0","description":"Token And Context Output Summarizer","directories":{},"_nodeVersion":"20.8.0","dependencies":{"chalk":"^5.2.0","ignore":"^5.2.0","commander":"^13.1.0","string-width":"^7.2.0","@dqbd/tiktoken":"^1.0.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/tacos_0.2.0_1739727727998_0.00893462123269062","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"@brngdsn/tacos","version":"0.2.1","description":"Token And Context Output Summarizer","type":"module","repository":{"type":"git","url":"git+https://github.com/brngdsn/tacos.git"},"author":{"name":"brn.gdsn@gmail.com"},"bugs":{"url":"https://github.com/brngdsn/tacos/issues"},"homepage":"https://github.com/brngdsn/tacos#readme","bin":{"tacos":"bin/tacos.js"},"main":"src/index.js","scripts":{"start":"node bin/tacos.js"},"dependencies":{"@dqbd/tiktoken":"^1.0.0","chalk":"^5.2.0","commander":"^13.1.0","ignore":"^5.2.0","string-width":"^7.2.0"},"engines":{"node":">=20.8.0"},"_id":"@brngdsn/tacos@0.2.1","gitHead":"62efe430a4d1189b66f10b51044fce3277cdaa53","_nodeVersion":"20.8.0","_npmVersion":"10.1.0","dist":{"integrity":"sha512-RYLco6Wl+CY5uvbP/DeZ+p6O8XKlWB23qAt8AG13ga22GEkJjK4TKol1G4L8/iL54dO6VxSwe6flbwWPM4IQ8Q==","shasum":"84f9b6d3aa98a69769ac04ddf911bd07829a25d5","tarball":"https://registry.npmjs.org/@brngdsn/tacos/-/tacos-0.2.1.tgz","fileCount":14,"unpackedSize":86938,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDlZEEUfwWWZ+FPb07Fx+BeCsh+Z17pYNA87vZvcOv8pwIhAOuQxDvvZhlsrpl1/LdXjrXUeN28KE/VclQxu2zeJYdj"}]},"_npmUser":{"name":"brngdsn","email":"brn.gdsn@gmail.com"},"directories":{},"maintainers":[{"name":"brngdsn","email":"brn.gdsn@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/tacos_0.2.1_1739728404446_0.5006548197265321"},"_hasShrinkwrap":false}},"time":{"created":"2025-02-16T17:42:07.902Z","modified":"2025-02-16T17:53:24.830Z","0.2.0":"2025-02-16T17:42:08.148Z","0.2.1":"2025-02-16T17:53:24.665Z"},"bugs":{"url":"https://github.com/brngdsn/tacos/issues"},"author":{"name":"brn.gdsn@gmail.com"},"homepage":"https://github.com/brngdsn/tacos#readme","repository":{"type":"git","url":"git+https://github.com/brngdsn/tacos.git"},"description":"Token And Context Output Summarizer","maintainers":[{"name":"brngdsn","email":"brn.gdsn@gmail.com"}],"readme":"# 🥑 Tacos - Token And Context Output Summarizer\n\n![Tacos Logo](./assets/tacos-cli.png)\n\n**Tacos** is a CLI tool that recursively analyzes files and directories, estimating token counts and cost metrics for AI model inference. It supports modern **Node.js** (v20.8.0) and ECMAScript 2024, utilizing OpenAI's tokenizer for accurate token estimation.\n\n## 📌 Features\n\n- 📂 **Recursive File Traversal**: Use `-r` or `--recursive` to analyze all files within directories.\n- 🔍 **Token & Cost Estimation**: Computes input/output costs based on AI model pricing.\n- 🎨 **Colorized Output**: Uses **chalk** to highlight token counts, costs, and cumulative values.\n- 🏗 **Model Selection**: Supports various models including GPT-4o, GPT-3.5, and OpenAI’s text embedding models.\n- 🚀 **Extensible**: Easily adaptable with additional models or pricing structures.\n\n## 🚀 Installation\n\nEnsure you have **Node.js v20.8.0** installed (as defined in `.nvmrc`).\n\n```sh\nnpm install -g @brngdsn/tacos\n```\n\n## 🛠 Usage\n\n### 🔹 Basic Usage\n```sh\ntacos\n```\nThis scans the current directory and displays file sizes, token counts, and estimated costs.\n\n### 🔹 Recursive Traversal\n```sh\ntacos -r\n```\nor\n```sh\ntacos --recursive\n```\nThis traverses directories recursively and shows cumulative token/cost summaries.\n\n### 🔹 Recursive Collapse (Summarized)\n```sh\ntacos -x\n```\nor\n```sh\ntacos --recursive-collapse\n```\nInstead of listing all files, this aggregates directory contents into a single summarized entry.\n\n### 🔹 Custom AI Models\n```sh\ntacos gpt-4o mini\n```\nOverrides the default AI model used for cost calculations.\n\n### 🔹 Display Cost Table\n```sh\ntacos -c\n```\nShows model pricing details.\n\n## 📊 Output Example\n\n```\nSize       Name                      Tokens     Input Cost   Output Cost   \n10.2KB     app.js                     2.1k       $0.0003      $0.0012\n14.6KB     index.html                  3.2k       $0.0005      $0.0020\n---------\n17.8MB     [Cumulative]               450.2k     $0.0675      $0.2701\n```\n\n- **Cumulative Rows** swap text/background colors.\n- **Ignored files** (from `.gitignore`, `.tacosignore`) are grayed out.\n- **Directories** are shown in **blue**.\n\n## 🛠 Development\n\nClone the repository and install dependencies:\n\n```sh\ngit clone https://github.com/brngdsn/tacos.git\ncd tacos\nnpm install\n```\n\nRun locally:\n\n```sh\nnode bin/tacos.js\n```\n\nRun with custom models:\n\n```sh\nnode bin/tacos.js gpt-4o mini\n```\n\n## 📜 License\n\nMIT License. See `LICENSE` for details.\n\n## 📬 Contact & Issues\n\n- Report bugs: [GitHub Issues](https://github.com/brngdsn/tacos/issues)\n- Author: [brn.gdsn@gmail.com](mailto:brn.gdsn@gmail.com)\n\n---\n🥑 Made with **Tacos**\n","readmeFilename":"README.md"}