
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
@taizo-pro/github-discussions-cli
Advanced tools
A powerful command-line tool for interacting with GitHub Discussions without opening a browser
A powerful command-line tool for interacting with GitHub Discussions without opening a browser. Perfect for developers who want to quickly access, read, and contribute to discussions while staying in their terminal.
Install globally from npm registry:
npm install -g @taizo-pro/github-discussions-cli
After installation, both the gh-discussions
and ghd
commands will be available globally in your terminal. You can use either command interchangeably.
You can also use the tool without installing it globally:
npx @taizo-pro/github-discussions-cli --help
Note: Replace
gh-discussions
withnpx @taizo-pro/github-discussions-cli
in all usage examples if using npx.
Install the CLI tool:
npm install -g @taizo-pro/github-discussions-cli
Set up authentication:
# Use either command
gh-discussions config
# or the shorter alias
ghd config
Test with a public repository:
# Use either command format
gh-discussions list microsoft/vscode
# or shorter version
ghd list microsoft/vscode
View a specific discussion:
gh-discussions show 1 microsoft/vscode
Try the new search and statistics features:
# Search for discussions about bugs
gh-discussions search "bug" microsoft/vscode
# View repository statistics
gh-discussions stats microsoft/vscode
Before using the CLI, you need to create a GitHub Personal Access Token with the required permissions:
Sign in to GitHub and go to your account settings
Navigate to Developer Settings
Access Personal Access Tokens
Create New Token (Classic)
For Private Repositories:
For Public Repositories Only:
Additional Recommended Scopes:
⚠️ Security Note: Only select repo
if you need private repository access, as it grants broad permissions.
Alternative: Fine-grained Personal Access Tokens (Beta) If you prefer more granular control, you can use fine-grained tokens:
📝 Note: Fine-grained tokens are currently in beta and may have limitations.
Copy Your Token
Run the interactive configuration setup:
gh-discussions config
The setup will prompt you for:
owner/repository
format (optional)Test your configuration:
# Show current configuration
gh-discussions config --show
# Test by listing discussions (replace with actual repo)
gh-discussions list owner/repository
❌ "Bad credentials" / "Invalid token"
❌ "Resource not accessible by integration"
repo
scope (classic tokens)public_repo
scope is sufficient❌ "Not Found" errors
❌ "API rate limit exceeded"
Action | Classic Token Scope | Fine-grained Permission |
---|---|---|
List discussions | public_repo (public) / repo (private) | Discussions: Read |
View discussion details | public_repo (public) / repo (private) | Discussions: Read |
Create comments | public_repo (public) / repo (private) | Discussions: Write |
Create discussions | public_repo (public) / repo (private) | Discussions: Write |
Edit discussions | public_repo (public) / repo (private) | Discussions: Write |
🎯 Most Common Setup (Public + Private repos):
✅ repo (Full control of private repositories)
🎯 Public Repositories Only:
✅ public_repo (Access public repositories)
✅ read:user (Read user profile data)
🎯 Fine-grained Token (Recommended for specific repos):
Repository permissions:
✅ Discussions: Read and write
✅ Metadata: Read
Note: If using npx instead of global installation, replace
gh-discussions
withnpx @taizo-pro/github-discussions-cli
in all examples below.
# List discussions in current/default repository
gh-discussions list
# List discussions in specific repository
gh-discussions list owner/repository
# Limit number of results
gh-discussions list --first 10
# Filter by category
gh-discussions list --category General
# Filter by author
gh-discussions list --author username
# Show only discussions with comments
gh-discussions list --has-comments
# Show only discussions without comments
gh-discussions list --no-comments
# Sort by creation date (ascending)
gh-discussions list --sort created --order asc
# Output as JSON
gh-discussions list --format json
# Output as markdown table
gh-discussions list --format markdown
# Show discussion by number
gh-discussions show 42
# Show discussion in specific repository
gh-discussions show 42 owner/repository
# Add comment with message
gh-discussions comment 42 "Great discussion!"
# Open editor for longer comments
gh-discussions comment 42 --editor
# Comment in specific repository
gh-discussions comment 42 "Thanks!" owner/repository
# Search for discussions containing "bug"
gh-discussions search "bug"
# Search in specific repository
gh-discussions search "feature request" owner/repository
# Search only in titles
gh-discussions search "announcement" --in title
# Search with author filter
gh-discussions search "help" --author username
# Search with category filter
gh-discussions search "question" --category General
# Sort search results by comments
gh-discussions search "popular" --sort comments --order desc
# Limit search results
gh-discussions search "recent" --limit 5
# Output search results as JSON
gh-discussions search "api" --format json
# Show basic statistics for current/default repository
gh-discussions stats
# Show statistics for specific repository
gh-discussions stats owner/repository
# Show detailed statistics with recent activity
gh-discussions stats --detailed
# Interactive creation
gh-discussions create
# With title and body
gh-discussions create "Bug Report" "I found a bug..."
# Open editor for body
gh-discussions create "Feature Request" --editor
# Specify category
gh-discussions create "Question" "How do I..." --category general
# Interactive editing (opens editor)
gh-discussions edit 42
# Edit title only
gh-discussions edit 42 --title "Updated Title"
# Edit description only
gh-discussions edit 42 --body "Updated description"
# Edit both title and description
gh-discussions edit 42 --title "New Title" --body "New description"
# Force interactive mode
gh-discussions edit 42 --interactive
# Edit in specific repository
gh-discussions edit 42 --title "Update" owner/repository
# Show current configuration
gh-discussions config --show
# Set GitHub token
gh-discussions config --token ghp_xxxxxxxxxxxx
# Set default repository
gh-discussions config --repo owner/repository
# Set default output format
gh-discussions config --format table
# Clear all configuration
gh-discussions config --clear
The tool stores configuration in ~/.github-discussions/
:
config.json
- General settings (default repo, output format)token
- GitHub Personal Access Token (stored securely)For developers who want to contribute to this project:
git clone https://github.com/taizo-pro/github-discussions-cli.git
cd github-discussions-cli
npm install
# Build the project
npm run build
# Build and watch for changes during development
npm run build:watch
# Run in development mode (uses ts-node)
npm run dev
# Run tests
npm test
# Watch tests during development
npm run test:watch
# Lint code
npm run lint
# Format code
npm run format
# Run all tests
npm test
# Run with coverage
npm run test -- --coverage
# Run specific test file
npm test github-client.test.ts
Note: This section is for contributors and developers. End users should install via npm as described in the Installation section.
Command | Description | Features |
---|---|---|
list [repo] | List discussions in a repository | Enhanced with filters (v1.1.0) |
show <number> [repo] | Show discussion details and comments | Core feature |
comment <number> <message> [repo] | Add a comment to a discussion | Core feature |
create [title] [body] [repo] | Create a new discussion | Core feature |
edit <number> [repo] | Edit discussion title and/or description | Added in v1.3.0 |
search <query> [repo] | Search discussions by text | Added in v1.1.0 |
stats [repo] | Show repository discussion statistics | Added in v1.1.0 |
config | Configure authentication and settings | Core feature |
--first <number>
- Number of discussions to fetch (default: 20)--category <name>
- Filter by category name--author <username>
- Filter by author username--has-comments
- Only show discussions with comments--no-comments
- Only show discussions without comments--sort <field>
- Sort by field (created, updated)--order <direction>
- Sort order (asc, desc)--format <format>
- Output format (table, json, markdown)--in <fields>
- Search in specific fields (title, body, comments)--author <username>
- Filter by author--category <category>
- Filter by category--state <state>
- Filter by state (open, closed)--sort <field>
- Sort by field (created, updated, comments)--order <direction>
- Sort order (asc, desc)--limit <number>
- Maximum results to return--format <format>
- Output format (table, json, markdown)--title <title>
- New title for the discussion--body <body>
- New body/description for the discussion--interactive
- Force interactive mode to edit title and body--detailed
- Show detailed statistics with recent activityMain client for interacting with GitHub's GraphQL API.
Handles secure storage and validation of GitHub tokens.
Manages user configuration and preferences.
Provides comprehensive error handling with retry logic and user-friendly messages.
The tool provides detailed error messages and suggestions:
git checkout -b feature/amazing-feature
)git commit -m 'Add amazing feature'
)git push origin feature/amazing-feature
)MIT License - see LICENSE file for details.
ghd
)FAQs
A powerful command-line tool for interacting with GitHub Discussions without opening a browser
We found that @taizo-pro/github-discussions-cli demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.