nogic 0.0.1__tar.gz → 0.0.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. nogic-0.0.2/PKG-INFO +150 -0
  2. nogic-0.0.2/README.md +113 -0
  3. {nogic-0.0.1 → nogic-0.0.2}/pyproject.toml +13 -2
  4. {nogic-0.0.1 → nogic-0.0.2}/src/nogic/__init__.py +1 -1
  5. nogic-0.0.1/.claude/settings.local.json +0 -22
  6. nogic-0.0.1/.python-version +0 -1
  7. nogic-0.0.1/DEVELOPMENT.md +0 -213
  8. nogic-0.0.1/PKG-INFO +0 -201
  9. nogic-0.0.1/README.md +0 -164
  10. nogic-0.0.1/tests/test_e2e.py +0 -1205
  11. nogic-0.0.1/tests/test_ignore.py +0 -146
  12. nogic-0.0.1/tests/test_sync_batching.py +0 -326
  13. {nogic-0.0.1 → nogic-0.0.2}/.gitignore +0 -0
  14. {nogic-0.0.1 → nogic-0.0.2}/LICENSE +0 -0
  15. {nogic-0.0.1 → nogic-0.0.2}/src/nogic/api/__init__.py +0 -0
  16. {nogic-0.0.1 → nogic-0.0.2}/src/nogic/api/client.py +0 -0
  17. {nogic-0.0.1 → nogic-0.0.2}/src/nogic/commands/__init__.py +0 -0
  18. {nogic-0.0.1 → nogic-0.0.2}/src/nogic/commands/init.py +0 -0
  19. {nogic-0.0.1 → nogic-0.0.2}/src/nogic/commands/login.py +0 -0
  20. {nogic-0.0.1 → nogic-0.0.2}/src/nogic/commands/projects.py +0 -0
  21. {nogic-0.0.1 → nogic-0.0.2}/src/nogic/commands/reindex.py +0 -0
  22. {nogic-0.0.1 → nogic-0.0.2}/src/nogic/commands/status.py +0 -0
  23. {nogic-0.0.1 → nogic-0.0.2}/src/nogic/commands/sync.py +0 -0
  24. {nogic-0.0.1 → nogic-0.0.2}/src/nogic/commands/telemetry_cmd.py +0 -0
  25. {nogic-0.0.1 → nogic-0.0.2}/src/nogic/commands/watch.py +0 -0
  26. {nogic-0.0.1 → nogic-0.0.2}/src/nogic/config.py +0 -0
  27. {nogic-0.0.1 → nogic-0.0.2}/src/nogic/ignore.py +0 -0
  28. {nogic-0.0.1 → nogic-0.0.2}/src/nogic/main.py +0 -0
  29. {nogic-0.0.1 → nogic-0.0.2}/src/nogic/parsing/__init__.py +0 -0
  30. {nogic-0.0.1 → nogic-0.0.2}/src/nogic/parsing/js_extractor.py +0 -0
  31. {nogic-0.0.1 → nogic-0.0.2}/src/nogic/parsing/parser.py +0 -0
  32. {nogic-0.0.1 → nogic-0.0.2}/src/nogic/parsing/python_extractor.py +0 -0
  33. {nogic-0.0.1 → nogic-0.0.2}/src/nogic/parsing/types.py +0 -0
  34. {nogic-0.0.1 → nogic-0.0.2}/src/nogic/storage/__init__.py +0 -0
  35. {nogic-0.0.1 → nogic-0.0.2}/src/nogic/storage/relationships.py +0 -0
  36. {nogic-0.0.1 → nogic-0.0.2}/src/nogic/storage/schema.py +0 -0
  37. {nogic-0.0.1 → nogic-0.0.2}/src/nogic/storage/symbols.py +0 -0
  38. {nogic-0.0.1 → nogic-0.0.2}/src/nogic/telemetry.py +0 -0
  39. {nogic-0.0.1 → nogic-0.0.2}/src/nogic/ui.py +0 -0
  40. {nogic-0.0.1 → nogic-0.0.2}/src/nogic/watcher/__init__.py +0 -0
  41. {nogic-0.0.1 → nogic-0.0.2}/src/nogic/watcher/monitor.py +0 -0
  42. {nogic-0.0.1 → nogic-0.0.2}/src/nogic/watcher/storage.py +0 -0
  43. {nogic-0.0.1 → nogic-0.0.2}/src/nogic/watcher/sync.py +0 -0
nogic-0.0.2/PKG-INFO ADDED
@@ -0,0 +1,150 @@
1
+ Metadata-Version: 2.4
2
+ Name: nogic
3
+ Version: 0.0.2
4
+ Summary: Code intelligence CLI for AI agents — index, search, and understand codebases via graph + vector embeddings.
5
+ Project-URL: Homepage, https://nogic.dev
6
+ Project-URL: Repository, https://github.com/nogic-dev/cli
7
+ Project-URL: Documentation, https://docs.nogic.dev
8
+ Author-email: Nogic <hello@nogic.dev>
9
+ License-Expression: MIT
10
+ License-File: LICENSE
11
+ Keywords: ai-agents,code-graph,code-intelligence,embeddings,mcp,tree-sitter
12
+ Classifier: Development Status :: 4 - Beta
13
+ Classifier: Environment :: Console
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: License :: OSI Approved :: MIT License
16
+ Classifier: Operating System :: OS Independent
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Programming Language :: Python :: 3.13
21
+ Classifier: Topic :: Software Development :: Libraries
22
+ Classifier: Topic :: Software Development :: Quality Assurance
23
+ Classifier: Typing :: Typed
24
+ Requires-Python: >=3.11
25
+ Requires-Dist: httpx>=0.27.0
26
+ Requires-Dist: pathspec>=0.12.0
27
+ Requires-Dist: posthog>=3.0.0
28
+ Requires-Dist: python-dotenv>=1.0.0
29
+ Requires-Dist: rich>=13.0.0
30
+ Requires-Dist: tree-sitter-javascript>=0.23.0
31
+ Requires-Dist: tree-sitter-python>=0.23.0
32
+ Requires-Dist: tree-sitter-typescript>=0.23.0
33
+ Requires-Dist: tree-sitter>=0.24.0
34
+ Requires-Dist: typer>=0.12.0
35
+ Requires-Dist: watchdog>=6.0.0
36
+ Description-Content-Type: text/markdown
37
+
38
+ # Nogic CLI
39
+
40
+ Code Intelligence for AI Agents.
41
+
42
+ ## Installation
43
+
44
+ ### Prerequisites
45
+
46
+ - Python 3.11 or higher
47
+
48
+ ### Install with pipx (Recommended)
49
+
50
+ ```bash
51
+ pipx install nogic
52
+ ```
53
+
54
+ ### Install with pip
55
+
56
+ ```bash
57
+ pip install nogic
58
+ ```
59
+
60
+ ## Quick Start
61
+
62
+ ### 1. Login with your API key
63
+
64
+ ```bash
65
+ nogic login
66
+ ```
67
+
68
+ You'll be prompted to enter your API key from the [Nogic dashboard](https://nogic.dev).
69
+
70
+ ### 2. Initialize a project
71
+
72
+ ```bash
73
+ cd /path/to/your/project
74
+ nogic init
75
+ ```
76
+
77
+ This creates a `.nogic/` directory with project configuration.
78
+
79
+ ### 3. Sync your codebase
80
+
81
+ One-time sync:
82
+
83
+ ```bash
84
+ nogic sync
85
+ ```
86
+
87
+ Or watch for continuous syncing:
88
+
89
+ ```bash
90
+ nogic watch
91
+ ```
92
+
93
+ ## Commands
94
+
95
+ - `nogic login` — Authenticate with your API key
96
+ - `nogic init` — Initialize a project in a directory
97
+ - `nogic watch` — Watch for file changes and sync continuously
98
+ - `nogic sync` — One-time full sync
99
+ - `nogic reindex` — Wipe graph data and re-index from scratch
100
+ - `nogic status` — Show project configuration and backend status
101
+ - `nogic projects list` — List all your projects
102
+ - `nogic projects create` — Create a new project
103
+ - `nogic projects use` — Switch the current project
104
+ - `nogic telemetry disable` — Opt out of anonymous telemetry
105
+
106
+ See the full [CLI reference](https://docs.nogic.dev/cli/commands) for all options.
107
+
108
+ ## Supported Languages
109
+
110
+ - Python (`.py`)
111
+ - JavaScript (`.js`, `.jsx`)
112
+ - TypeScript (`.ts`, `.tsx`)
113
+
114
+ ## Data & Privacy
115
+
116
+ ### What we store
117
+
118
+ When you sync your codebase, Nogic stores the following in our graph database:
119
+
120
+ - **Code structure** — Function and class signatures, call relationships, import/export graphs
121
+ - **File metadata** — File paths, hashes, and modification timestamps
122
+ - **Embeddings** — Vector representations of code for semantic search
123
+
124
+ We do **not** store raw source code, comments, string literals, or any secrets/credentials.
125
+
126
+ ### Telemetry
127
+
128
+ Nogic collects anonymous usage telemetry to help improve the product:
129
+
130
+ - CLI version, OS, Python version
131
+ - Command names (e.g., `cli_login`, `cli_sync`)
132
+ - An anonymous ID (SHA-256 hash of your API key or machine info)
133
+
134
+ ### Opt out of telemetry
135
+
136
+ ```bash
137
+ nogic telemetry disable
138
+ ```
139
+
140
+ Or set `NOGIC_TELEMETRY_DISABLED=1` or `DO_NOT_TRACK=1`.
141
+
142
+ For full details, see our [Privacy Policy](https://nogic.dev/privacy).
143
+
144
+ ## Documentation
145
+
146
+ Full documentation at [docs.nogic.dev](https://docs.nogic.dev).
147
+
148
+ ## License
149
+
150
+ MIT
nogic-0.0.2/README.md ADDED
@@ -0,0 +1,113 @@
1
+ # Nogic CLI
2
+
3
+ Code Intelligence for AI Agents.
4
+
5
+ ## Installation
6
+
7
+ ### Prerequisites
8
+
9
+ - Python 3.11 or higher
10
+
11
+ ### Install with pipx (Recommended)
12
+
13
+ ```bash
14
+ pipx install nogic
15
+ ```
16
+
17
+ ### Install with pip
18
+
19
+ ```bash
20
+ pip install nogic
21
+ ```
22
+
23
+ ## Quick Start
24
+
25
+ ### 1. Login with your API key
26
+
27
+ ```bash
28
+ nogic login
29
+ ```
30
+
31
+ You'll be prompted to enter your API key from the [Nogic dashboard](https://nogic.dev).
32
+
33
+ ### 2. Initialize a project
34
+
35
+ ```bash
36
+ cd /path/to/your/project
37
+ nogic init
38
+ ```
39
+
40
+ This creates a `.nogic/` directory with project configuration.
41
+
42
+ ### 3. Sync your codebase
43
+
44
+ One-time sync:
45
+
46
+ ```bash
47
+ nogic sync
48
+ ```
49
+
50
+ Or watch for continuous syncing:
51
+
52
+ ```bash
53
+ nogic watch
54
+ ```
55
+
56
+ ## Commands
57
+
58
+ - `nogic login` — Authenticate with your API key
59
+ - `nogic init` — Initialize a project in a directory
60
+ - `nogic watch` — Watch for file changes and sync continuously
61
+ - `nogic sync` — One-time full sync
62
+ - `nogic reindex` — Wipe graph data and re-index from scratch
63
+ - `nogic status` — Show project configuration and backend status
64
+ - `nogic projects list` — List all your projects
65
+ - `nogic projects create` — Create a new project
66
+ - `nogic projects use` — Switch the current project
67
+ - `nogic telemetry disable` — Opt out of anonymous telemetry
68
+
69
+ See the full [CLI reference](https://docs.nogic.dev/cli/commands) for all options.
70
+
71
+ ## Supported Languages
72
+
73
+ - Python (`.py`)
74
+ - JavaScript (`.js`, `.jsx`)
75
+ - TypeScript (`.ts`, `.tsx`)
76
+
77
+ ## Data & Privacy
78
+
79
+ ### What we store
80
+
81
+ When you sync your codebase, Nogic stores the following in our graph database:
82
+
83
+ - **Code structure** — Function and class signatures, call relationships, import/export graphs
84
+ - **File metadata** — File paths, hashes, and modification timestamps
85
+ - **Embeddings** — Vector representations of code for semantic search
86
+
87
+ We do **not** store raw source code, comments, string literals, or any secrets/credentials.
88
+
89
+ ### Telemetry
90
+
91
+ Nogic collects anonymous usage telemetry to help improve the product:
92
+
93
+ - CLI version, OS, Python version
94
+ - Command names (e.g., `cli_login`, `cli_sync`)
95
+ - An anonymous ID (SHA-256 hash of your API key or machine info)
96
+
97
+ ### Opt out of telemetry
98
+
99
+ ```bash
100
+ nogic telemetry disable
101
+ ```
102
+
103
+ Or set `NOGIC_TELEMETRY_DISABLED=1` or `DO_NOT_TRACK=1`.
104
+
105
+ For full details, see our [Privacy Policy](https://nogic.dev/privacy).
106
+
107
+ ## Documentation
108
+
109
+ Full documentation at [docs.nogic.dev](https://docs.nogic.dev).
110
+
111
+ ## License
112
+
113
+ MIT
@@ -1,12 +1,12 @@
1
1
  [project]
2
2
  name = "nogic"
3
- version = "0.0.1"
3
+ version = "0.0.2"
4
4
  description = "Code intelligence CLI for AI agents — index, search, and understand codebases via graph + vector embeddings."
5
5
  readme = "README.md"
6
6
  license = "MIT"
7
7
  requires-python = ">=3.11"
8
8
  authors = [
9
- { name = "Nogic", email = "support@nogic.dev" },
9
+ { name = "Nogic", email = "hello@nogic.dev" },
10
10
  ]
11
11
  classifiers = [
12
12
  "Development Status :: 4 - Beta",
@@ -61,3 +61,14 @@ dev = [
61
61
 
62
62
  [tool.hatch.build.targets.wheel]
63
63
  packages = ["src/nogic"]
64
+
65
+ [tool.hatch.build.targets.sdist]
66
+ exclude = [
67
+ ".claude/",
68
+ ".nogic/",
69
+ ".python-version",
70
+ ".env",
71
+ ".env.*",
72
+ "DEVELOPMENT.md",
73
+ "tests/",
74
+ ]
@@ -1,3 +1,3 @@
1
1
  """Nogic CLI package."""
2
2
 
3
- __version__ = "0.0.1"
3
+ __version__ = "0.0.2"
@@ -1,22 +0,0 @@
1
- {
2
- "permissions": {
3
- "allow": [
4
- "Bash(uv run:*)",
5
- "Bash(uv add:*)",
6
- "mcp__nogic__find_symbol",
7
- "mcp__nogic__before_writing",
8
- "mcp__nogic__get_file_structure",
9
- "mcp__nogic__find_similar",
10
- "mcp__nogic__find_by_framework",
11
- "mcp__nogic__get_file_dependencies",
12
- "mcp__nogic__find_tests",
13
- "mcp__nogic__describe_project",
14
- "mcp__nogic__list_files",
15
- "mcp__nogic__get_conventions",
16
- "mcp__nogic__get_dependencies",
17
- "mcp__nogic__assess_impact",
18
- "mcp__nogic__get_class_structure",
19
- "mcp__nogic__get_references"
20
- ]
21
- }
22
- }
@@ -1 +0,0 @@
1
- 3.11
@@ -1,213 +0,0 @@
1
- # Development Guide
2
-
3
- This guide covers setting up the development environment for contributing to the Nogic CLI.
4
-
5
- ## Prerequisites
6
-
7
- - Python 3.11+
8
- - [UV](https://docs.astral.sh/uv/) package manager
9
-
10
- ### Installing UV
11
-
12
- ```bash
13
- # macOS/Linux
14
- curl -LsSf https://astral.sh/uv/install.sh | sh
15
-
16
- # Or with Homebrew
17
- brew install uv
18
- ```
19
-
20
- ## Setup
21
-
22
- ### 1. Clone the repository
23
-
24
- ```bash
25
- git clone https://github.com/nogic/cli.git
26
- cd cli
27
- ```
28
-
29
- ### 2. Install dependencies
30
-
31
- ```bash
32
- uv sync
33
- ```
34
-
35
- This creates a virtual environment in `.venv/` and installs all dependencies.
36
-
37
- ### 3. Configure environment
38
-
39
- Copy the example environment file:
40
-
41
- ```bash
42
- cp .env.example .env
43
- ```
44
-
45
- Edit `.env` with your development settings:
46
-
47
- ```bash
48
- NOGIC_API_URL=http://localhost:8000
49
- NOGIC_API_KEY=your-dev-api-key
50
- ```
51
-
52
- ## Running the CLI
53
-
54
- ### Using UV (recommended)
55
-
56
- ```bash
57
- uv run nogic --help
58
- uv run nogic hello world
59
- ```
60
-
61
- ### Using the virtual environment directly
62
-
63
- ```bash
64
- source .venv/bin/activate
65
- python -m nogic.main --help
66
- ```
67
-
68
- ### As an editable install
69
-
70
- ```bash
71
- uv pip install -e .
72
- nogic --help
73
- ```
74
-
75
- ## Project Structure
76
-
77
- ```
78
- cli/
79
- ├── src/nogic/
80
- │ ├── __init__.py # Package version
81
- │ ├── main.py # CLI entry point
82
- │ ├── config.py # Configuration management
83
- │ ├── api/
84
- │ │ └── client.py # Backend API client
85
- │ ├── commands/
86
- │ │ ├── hello.py # Demo commands
87
- │ │ ├── login.py # Authentication
88
- │ │ ├── projects.py # Project management
89
- │ │ ├── init.py # Project initialization
90
- │ │ ├── sync.py # One-time sync
91
- │ │ └── watch.py # File watcher
92
- │ └── watcher/
93
- │ ├── monitor.py # Filesystem monitoring
94
- │ ├── storage.py # SQLite file tracking
95
- │ └── sync.py # Sync service
96
- ├── pyproject.toml # Package configuration
97
- ├── uv.lock # Dependency lock file
98
- └── .env.example # Environment template
99
- ```
100
-
101
- ## Adding a New Command
102
-
103
- 1. Create a new file in `src/nogic/commands/`:
104
-
105
- ```python
106
- # src/nogic/commands/mycommand.py
107
- import click
108
-
109
- @click.command()
110
- @click.argument("name", default="World")
111
- def mycommand(name: str):
112
- """Description of my command."""
113
- click.echo(f"Hello, {name}!")
114
- ```
115
-
116
- 2. Register it in `src/nogic/main.py`:
117
-
118
- ```python
119
- from nogic.commands import mycommand
120
-
121
- cli.add_command(mycommand.mycommand)
122
- ```
123
-
124
- 3. Test the command:
125
-
126
- ```bash
127
- uv run nogic mycommand --help
128
- ```
129
-
130
- ## Dependencies
131
-
132
- ### Core Dependencies
133
-
134
- | Package | Purpose |
135
- |---------|---------|
136
- | `click` | CLI framework |
137
- | `watchdog` | Filesystem monitoring |
138
- | `httpx` | HTTP client |
139
- | `python-dotenv` | Environment configuration |
140
-
141
- ### Adding Dependencies
142
-
143
- ```bash
144
- uv add package-name
145
- ```
146
-
147
- ### Removing Dependencies
148
-
149
- ```bash
150
- uv remove package-name
151
- ```
152
-
153
- ## Building
154
-
155
- ### Build a wheel
156
-
157
- ```bash
158
- uv build
159
- ```
160
-
161
- Output will be in `dist/`.
162
-
163
- ### Install from built wheel
164
-
165
- ```bash
166
- uv pip install dist/nogic-*.whl
167
- ```
168
-
169
- ## Code Style
170
-
171
- - Follow PEP 8 guidelines
172
- - Use type hints where possible
173
- - Keep functions focused and small
174
- - Use Click's built-in error handling
175
-
176
- ## Testing Commands Locally
177
-
178
- ```bash
179
- # Test login flow
180
- uv run nogic login
181
-
182
- # Test project initialization
183
- uv run nogic init /tmp/test-project --name "Test"
184
-
185
- # Test file watching
186
- uv run nogic watch /tmp/test-project
187
-
188
- # Test sync
189
- uv run nogic sync /tmp/test-project
190
- ```
191
-
192
- ## Debugging
193
-
194
- ### Enable verbose output
195
-
196
- Most commands will print status information. For debugging API calls, check the backend logs.
197
-
198
- ### Check configuration
199
-
200
- ```bash
201
- # View global config
202
- cat ~/.nogic/config.json
203
-
204
- # View project config
205
- cat .nogic/config.json
206
- ```
207
-
208
- ### Inspect the local database
209
-
210
- ```bash
211
- sqlite3 .nogic/nogic.db ".tables"
212
- sqlite3 .nogic/nogic.db "SELECT * FROM files LIMIT 10;"
213
- ```