cognify-code 0.2.0__py3-none-any.whl → 0.2.2__py3-none-any.whl

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.
@@ -5,7 +5,7 @@ Review, generate, search, and refactor code with an intelligent AI agent.
5
5
  All running locally with complete privacy using Ollama.
6
6
  """
7
7
 
8
- __version__ = "0.2.0"
8
+ __version__ = "0.2.2"
9
9
  __author__ = "Ashok Kumar"
10
10
 
11
11
  from ai_code_assistant.config import Config, load_config
ai_code_assistant/cli.py CHANGED
@@ -21,6 +21,43 @@ from ai_code_assistant.utils import FileHandler, get_formatter
21
21
  console = Console()
22
22
 
23
23
 
24
+ WELCOME_BANNER = """
25
+ [bold cyan]
26
+ ██████╗ ██████╗ ██████╗ ███╗ ██╗██╗███████╗██╗ ██╗
27
+ ██╔════╝██╔═══██╗██╔════╝ ████╗ ██║██║██╔════╝╚██╗ ██╔╝
28
+ ██║ ██║ ██║██║ ███╗██╔██╗ ██║██║█████╗ ╚████╔╝
29
+ ██║ ██║ ██║██║ ██║██║╚██╗██║██║██╔══╝ ╚██╔╝
30
+ ╚██████╗╚██████╔╝╚██████╔╝██║ ╚████║██║██║ ██║
31
+ ╚═════╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═══╝╚═╝╚═╝ ╚═╝
32
+ [/bold cyan]
33
+ """
34
+
35
+
36
+ def show_welcome():
37
+ """Display welcome screen with logo and quick start info."""
38
+ console.print(WELCOME_BANNER)
39
+ console.print(f"[bold white] Your Local AI-Powered Code Assistant[/bold white] [dim]v{__version__}[/dim]\n")
40
+
41
+ info_text = """[bold cyan]🚀 Quick Start:[/bold cyan]
42
+ [green]cognify status[/green] Check Ollama connection
43
+ [green]cognify review[/green] <file> Review code for issues
44
+ [green]cognify generate[/green] "..." Generate code from description
45
+ [green]cognify agent[/green] Start interactive AI agent
46
+ [green]cognify chat[/green] Chat about your code
47
+
48
+ [bold cyan]📚 More Commands:[/bold cyan]
49
+ [green]cognify edit[/green] <file> Edit file with AI
50
+ [green]cognify refactor[/green] Multi-file refactoring
51
+ [green]cognify search[/green] "..." Semantic code search
52
+ [green]cognify git commit[/green] AI-powered commit messages
53
+
54
+ [dim]Run [white]cognify --help[/white] for all commands[/dim]
55
+ [dim]Docs: https://github.com/akkssy/cognify-ai[/dim]"""
56
+
57
+ console.print(Panel(info_text, border_style="cyan", padding=(1, 2)))
58
+
59
+
60
+
24
61
  def get_components(config_path: Optional[Path] = None):
25
62
  """Initialize and return all components."""
26
63
  config = load_config(config_path)
@@ -28,16 +65,20 @@ def get_components(config_path: Optional[Path] = None):
28
65
  return config, llm
29
66
 
30
67
 
31
- @click.group()
32
- @click.version_option(version=__version__, prog_name="ai-assist")
68
+ @click.group(invoke_without_command=True)
69
+ @click.version_option(version=__version__, prog_name="cognify")
33
70
  @click.option("--config", "-c", type=click.Path(exists=True, path_type=Path), help="Config file path")
34
71
  @click.option("--verbose", "-v", is_flag=True, help="Enable verbose output")
35
72
  @click.pass_context
36
73
  def main(ctx, config: Optional[Path], verbose: bool):
37
- """AI Code Assistant - Review and generate code using local LLMs."""
74
+ """Cognify - Your Local AI-Powered Code Assistant."""
38
75
  ctx.ensure_object(dict)
39
76
  ctx.obj["config_path"] = config
40
77
  ctx.obj["verbose"] = verbose
78
+
79
+ # Show welcome screen if no command is provided
80
+ if ctx.invoked_subcommand is None:
81
+ show_welcome()
41
82
 
42
83
 
43
84
  @main.command()
@@ -181,7 +222,7 @@ def chat(ctx, context: Tuple[Path, ...], stream: bool):
181
222
  " /clear - Clear conversation history\n"
182
223
  " /context - Show loaded context files\n"
183
224
  " /export - Export conversation to markdown\n"
184
- " /quit - Exit chat\n",
225
+ " /quit or exit - Exit chat\n",
185
226
  title="Interactive Mode",
186
227
  ))
187
228
 
@@ -195,6 +236,11 @@ def chat(ctx, context: Tuple[Path, ...], stream: bool):
195
236
  if not user_input:
196
237
  continue
197
238
 
239
+ # Handle exit commands without slash
240
+ if user_input.lower() in ("exit", "quit", "bye", "q"):
241
+ console.print("[dim]Goodbye![/dim]")
242
+ break
243
+
198
244
  # Handle commands
199
245
  if user_input.startswith("/"):
200
246
  cmd_parts = user_input[1:].split(maxsplit=1)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cognify-code
3
- Version: 0.2.0
3
+ Version: 0.2.2
4
4
  Summary: Your local AI-powered code assistant. Review, generate, search, and refactor code with an intelligent AI agent—all running locally with complete privacy.
5
5
  Author-email: Ashok Kumar <akkssy@users.noreply.github.com>
6
6
  Maintainer-email: Ashok Kumar <akkssy@users.noreply.github.com>
@@ -1,5 +1,5 @@
1
- ai_code_assistant/__init__.py,sha256=NvpsibXIyExY8hIl3wO2y5PEh8Btxvs8QP2uwFDVBmc,409
2
- ai_code_assistant/cli.py,sha256=2wGSe-Lj74Uhfqm2cz25tirRVoeP7nVZCjAuK8NdQzc,59003
1
+ ai_code_assistant/__init__.py,sha256=XnpG4h-2gW3cXseFvqQT_-XyOmVJtikVMrHUnmy8XKI,409
2
+ ai_code_assistant/cli.py,sha256=47TI6XMkcgojYLSLADnk3BphxUffSgmV0tCTHIu4W7o,61350
3
3
  ai_code_assistant/config.py,sha256=6sAufexwzfCu2JNWvt9KevS9k_gMcjj1TAnwuaO1ZFw,4727
4
4
  ai_code_assistant/llm.py,sha256=DfcWJf6zEAUsPSEZLdEmb9o6BQNf1Ja88nswjpy6cOw,4209
5
5
  ai_code_assistant/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -47,9 +47,9 @@ ai_code_assistant/reviewer/prompts.py,sha256=9RrHEBttS5ngxY2BNsUvqGC6-cTxco-kDPb
47
47
  ai_code_assistant/utils/__init__.py,sha256=3HO-1Bj4VvUtM7W1C3MKR4DzQ9Xc875QKSHHkHwuqVs,368
48
48
  ai_code_assistant/utils/file_handler.py,sha256=jPxvtI5dJxkpPjELgRJ11WXamtyKKmZANQ1fcfMVtiU,5239
49
49
  ai_code_assistant/utils/formatters.py,sha256=5El9ew9HS6JLBucBUxxcw4fO5nLpOucgNJrJj2NC3zw,8945
50
- cognify_code-0.2.0.dist-info/licenses/LICENSE,sha256=5yu_kWq2bK-XKhWo79Eykdg4Qf3O8V2Ys7cpOO7GyyE,1063
51
- cognify_code-0.2.0.dist-info/METADATA,sha256=x_c1ZCjoUGq_p3pX7SeU2NBkvsIbKry_SPfoKQiZeII,11862
52
- cognify_code-0.2.0.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
53
- cognify_code-0.2.0.dist-info/entry_points.txt,sha256=MrBnnWPHZVozqqKyTlnJO63YN2kE5yPWKlr2nnRFRks,94
54
- cognify_code-0.2.0.dist-info/top_level.txt,sha256=dD_r1x-oX0s1uspYY72kig4jfIsjh3oDKwOBCMYXqpo,18
55
- cognify_code-0.2.0.dist-info/RECORD,,
50
+ cognify_code-0.2.2.dist-info/licenses/LICENSE,sha256=5yu_kWq2bK-XKhWo79Eykdg4Qf3O8V2Ys7cpOO7GyyE,1063
51
+ cognify_code-0.2.2.dist-info/METADATA,sha256=HRjZsc18DNcoS-NOJw9mCXB3qvrwuP1GhkgeLHmucOg,11862
52
+ cognify_code-0.2.2.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
53
+ cognify_code-0.2.2.dist-info/entry_points.txt,sha256=MrBnnWPHZVozqqKyTlnJO63YN2kE5yPWKlr2nnRFRks,94
54
+ cognify_code-0.2.2.dist-info/top_level.txt,sha256=dD_r1x-oX0s1uspYY72kig4jfIsjh3oDKwOBCMYXqpo,18
55
+ cognify_code-0.2.2.dist-info/RECORD,,