ai-token-counter

v1.0.0 safe
4.0
Medium Risk

Accurate token counting for multiple LLM providers

🤖 AI Analysis

Final verdict: SAFE

The package shows minimal risk indicators with no network calls, shell executions, or obfuscations. The main concern lies in the unavailability of the repository and the maintainer's limited history, but these alone do not conclusively indicate malicious intent.

  • No network calls detected.
  • No shell execution detected.
  • Repository and maintainer have limited visibility.
Per-check LLM notes
  • Network: No network calls detected, which is normal unless the package requires external services.
  • Shell: No shell execution detected, indicating no immediate risk of command injection or similar attacks.
  • Obfuscation: No obfuscation patterns detected, indicating low risk of malicious obfuscation.
  • Credentials: No credential harvesting patterns detected, indicating low risk of secret theft.
  • Metadata: The repository is not found and the maintainer has limited history, raising concerns but not definitive proof of malice.

📦 Package Quality Overall: Low (4.6/10)

◈ Medium Test Suite 6.0

Partial test coverage signals detected

  • 1 test file(s) detected (e.g. test_counter.py)
◈ Medium Documentation 7.0

Some documentation present

  • Documentation URL: "Documentation" -> https://github.com/luciddreamer/ai-token-counter#readme
  • Detailed PyPI description (3124 chars)
○ Low Contributing Guide 4.0

No contributing guide or governance files found

  • Development Status classifier >= Beta
◈ Medium Type Annotations 5.0

Partial type annotation coverage

  • 21 type-annotated function signatures detected in source
○ Low Multiple Contributors 1.0

Could not retrieve contributor data from GitHub

  • GitHub API error: 404

🔬 Heuristic Checks

Outbound Network Calls

No suspicious network call patterns found

Code Obfuscation

No obfuscation patterns detected

Shell / Subprocess Execution

No shell execution patterns detected

Credential Harvesting

No credential harvesting patterns detected

Typosquatting

No typosquatting candidates detected

Registered Email Domain

Email domain looks legitimate: luciddreamer.dev>

Suspicious Page Links

All external links appear legitimate

Git Repository History score 3.0

Repository not found (deleted or private)

  • Repository not found (deleted or private)
Maintainer History score 4.0

2 maintainer concern(s) found

  • Only one version has ever been released — brand new package
  • Author "LucidDreamer" appears to have only 1 package on PyPI (new or inactive account)
Known CVE Vulnerabilities

No known vulnerabilities found in OSV database.

💡 AI App Starter Prompt

Use this prompt to build a project with ai-token-counter
Create a command-line utility named 'TokenTally' that leverages the Python package 'ai-token-counter' to provide users with a straightforward way to count tokens across various large language models (LLMs). This tool should accept user input as text or read from a file, and then display the token count according to different LLMs such as GPT-3, Claude, and others supported by the 'ai-token-counter' package.

Step 1: Install the required packages including 'ai-token-counter'.
Step 2: Design a clean and intuitive command-line interface that allows users to specify the input source (stdin or file) and the target LLM.
Step 3: Implement functionality to accurately count tokens based on the selected LLM using the 'ai-token-counter' package.
Step 4: Enhance the utility with additional features such as:
- Displaying the total character count alongside the token count.
- Providing an option to estimate costs based on the token count, considering typical pricing models of the LLM providers.
- Offering a summary of the most common words or phrases in the input text.
Step 5: Ensure the application handles errors gracefully, providing meaningful feedback to the user when issues arise.

Your task is to develop this utility from scratch, ensuring it is well-documented and easy to use. The 'ai-token-counter' package should be utilized to demonstrate its capabilities in handling different LLM tokenization schemes.