samcode-cli 1.0.2__tar.gz → 1.0.3__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.
@@ -0,0 +1 @@
1
+ global-exclude .samcode/*
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: samcode-cli
3
- Version: 1.0.2
3
+ Version: 1.0.3
4
4
  Summary: An autonomous AI coding agent that runs in your terminal.
5
5
  Author: Magra Houssem Eddine
6
6
  Description-Content-Type: text/markdown
@@ -726,10 +726,29 @@ class SamCodeCLI:
726
726
  self.show_main_header()
727
727
 
728
728
  def _initialize_git_repo(self):
729
- console.print("\n[bold cyan]🚀 Initialize Git Repository[/bold cyan]\n")
729
+ console.print("\n[bold cyan] Initialize Git Repository[/bold cyan]\n")
730
730
  success, msg = self.git_manager.init_repo()
731
731
  if not success: console.print(f"[red]✗ {msg}[/red]\n"); return
732
732
  console.print(f"[green]✓ {msg}[/green]\n")
733
+
734
+ # --- AUTOMATIC GITIGNORE PROTECTION ---
735
+ gitignore_path = os.path.join(self.workspace_dir, ".gitignore")
736
+ ignore_entry = "\n.samcode/\n"
737
+
738
+ if os.path.exists(gitignore_path):
739
+ with open(gitignore_path, "r") as f:
740
+ content = f.read()
741
+ if ".samcode/" not in content:
742
+ with open(gitignore_path, "a") as f:
743
+ f.write(ignore_entry)
744
+ console.print("[green]✓ Automatically added .samcode/ to existing .gitignore[/green]\n")
745
+ else:
746
+ with open(gitignore_path, "w") as f:
747
+ f.write("# Automatically generated by SamCode CLI to protect API keys\n")
748
+ f.write(ignore_entry)
749
+ console.print("[green]✓ Automatically created .gitignore to protect .samcode/ folder[/green]\n")
750
+ # ----------------------------------------
751
+
733
752
  try:
734
753
  user_check = subprocess.run(["git", "config", "user.name"], cwd=self.workspace_dir, capture_output=True, text=True, timeout=5)
735
754
  if not user_check.stdout.strip():
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: samcode-cli
3
- Version: 1.0.2
3
+ Version: 1.0.3
4
4
  Summary: An autonomous AI coding agent that runs in your terminal.
5
5
  Author: Magra Houssem Eddine
6
6
  Description-Content-Type: text/markdown
@@ -1,3 +1,4 @@
1
+ MANIFEST.in
1
2
  README.md
2
3
  samcode.py
3
4
  setup.py
@@ -6,7 +6,7 @@ long_description = (this_directory / "README.md").read_text(encoding="utf-8")
6
6
 
7
7
  setup(
8
8
  name='samcode-cli',
9
- version='1.0.2', # IMPORTANT: Bumped version!
9
+ version='1.0.3', # IMPORTANT: Bumped version!
10
10
  description='An autonomous AI coding agent that runs in your terminal.',
11
11
  long_description=long_description,
12
12
  long_description_content_type="text/markdown",
File without changes
File without changes