
Company News
Socket Joins New OpenJS Program to Fund Node.js Security Work
Socket is joining the OpenJS Security Stewardship Program to fund Node.js vulnerability research, maintainer remediation, and security releases.
init-consoleiq
Advanced tools
🧠 Intelligent Logging for Developers - Streamline your JavaScript/TypeScript project setup with ConsoleIQ's powerful logging and monitoring capabilities.
Get up and running with ConsoleIQ in your project with just one command:
npx init-consoleiq
This interactive setup will guide you through configuring ConsoleIQ for your project, handling authentication, and automatically integrating the SDK into your codebase.
No installation required! Run directly with npx:
npx init-consoleiq
Or install globally for repeated use:
npm install -g init-consoleiq
init-consoleiq
Run the setup wizard that guides you through the entire process:
npx init-consoleiq
The interactive mode will:
For automated setups or CI/CD pipelines:
npx init-consoleiq --apiKey your_api_key --appName "MyApp" --silent
| Option | Short | Description | Default |
|---|---|---|---|
--apiKey | -k | Your ConsoleIQ API key | - |
--appName | -n | Application name for logs | Interactive prompt |
--levels | -l | Comma-separated log levels | log,error,warn,info |
--environment | -e | Target environment (browser/node) | browser |
--email | - | Email for account creation/login | - |
--password | - | Password for account creation/login | - |
--register | - | Force account registration flow | - |
--login | - | Force login flow | - |
--silent | -s | Run without prompts, use defaults | false |
--help | -h | Show help message | - |
Customize which console methods are captured:
log - Standard console.log outputerror - Error messages and stack traceswarn - Warning messagesinfo - Informational messagesdebug - Debug-level loggingtrace - Detailed trace informationnpx init-consoleiq --apiKey abc123xyz --appName "My Awesome App"
npx init-consoleiq \
--apiKey abc123xyz \
--appName "ProductionApp" \
--levels "error,warn,info" \
--environment node \
--silent
npx init-consoleiq \
--email developer@company.com \
--password mySecurePassword123 \
--appName "MyApp" \
--register
npx init-consoleiq \
--email developer@company.com \
--password mySecurePassword123 \
--login
npx init-consoleiq \
--apiKey abc123xyz \
--appName "BackendAPI" \
--environment node \
--levels "error,warn,info"
ConsoleIQ Setup CLI supports multiple authentication methods:
If you already have an API key from the ConsoleIQ dashboard:
npx init-consoleiq --apiKey your_existing_key
Log in with existing ConsoleIQ credentials:
npx init-consoleiq --email user@example.com --password yourpassword --login
Create a new account with OTP verification:
npx init-consoleiq --email user@example.com --password yourpassword --register
Note: Registration requires email verification via OTP (One-Time Password) sent to your email address.
The CLI automatically handles project integration:
Automatically detects and integrates with common entry files:
main.tsx/ts/jsx/jsindex.tsx/ts/jsx/jsapp.ts/jsserver.js/tsapi.jsimport statementsrequire() statements.ts files when tsconfig.json is detectedThe CLI creates a consoleiq.js or consoleiq.ts file in your project:
// Example generated file (consoleiq.js)
import { createConsoleIQ } from 'consoleiq';
createConsoleIQ({
apiKey: 'your_api_key',
name: 'MyApp',
allowedLevels: ['log', 'error', 'warn', 'info'],
environment: 'browser'
});
Browser Environment (--environment browser)
Node.js Environment (--environment node)
The CLI intelligently places files based on your project structure:
your-project/
├── src/ # If src/ exists, files go here
│ ├── consoleiq.ts # Generated config file
│ └── main.ts # Auto-injected import
├── package.json
└── tsconfig.json # Triggers TypeScript mode
If automatic integration fails, you can manually add ConsoleIQ to your project:
import './consoleiq.js'; // Add to your entry file
require('./consoleiq.js'); // Add to your entry file
🔴 "API Key Invalid"
--login flag🔴 "Entry File Not Found"
🔴 "Installation Failed"
npm install consoleiq axios prompt-sync --save manually🔴 "OTP Not Received"
If you encounter issues:
--help to see all available optionsOnce setup is complete:
console.log() statements to verify captureIf you have a non-standard project structure:
npx init-consoleiq --apiKey abc123 --appName MyApp
# When prompted for entry file, provide your custom path
# Example: ./app/bootstrap.js
For automated deployments:
npx init-consoleiq \
--apiKey $CONSOLEIQ_API_KEY \
--appName $APP_NAME \
--environment $NODE_ENV \
--silent
Set up different configurations for different environments:
# Development
npx init-consoleiq --apiKey dev_key --appName "MyApp-Dev" --levels "log,error,warn,info,debug"
# Production
npx init-consoleiq --apiKey prod_key --appName "MyApp-Prod" --levels "error,warn"
This is a setup utility for the ConsoleIQ logging service. For feature requests or bug reports related to the ConsoleIQ platform itself, please visit the main ConsoleIQ website.
Ready to supercharge your logging? Get started with npx init-consoleiq today! 🚀
FAQs
CLI to initialize ConsoleIQ logging in a React app
The npm package init-consoleiq receives a total of 1 weekly downloads. As such, init-consoleiq popularity was classified as not popular.
We found that init-consoleiq demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.

Company News
Socket is joining the OpenJS Security Stewardship Program to fund Node.js vulnerability research, maintainer remediation, and security releases.

Security News
Two compromised GitHub Actions were re-enabled with malicious tags intact, exposing thousands of downstream repositories to Mini Shai-Hulud.

Research
/Security News
A malicious Firefox extension fetches its payload after installation to evade detection, steal Google session cookies, and automate account takeover.