Nia CLI
Command line interface for interacting with your codebase through Nia AI
Overview
Nia CLI is a powerful command-line interface that allows you to interact with your codebase through AI-powered assistance. It enables you to chat with your code repositories, ask questions about your code, and get intelligent responses based on the analysis of your codebase.
Installation
You can also use pipx for isolated installation:
Requires Python 3.7 or higher and an active internet connection.
Authentication
Before using Nia CLI, you need to authenticate with your API key:
Or provide it directly:
Your API key is securely stored in your configuration file (~/.nia/config.json
).
Managing Repositories
View all your indexed repositories:
This displays a table with repository IDs, names, branches, and indexing status.
View all your indexed repositories:
This displays a table with repository IDs, names, branches, and indexing status.
Index a GitHub repository:
You’ll be prompted for the branch name (defaults to “main”), or specify it with the -b
option:
Monitor the indexing progress of a repository:
If you’ve set a default repository:
Set a repository as your default:
Without arguments, choose from a list:
Chatting with Your Code
Start a chat session
If you’ve set a default repository:
Ask questions
Once in a chat session, you can ask questions about your code:
Multi-repository chat
Chat with multiple repositories at once:
This combines knowledge from multiple codebases for more comprehensive answers.
Exit chat
Type ‘exit’ to end the chat session:
Command Reference
Authenticate with Nia API
List all repositories
Index a GitHub repository
Check indexing status
Set default repository
Chat with repository
Chat Tips
Contextual Questions
Ask about specific files, functions, or code patterns
Code Understanding
Request explanations of complex code sections or logic
Architectural Overview
Inquire about the overall structure and organization
Finding Code
Ask where certain functionality is implemented
Problem Solving
Describe bugs or issues for guidance
Navigation
Use ‘exit’ to end chat sessions
Configuration
The configuration file is stored at ~/.nia/config.json
and contains:
Advanced Usage
Troubleshooting
System Requirements
Operating System
Windows, macOS, or Linux
Memory
4GB RAM minimum (8GB recommended)
Storage
100MB for installation and configuration
Python
Version 3.7 or higher
Connectivity
Internet connection for API communication
Privacy and Security
Your code analysis happens on Nia’s secure servers. No code is stored permanently unless specifically requested.
- API key is stored locally in
~/.nia/config.json
- Communication with Nia servers is encrypted
- No persistent storage of your code content
Support
If you encounter any issues or have questions:
- Check the troubleshooting section above
- Visit the Nia documentation
- Join our Discord community
- Contact support at arlan@nozomio.com