An autonomous AI-powered terminal that understands natural language queries, scrapes the web intelligently, generates complete projects, and deploys applications.
Powered by LM Studio's qwen2.5-coder-14b-instruct-uncensored model
- Features
- Quick Start
- Installation
- Configuration
- Usage
- Architecture
- Built-in Commands
- Available Tools
- Development
- Testing
- Contributing
- License
| Category | Features |
|---|---|
| π§ AI Agent | Natural language understanding, autonomous task execution, self-correction |
| π Web Scraping | Puppeteer-based scraping with stealth mode and anti-detection |
| π Project Generation | Create complete projects from natural language descriptions |
| π Deployment | Docker, Kubernetes, and CI/CD pipeline automation |
| πΎ Memory | Persistent context across sessions with intelligent summarization |
| π¨ CLI | Beautiful terminal UI with rich formatting and progress indicators |
| π Error Handling | Retry logic, circuit breakers, and graceful degradation |
| π§ͺ Testing | 966 tests with 80%+ coverage across 22 test suites |
# Clone the repository
git clone https://github.com/yourusername/theJoker.git
cd theJoker
# Install dependencies
npm install
# Copy environment configuration
cp .env.example .env
# Start LM Studio with qwen2.5-coder-14b-instruct-uncensored
# Make sure it's running at http://xxx.xxx.xx.x:xxxx
# Build and run
npm run build
npm start- Node.js 18.x or higher
- npm 9.x or higher
- LM Studio with a compatible model loaded
- Windows/Linux/macOS with Puppeteer support
-
Clone the repository
git clone https://github.com/yourusername/theJoker.git cd theJoker -
Install dependencies
npm install
-
Configure environment
cp .env.example .env # Edit .env with your LM Studio endpoint -
Build the project
npm run build
-
Start LM Studio
- Open LM Studio
- Load
qwen2.5-coder-14b-instruct-uncensored(or similar model) - Start the local server at
http://192.xxx.xx.x:xxxx
-
Run The Joker
npm start
Create a .env file in the project root:
# LM Studio Configuration
LM_STUDIO_ENDPOINT=http://xxx.xxx.xx.x:xxxx
LM_STUDIO_MODEL=qwen2.5-coder-14b-instruct-uncensored
# LLM Settings
LLM_TEMPERATURE=0.7
LLM_MAX_TOKENS=4096
LLM_TIMEOUT=60000
# Puppeteer Configuration
PUPPETEER_HEADLESS=true
PUPPETEER_TIMEOUT=30000
# Application Settings
DEBUG_MODE=false
LOG_LEVEL=info
MAX_RETRIES=3
CACHE_TTL=300000Additional settings can be configured in config/default.json:
{
"llm": {
"endpoint": "http://xxx.xxx.xx.x:xxxx",
"model": "qwen2.5-coder-14b-instruct-uncensored",
"temperature": 0.7,
"maxTokens": 4096
},
"scraper": {
"headless": true,
"timeout": 30000,
"userAgentRotation": true
},
"agent": {
"maxIterations": 10,
"memoryPersistence": true
}
}Start The Joker in interactive mode:
npm startYou'll see the welcome banner:
βββββββββββββββββββββββββββββββββββββββββββββ
β β
β π THE JOKER - Agentic Terminal π β
β β
β Powered by qwen2.5-coder-14b β
β Type your query or 'help' for commands β
β β
βββββββββββββββββββββββββββββββββββββββββββββ
π Joker >
Find Information:
π Joker > Find the top 5 programming languages in 2024
Search for Places:
π Joker > Find best places to eat in Chicago
Scrape a Website:
π Joker > Extract all links from https://example.com
Compare Items:
π Joker > Compare React vs Vue for web development
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β THE JOKER TERMINAL β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β βββββββββββββββ ββββββββββββββββ βββββββββββββββββββββββ β
β β User Input βββββΆβ Intent ParserβββββΆβ Agent Planner β β
β β (CLI) β β (LLM) β β (LLM + Tools) β β
β βββββββββββββββ ββββββββββββββββ ββββββββββββ¬βββββββββββ β
β β β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββ
β β TOOL EXECUTOR ββ
β β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ ββ
β β β WEB SCRAPING TOOLS β ββ
β β β ββββββββββββ ββββββββββββ ββββββββββββ ββββββββββββ β ββ
β β β β Web β βPuppeteer β β Data β β Link β β ββ
β β β β Search β β Scraper β βProcessor β βExtractor β β ββ
β β β ββββββββββββ ββββββββββββ ββββββββββββ ββββββββββββ β ββ
β β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ ββ
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β β β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββ
β β OUTPUT FORMATTER ββ
β β Structured Results + Code + Links + Files + Terminal Display ββ
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
theJoker/
βββ src/
β βββ index.ts # Entry point
β βββ cli/
β β βββ terminal.ts # Terminal interface
β β βββ commands.ts # Command handlers
β β βββ display.ts # Output formatting
β β βββ progress.ts # Progress tracking
β β βββ formatter.ts # Result formatting
β βββ agents/
β β βββ agent.ts # Main agent loop
β β βββ planner.ts # Action planning
β β βββ executor.ts # Tool execution
β β βββ memory.ts # Session memory
β βββ llm/
β β βββ client.ts # LM Studio API client
β β βββ prompts.ts # Prompt templates
β β βββ parser.ts # Response parsing
β β βββ summarizer.ts # LLM summarization
β βββ scraper/
β β βββ browser.ts # Puppeteer setup
β β βββ navigator.ts # Page navigation
β β βββ extractor.ts # Data extraction
β β βββ stealth.ts # Anti-detection
β βββ tools/
β β βββ registry.ts # Tool registry
β β βββ search.ts # Web search tool
β β βββ scrape.ts # Scraping tool
β β βββ process.ts # Data processing
β βββ errors/
β β βββ handler.ts # Error handling
β β βββ retry.ts # Retry logic
β β βββ circuit-breaker.ts # Circuit breaker
β βββ utils/
β β βββ logger.ts # Logging
β β βββ config.ts # Configuration
β β βββ cache.ts # Caching utilities
β β βββ cleaner.ts # Data cleaning
β β βββ links.ts # Link validation
β β βββ validators.ts # Input validation
β βββ types/
β βββ index.ts # TypeScript types
β βββ errors.ts # Error types
βββ tests/
β βββ unit/ # Unit tests
β βββ integration/ # Integration tests
βββ config/
β βββ prompts/ # Prompt templates
βββ logs/ # Log files
βββ .env.example # Environment template
βββ package.json
βββ tsconfig.json
βββ README.md
| Command | Alias | Description |
|---|---|---|
help |
h, ? |
Show available commands |
clear |
cls, c |
Clear terminal |
exit |
quit, q |
Exit The Joker |
history |
hist |
Show command history |
status |
stat |
Check LM Studio connection |
banner |
Show welcome banner | |
version |
ver, v |
Show version info |
agent |
Run a query through the agent | |
memory |
mem |
Show agent memory stats |
agent-status |
Show agent state | |
reset-agent |
Reset agent state |
Search the web for information.
Parameters:
- query: string (required) - Search query
- numResults: number (default: 10) - Number of results
- engine: string (default: 'google') - Search engineScrape content from a web page.
Parameters:
- url: string (required) - URL to scrape
- selectors: object (optional) - CSS selectors for extraction
- waitFor: string (optional) - Wait for element
- scroll: boolean (default: true) - Scroll to load contentExtract all links from a page.
Parameters:
- url: string (required) - URL to extract from
- filter: string (optional) - Domain filterProcess and structure scraped data.
Parameters:
- data: any (required) - Data to process
- operation: string (required) - Operation type
- options: object (optional) - Processing options# Run in development mode with hot reload
npm run dev
# Build in watch mode
npm run build:watch| Script | Description |
|---|---|
npm start |
Run the compiled application |
npm run dev |
Run with ts-node |
npm run build |
Compile TypeScript |
npm run build:watch |
Compile with watch mode |
npm test |
Run all tests |
npm run test:watch |
Run tests in watch mode |
npm run test:coverage |
Run tests with coverage |
npm run lint |
Run ESLint |
npm run lint:fix |
Fix ESLint issues |
npm run format |
Format with Prettier |
npm run clean |
Remove dist and logs |
# Run all tests
npm test
# Run tests with coverage
npm run test:coverage
# Run specific test file
npm test -- --testPathPatterns="parser"
# Run tests in watch mode
npm run test:watchThe project maintains comprehensive test coverage:
| Test Suite | Tests | Status |
|---|---|---|
| Agent System | 120+ | β Passing |
| LLM Integration | 80+ | β Passing |
| Web Scraper | 90+ | β Passing |
| Tools | 100+ | β Passing |
| CLI | 80+ | β Passing |
| Error Handling | 70+ | β Passing |
| Project Management | 100+ | β Passing |
| Utilities | 150+ | β Passing |
| Total | 966 | β All Passing |
We welcome contributions! Please read our Contributing Guide first.
- Read the CONTRIBUTING.md for guidelines
- Check open issues
- Comment on an issue to get assigned
- Make your changes following our coding standards
- Submit a Pull Request
β οΈ Important: This project uses the TJCL License. By contributing, you agree to the license terms.
Found a security vulnerability? Please read our Security Policy and report responsibly.
DO NOT create public issues for security vulnerabilities.
π§ Report to: ratnakirtiscr@gmail.com
For comprehensive documentation, see:
- DOCUMENTATION.md - Full API reference and guides
- CONTRIBUTING.md - Contribution guidelines
- SECURITY.md - Security policy
- LICENSE - License terms
This project is licensed under The Joker Contribution License (TJCL) v1.0.
| Permission | Status |
|---|---|
| View source code | β Allowed |
| Contribute (Pull Requests) | β Allowed |
| Personal non-commercial use | β Allowed |
| Clone/Fork repository | β Not Allowed |
| Redistribute | β Not Allowed |
| Commercial use | β Not Allowed |
See the LICENSE file for details.
This project is built with these amazing open source libraries:
| Library | Purpose | License |
|---|---|---|
| Puppeteer | Browser automation | Apache-2.0 |
| puppeteer-extra | Plugin system | MIT |
| puppeteer-extra-plugin-stealth | Stealth mode | MIT |
| Axios | HTTP client | MIT |
| Cheerio | HTML parsing | MIT |
| Chalk | Terminal styling | MIT |
| Winston | Logging | MIT |
| Jest | Testing | MIT |
| TypeScript | Type safety | Apache-2.0 |
- LM Studio for local LLM inference
- The open source community for their amazing tools and libraries
Made with β€οΈ by Ratna Kirti
π The Joker - Agentic Terminal v1.0.0