Skip to main content

A CLI tool for software development tasks powered by AI

Project description

🤖 Janito CLI

A CLI tool for software development tasks powered by AI.

Janito is an AI-powered assistant that helps automate common software development tasks like refactoring, documentation updates, and code optimization.

📥 Installation

# Install from PyPI
pip install janito

# Install from source
git clone https://github.com/joaompinto/janito.git
cd janito
pip install -e .

⚡ Requirements

  • Python 3.8+
  • Anthropic API key
  • Required packages (automatically installed):
    • typer
    • pathspec
    • rich

⚙️ Configuration

🔑 API Key Setup

Janito requires an Anthropic API key to function. Set it as an environment variable:

export ANTHROPIC_API_KEY='your-api-key-here'

You can also add this to your shell profile (~/.bashrc, ~/.zshrc, etc.) for persistence.

📖 Usage

Janito can be used in two modes: Command Line or Interactive Console.

💻 Command Line Mode

janito REQUEST [OPTIONS]

Arguments

  • REQUEST: The modification request

Options

  • -w, --workdir PATH: Working directory (defaults to current directory)
  • --raw: Print raw response instead of markdown format
  • --play PATH: Replay a saved prompt file
  • -i, --include PATH: Additional paths to include in analysis
  • --debug: Show debug information
  • -v, --verbose: Show verbose output
  • --ask: Ask a question about the codebase
  • --scan: Preview files that would be analyzed

🖥️ Interactive Console Mode

Start the interactive console by running janito without arguments:

janito

In console mode, you can:

  • Enter requests directly
  • Navigate history with up/down arrows
  • Use special commands starting with /

📝 Examples

# Command Line Mode Examples
janito "create docstrings for all functions"
janito "add error handling" -w ./myproject
janito "update tests" -i ./tests -i ./lib
janito --ask "explain the authentication flow"
janito --scan  # Preview files to be analyzed

# Console Mode
janito  # Starts interactive session

✨ Features

  • 🤖 AI-powered code analysis and modifications
  • 💻 Interactive console mode for continuous interaction
  • 📁 Support for multiple file types
  • ✅ Syntax validation for Python files
  • 👀 Interactive change preview and confirmation
  • 📜 History tracking of all changes
  • 🐛 Debug and verbose output modes
  • ❓ Question-answering about codebase
  • 🔍 File scanning preview

📚 History and Debugging

Changes are automatically saved in .janito/history/ with timestamps:

  • *_analysis.txt: Initial analysis
  • *_selected.txt: Selected implementation
  • *_changes.txt: Actual changes

Enable debug mode for detailed logging:

janito "request" --debug

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

Project details


Release history Release notifications | RSS feed

This version

0.3.0

Download files

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

Source Distribution

janito-0.3.0.tar.gz (13.7 kB view details)

Uploaded Source

Built Distribution

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

janito-0.3.0-py3-none-any.whl (16.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: janito-0.3.0.tar.gz
  • Upload date:
  • Size: 13.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.10.12

File hashes

Hashes for janito-0.3.0.tar.gz
Algorithm Hash digest
SHA256 38e509c368980d58e29950d2bd2cada17f3131a3a3fbbda727065980b5829ad6
MD5 7152b6779d8798f67d82ac1869e10d9b
BLAKE2b-256 ef4bcd9c601aa1b5541373e77e9584733ba5b3e1fe27df7fc4fbf1d933381492

See more details on using hashes here.

File details

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

File metadata

  • Download URL: janito-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 16.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.10.12

File hashes

Hashes for janito-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 35d2459fc335e5ea3782b13b8cf89e15af6afd69c24af9b7b71f8d53dffd5dae
MD5 87535a28677b91a361d8902b6f15b330
BLAKE2b-256 fe04f4877eb0fa3be765a957b8781f0453fddcc46c0755fdb65370f62054365e

See more details on using hashes here.

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