Skip to main content

Overview

nogic [OPTIONS] COMMAND [ARGS]
Global Options:
  • --version - Show version and exit
  • --help - Show help and exit

login

Authenticate with your Nogic API key.
nogic login
You’ll be prompted to enter your API key. Get one from nogic.dev → Settings → API Keys. Example:
$ nogic login
Enter your API key: sk_...
 API key verified successfully
 Logged in as [email protected]

init

Initialize a Nogic project in a directory.
nogic init [DIRECTORY] [OPTIONS]
Arguments:
  • DIRECTORY - Path to initialize (default: current directory)
Options:
  • --link - Link to an existing project instead of creating new
  • --name TEXT - Project name (prompted if not provided)
Example:
$ cd my-project
$ nogic init
Creating project 'my-project'...
 Project created: abc123...
 Initial sync complete (42 files)
This creates a .nogic/config.json file in your project:
{
  "project_id": "abc123-def456-..."
}

sync

One-time sync of a directory to the backend.
nogic sync [DIRECTORY] [OPTIONS]
Arguments:
  • DIRECTORY - Path to sync (default: current directory)
Options:
  • --full - Force full re-sync of all files
Example:
$ nogic sync
Syncing /path/to/project...
 3 files changed
 1 file added
 0 files deleted
Sync complete!

watch

Watch a directory for changes and sync automatically.
nogic watch [DIRECTORY]
Arguments:
  • DIRECTORY - Path to watch (default: current directory)
Example:
$ nogic watch
Watching /path/to/project for changes...
Press Ctrl+C to stop.

[12:34:56] Changed: src/main.py → synced
[12:35:01] Added: src/utils.py → synced
Run nogic watch in a separate terminal while you code. Changes are synced within seconds.

status

Show project status and verify configuration.
nogic status
Example:
$ nogic status
Nogic Project Status
========================================

Local Configuration:
  Directory:      /path/to/project
  Project ID:     abc123-def456-...
  Backend URL:    https://api.nogic.dev
  Logged in:      Yes

Local Database:
  Total files:   42
  Synced files:  42
  Pending sync:  0

Backend Status:
 Connected
 Project found
  Files indexed: 42

reindex

Wipe graph data and re-index the entire project.
nogic reindex [DIRECTORY]
Arguments:
  • DIRECTORY - Path to reindex (default: current directory)
This deletes all existing graph data for the project and re-indexes from scratch. Use when the index becomes corrupted or after major refactoring.
Example:
$ nogic reindex
This will delete all graph data and re-index from scratch.
Continue? [y/N]: y
Deleting existing data...
Re-indexing 42 files...
  [████████████████████████████████] 100%
 Reindex complete!

projects

Manage Nogic projects.

projects list

List all your projects.
nogic projects list
Example:
$ nogic projects list
Found 2 project(s):

  my-project (abc123...) *
  another-project (def456...)

* = current project

projects create

Create a new project.
nogic projects create NAME

projects delete

Delete a project.
nogic projects delete PROJECT_ID

File Patterns

By default, Nogic indexes these file types:
  • Python: *.py
  • JavaScript: *.js, *.jsx
  • TypeScript: *.ts, *.tsx
Files matching these patterns are ignored:
  • node_modules/
  • __pycache__/
  • .git/
  • *.min.js
  • dist/, build/
You can customize patterns in .nogic/config.json:
{
  "project_id": "...",
  "include": ["*.py", "*.ts"],
  "exclude": ["tests/", "*.test.ts"]
}