Skip to main content

janito - a development agent with function calling, MCP and skills

Console vs Web

📖 Full documentation available at https://ikignosis.github.io/janito/

⚠️ Disclaimer: The code on this repo has been developed mostly using AI, more specifically the Qwen models.

Features

  • 🔧 Function Calling - Built-in tools for file operations, web search, and more
  • 📧 Gmail Integration - Read, search, and manage emails
  • ☁️ OneDrive Integration - Browse, upload, download, and share files
  • 🔌 MCP Support - Connect to Model Context Protocol servers
  • 🧩 Skills - Install and use task-specific skills from GitHub
  • 🌐 Web UI (Alpha) - Chat through a browser instead of the terminal with --web
  • 📊 Real-time Progress - Watch tool execution progress as it happens
  • 🚀 Easy Setup - Interactive configuration with --config or quick setup with --set flags
  • 🔗 OpenAI-Compatible & Native APIs - Works with any OpenAI-compatible endpoint (OpenAI, LM Studio, Ollama, custom) and native SDKs (Anthropic, DashScope)

NOTE: Janito should be used on development systems on which data loss is tolerable and there are no critical secrets

Quick Start

# Install
pip install janito

# Or, with uv (recommended)
uv tool install janito

# Configure interactively
janito --config

# Or set options directly (two steps: config, then API key)
janito --set provider=openai --set model=gpt-4
janito --set-api-key="sk-your-key" --provider openai

# Start chatting
janito "Hello!"

Installation

From PyPI

pip install janito

Or, with uv:

uv tool install janito

For development setup, see README_DEV.md.

Configuration

Interactive Setup

janito --config

You'll be prompted for:

  • Provider - openai or custom
  • API Key - Masked for security
  • Model - e.g., gpt-4, gpt-3.5-turbo
  • Max Output Tokens - Maximum output tokens (default: 65536)
  • Max Input Tokens - Maximum input tokens / context window (default: 128000)

Quick Configuration with --set

Set options directly from the command line:

# Single key-value
janito --set model=gpt-4

You can also use --get, --unset, and --set-secret with multiple values.

View Configuration

janito --show-config

Costs per provider

Provider Last Model Price
Alibaba qwen3.8-max 6$/month (Lite)
Moonshot kimi-k3 $15/month (Moderato)
z.ai glm-5.2 $12.6/month (Lite)
openai gpt-5.6 Pay as you go

For custom endpoints (base-url), see README_custom.md.

Usage

Single Prompt

janito "What is the capital of France?"

Pipe Input

echo "Tell me a joke" | janito

Interactive Chat

janito

Commands in chat mode:

  • exit / quit - End session
  • restart - Clear conversation history
  • Ctrl+D / Ctrl+Z - Exit

Web UI (Alpha)

⚠️ Alpha — The --web mode is currently in alpha. It works, but the interface, CLI flags, and API may change between releases.

Janito can serve a browser-based chat interface instead of the terminal. This requires optional dependencies that are not part of the core install:

# Install with the web extra
pip install janito[web]
# or
uv tool install janito[web]

Then start the server (opens your browser automatically):

janito --web

# All normal Janito flags still apply, plus web-specific ones:
janito --web -r -w --gmail --web-port 9090      # privileges + gmail, custom port
janito --web --no-web-open                      # don't auto-open the browser

The server binds to 127.0.0.1 by default (localhost only). For full details (features, security, API endpoints, architecture), see the Web UI documentation.

System Prompt Options

Control how the system prompt is handled:

# Use default system prompt (with tools enabled)
janito "What can you do?"

# Disable system prompt entirely (no tools)
janito -Z "Simple prompt without system context"

# Override with a custom system prompt (no tools)
janito -S "You are a concise coding assistant" "Explain recursion"
Flag Description
-Z, --no-system-prompt Skip system prompt and disable tools
-S, --system-prompt Custom system prompt (also disables tools)

Note: When using -S or -Z, built-in tools (file operations, Gmail, OneDrive, MCP) are disabled. Use the default mode or --gmail/--onedrive flags when you need tool access.

Logging

janito --log=info "Your prompt"      # Info level
janito --log=debug "Your prompt"     # Debug level
janito --log=info,debug "Your prompt" # Multiple levels

Examples

OpenAI

# Step 1: Set provider and model
janito --set provider=openai --set model=gpt-4
# Step 2: Store API key
janito --set-api-key="sk-your-key" --provider openai

# Then run any prompt
janito "Explain quantum computing"

Alibaba (Qwen)

# Step 1: Set provider and model
janito --set provider=alibaba --set model=qwen-plus
# Step 2: Store API key
janito --set-api-key="your-dashscope-api-key" --provider alibaba

# Then run any prompt
janito "Explain quantum computing"

Custom Endpoint

janito --set provider=custom --set base-url=http://localhost:8000/v1

Built-in Tools

janito includes tools for common tasks:

Email Integration (Gmail)

# Use Gmail in chat mode
janito --gmail

# Check emails
janito --gmail "Show my unread emails from today"

For full Gmail documentation, see README.gmail.md.

Cloud Storage (OneDrive)

# Authenticate with Microsoft OneDrive
janito --onedrive-auth

# Use OneDrive in chat mode
janito --onedrive

# List files
janito --onedrive "List my files in Documents"

For full OneDrive documentation, see README.onedrive.md.

File Operations

# List files
python -m janito.tools.files.list_files . --recursive --pattern "*.py"

# Read file
python -m janito.tools.files.read_file README.md --max-lines 20

MCP Tools

Connect to MCP servers using the /mcp command inside the interactive shell:

# Add a stdio-based MCP server
/mcp add myserver stdio python -m mcp.server

# Add an HTTP-based MCP server
/mcp add remote http https://api.example.com/mcp

# List configured servers
/mcp list

For full MCP documentation, see README_MCP.md.

Tool Progress Reporting

Tools report progress in real-time:

🔄 Reading files...
📊 Processing: 50/100 files
✅ Completed: 100 files (2.3MB)

Progress messages go to stderr so they don't interfere with tool output.

Error Handling

Exit Code Meaning
0 Success
1 Configuration or runtime error
130 User cancelled (Ctrl+C or Enter)

Dependencies

  • Python 3.10+
  • openai>=1.0.0
  • rich>=10.0.0
  • prompt-toolkit>=3.0.0
  • requests>=2.28.0 (for MCP support)
  • pathspec>=0.11.0 (for .gitignore-aware file listing)

License

MIT License

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

janito-4.22.0.tar.gz (815.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

janito-4.22.0-py3-none-any.whl (477.8 kB view details)

Uploaded Python 3

File details

Details for the file janito-4.22.0.tar.gz.

File metadata

  • Download URL: janito-4.22.0.tar.gz
  • Upload date:
  • Size: 815.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for janito-4.22.0.tar.gz
Algorithm Hash digest
SHA256 61243fd94efe696440f18771c2c0a1c4909abcc1eeffe1453e4b90fd35f29832
MD5 9be2682d555661b47956408c54e18d24
BLAKE2b-256 e8ff87f254c861ecca34a9c7a99ac140e91394935a98de1eec6b097036b6e6ee

See more details on using hashes here.

Provenance

The following attestation bundles were made for janito-4.22.0.tar.gz:

Publisher: release.yaml on ikignosis/janito

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file janito-4.22.0-py3-none-any.whl.

File metadata

  • Download URL: janito-4.22.0-py3-none-any.whl
  • Upload date:
  • Size: 477.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for janito-4.22.0-py3-none-any.whl
Algorithm Hash digest
SHA256 01aed8f7ebb6e1d6f61c8b2eef5abab9f44fc308781fcd99fb03c16273c9ce3d
MD5 05130e29bb9a0b7526ba363bcc4461b0
BLAKE2b-256 8077407f7cf089d6bdd6b65874e8bf3da66c66d2fb4d9c792046a6afaaded74e

See more details on using hashes here.

Provenance

The following attestation bundles were made for janito-4.22.0-py3-none-any.whl:

Publisher: release.yaml on ikignosis/janito

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page