@rigstate/cli
v0.7.40
Published
Rigstate CLI - Code audit, sync and supervision tool
Maintainers
Readme
@rigstate/cli
The official command-line interface for Rigstate - AI-powered code audit and security analysis.
Installation
From source (development)
cd packages/cli
npm install
npm run build
npm install -g .From npm (coming soon)
npm install -g @rigstate/cliQuick Start
1. Login
Authenticate with your Rigstate API key:
rigstate login sk_rigstate_your_key_hereYou can generate an API key from your Rigstate dashboard at the API Keys section.
2. Scan Your Code
Scan your current directory:
rigstate scanScan a specific directory:
rigstate scan ./srcScan with a project ID:
rigstate scan --project abc123Output as JSON (useful for IDE extensions):
rigstate scan --jsonCommands
rigstate login <api-key>
Authenticate with your Rigstate API key. The key is securely stored locally.
Arguments:
api-key- Your Rigstate API key (starts withsk_rigstate_)
Example:
rigstate login sk_rigstate_1234567890abcdefrigstate scan [path]
Scan code files for security and quality issues.
Arguments:
path- Directory or file to scan (default: current directory)
Options:
--json- Output results as JSON instead of formatted text--project <id>- Project ID to associate with this scan
Example:
rigstate scan ./src --project my-project-123 --jsonFeatures
- 🔐 Secure Authentication - API keys stored locally using
conf - 📁 Smart File Detection - Automatically finds code files
- 🚫 Gitignore Respect - Honors your .gitignore patterns
- 🎨 Beautiful Output - Color-coded results with severity levels
- 📊 JSON Export - Machine-readable output for integrations
- ⚡ Fast Scanning - Parallel file processing
Configuration
Configuration is stored in:
- macOS/Linux:
~/.config/rigstate-cli/config.json - Windows:
%APPDATA%\rigstate-cli\config.json
The config file stores:
apiKey- Your authentication keyprojectId- Default project ID (optional)apiUrl- API endpoint (defaults tohttp://localhost:3000)
Environment Variables
You can override the API URL with an environment variable:
export RIGSTATE_API_URL=https://api.rigstate.com
rigstate scanDevelopment
# Install dependencies
npm install
# Build the CLI
npm run build
# Watch mode for development
npm run dev
# Link locally for testing
npm linkFuture IDE Extensions
This CLI is the foundation for our upcoming IDE extensions:
- VS Code Extension
- JetBrains Plugin
- Neovim Plugin
The --json flag is specifically designed for these integrations.
Support
For issues, questions, or feature requests, please visit our GitHub repository or contact support.
License
MIT
