# Nogic CLI

Code Intelligence for AI Agents.

## Installation

### Prerequisites

- Python 3.11 or higher

### Install with pipx (Recommended)

```bash
pipx install nogic
```

### Install with pip

```bash
pip install nogic
```

## Quick Start

### 1. Login with your API key

```bash
nogic login
```

You'll be prompted to enter your API key from the [Nogic dashboard](https://nogic.dev).

### 2. Initialize a project

```bash
cd /path/to/your/project
nogic init
```

This creates a `.nogic/` directory with project configuration.

### 3. Sync your codebase

One-time sync:

```bash
nogic sync
```

Or watch for continuous syncing:

```bash
nogic watch
```

## Commands

- `nogic login` — Authenticate with your API key
- `nogic init` — Initialize a project in a directory
- `nogic watch` — Watch for file changes and sync continuously
- `nogic sync` — One-time full sync
- `nogic reindex` — Wipe graph data and re-index from scratch
- `nogic status` — Show project configuration and backend status
- `nogic projects list` — List all your projects
- `nogic projects create` — Create a new project
- `nogic projects use` — Switch the current project
- `nogic telemetry disable` — Opt out of anonymous telemetry

See the full [CLI reference](https://docs.nogic.dev/cli/commands) for all options.

## Supported Languages

- Python (`.py`)
- JavaScript (`.js`, `.jsx`)
- TypeScript (`.ts`, `.tsx`)

## Data & Privacy

### What we store

When you sync your codebase, Nogic stores the following in our graph database:

- **Code structure** — Function and class signatures, call relationships, import/export graphs
- **File metadata** — File paths, hashes, and modification timestamps
- **Embeddings** — Vector representations of code for semantic search

We do **not** store raw source code, comments, string literals, or any secrets/credentials.

### Telemetry

Nogic collects anonymous usage telemetry to help improve the product:

- CLI version, OS, Python version
- Command names (e.g., `cli_login`, `cli_sync`)
- An anonymous ID (SHA-256 hash of your API key or machine info)

### Opt out of telemetry

```bash
nogic telemetry disable
```

Or set `NOGIC_TELEMETRY_DISABLED=1` or `DO_NOT_TRACK=1`.

For full details, see our [Privacy Policy](https://nogic.dev/privacy).

## Documentation

Full documentation at [docs.nogic.dev](https://docs.nogic.dev).

## License

MIT
