Skip to content

Commit

Permalink
Add cli
Browse files Browse the repository at this point in the history
  • Loading branch information
ccan23 committed Feb 11, 2025
1 parent f0a4751 commit 8a65acf
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 11 deletions.
33 changes: 22 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,28 +25,29 @@ pip install rugcheck
```

## 🚀 How to Use It
Check any token with ease:

```python
from rugcheck import rugcheck
### Using the Command-Line Interface (CLI)
After installation, you can use the rugcheck command directly in your terminal to get quick summary.
```bash
rugcheck <token_address>
```

token = '6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN'
rc = rugcheck(token)
Example:
```bash
rugcheck 6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN
```

## 🔍 Get a Summary
You can use `rc.summary` to get the token's summary as a Python dictionary or just print the `rugcheck` object for an instant, human-readable overview:
Output:
```text
>>> print(rc)
Name: OFFICIAL TRUMP (TRUMP)
Rugged: No
Result: Danger
Risk Score: 18717
Risk Score: 18715
Mint Address: 6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN
Total Market Liquidity: $454,326,308.40
Total Market Liquidity: $458,448,342.48
Risks:
- Top 10 holders high ownership (Level: danger, Score: 9298)
- Top 10 holders high ownership (Level: danger, Score: 9296)
Description: The top 10 users hold more than 70% token supply
- Single holder ownership (Level: danger, Score: 8000)
Description: One user holds a large amount of the token supply
Expand All @@ -60,6 +61,16 @@ Links:
Detected At: 2025-01-17T14:27:21.13275916Z
```

### Using It as a Python Module
Check any token with ease:

```python
from rugcheck import rugcheck

token = '6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN'
rc = rugcheck(token)
```

## 🔑 What’s Inside?
You get all the token details found on the RugCheck website and more. Access them using JavaScript-style dot notation or Python’s classic `get()` method:

Expand Down
14 changes: 14 additions & 0 deletions rugcheck/cli.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env python3

import sys
from .rugcheck import rugcheck

def rugcheck_cli():
if len(sys.argv) != 2:
print('rugcheck v1.0.0\nUsage: rugcheck <token_address>')
sys.exit(1)

token = sys.argv[1]
rc = rugcheck(token)

print(rc)

0 comments on commit 8a65acf

Please sign in to comment.